epoc32/include/authserver/plugindesc.h
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:33:34 +0100
branchSymbian3
changeset 4 837f303aceeb
permissions -rw-r--r--
Current Symbian^3 public API header files (from PDK 3.0.h)
This is the epoc32/include tree with the "platform" subtrees removed, and
all but a selected few mbg and rsg files removed.
williamr@4
     1
/*
williamr@4
     2
* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
williamr@4
     3
* All rights reserved.
williamr@4
     4
* This component and the accompanying materials are made available
williamr@4
     5
* under the terms of the License "Eclipse Public License v1.0"
williamr@4
     6
* which accompanies this distribution, and is available
williamr@4
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
williamr@4
     8
*
williamr@4
     9
* Initial Contributors:
williamr@4
    10
* Nokia Corporation - initial contribution.
williamr@4
    11
*
williamr@4
    12
* Contributors:
williamr@4
    13
*
williamr@4
    14
* Description: 
williamr@4
    15
* CPluginDesc class declaration
williamr@4
    16
*
williamr@4
    17
*/
williamr@4
    18
williamr@4
    19
williamr@4
    20
/**
williamr@4
    21
 @file 
williamr@4
    22
 @publishedAll
williamr@4
    23
 @released
williamr@4
    24
*/
williamr@4
    25
williamr@4
    26
#ifndef PLUGINDESC_H
williamr@4
    27
#define PLUGINDESC_H
williamr@4
    28
williamr@4
    29
#include <s32strm.h>
williamr@4
    30
#include <ct/rcpointerarray.h>
williamr@4
    31
#include "authserver/authtypes.h"
williamr@4
    32
williamr@4
    33
namespace AuthServer
williamr@4
    34
{
williamr@4
    35
williamr@4
    36
/**
williamr@4
    37
 * Provides a description of an authentication plugin's properties.
williamr@4
    38
 **/
williamr@4
    39
NONSHARABLE_CLASS(CPluginDesc) : public CBase
williamr@4
    40
	{
williamr@4
    41
public:
williamr@4
    42
williamr@4
    43
	IMPORT_C static CPluginDesc* NewL(
williamr@4
    44
		TPluginId aId, const TDesC& aName,
williamr@4
    45
		TAuthPluginType aType, TAuthTrainingStatus aTrainingStatus,
williamr@4
    46
		TEntropy aMinEntropy, TPercentage aFalsePositiveRate,
williamr@4
    47
		TPercentage aFalseNegativeRate);
williamr@4
    48
	IMPORT_C static CPluginDesc* NewLC(RReadStream& aIn);
williamr@4
    49
	
williamr@4
    50
	virtual ~CPluginDesc();
williamr@4
    51
	
williamr@4
    52
	IMPORT_C TPluginId           Id() const;
williamr@4
    53
	IMPORT_C const TDesC*        Name() const;
williamr@4
    54
	IMPORT_C TAuthPluginType     Type() const;
williamr@4
    55
	IMPORT_C TAuthTrainingStatus TrainingStatus() const;
williamr@4
    56
	IMPORT_C TEntropy            MinEntropy() const;
williamr@4
    57
	IMPORT_C TPercentage         FalsePositiveRate() const;
williamr@4
    58
	IMPORT_C TPercentage         FalseNegativeRate() const;
williamr@4
    59
williamr@4
    60
	IMPORT_C void ExternalizeL(RWriteStream& aOut) const;
williamr@4
    61
		
williamr@4
    62
private:
williamr@4
    63
	static const TInt KMaxNameLength = 256;
williamr@4
    64
		
williamr@4
    65
	CPluginDesc(TPluginId           aId,
williamr@4
    66
				TAuthPluginType     aType,
williamr@4
    67
				TAuthTrainingStatus aTrainingStatus,
williamr@4
    68
				TEntropy            aMinEntropy,
williamr@4
    69
				TPercentage         aFalsePositiveRate,
williamr@4
    70
				TPercentage         aFalseNegativeRate);
williamr@4
    71
	void ConstructL(const TDesC& aName);
williamr@4
    72
williamr@4
    73
	inline CPluginDesc();
williamr@4
    74
	void InternalizeL(RReadStream& aIn);
williamr@4
    75
williamr@4
    76
	/// the id of the plugin
williamr@4
    77
	TPluginId           iId;
williamr@4
    78
	/// The name of the plugin
williamr@4
    79
	HBufC*              iName;
williamr@4
    80
	/// The type of plugin
williamr@4
    81
	TAuthPluginType     iType;
williamr@4
    82
	/// Indicates whether the plugin is trained for none, some or all
williamr@4
    83
	/// known identities.
williamr@4
    84
	TAuthTrainingStatus iTrainingStatus;
williamr@4
    85
	/// The minumum entropy provided by the plugin.
williamr@4
    86
	TEntropy            iMinEntropy;
williamr@4
    87
	/// The false positive rate of the plugin
williamr@4
    88
	TPercentage         iFalsePositiveRate;
williamr@4
    89
	/// The false negative rate of the plugin.
williamr@4
    90
	TPercentage         iFalseNegativeRate;
williamr@4
    91
    };
williamr@4
    92
williamr@4
    93
typedef RCPointerArray<const CPluginDesc> RPluginDescriptions;
williamr@4
    94
williamr@4
    95
}   
williamr@4
    96
williamr@4
    97
#include <authserver/plugindesc.inl>
williamr@4
    98
williamr@4
    99
#endif // PLUGINDESC_H