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