williamr@4: /* williamr@4: * Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). williamr@4: * All rights reserved. williamr@4: * This component and the accompanying materials are made available williamr@4: * under the terms of the License "Eclipse Public License v1.0" williamr@4: * which accompanies this distribution, and is available williamr@4: * at the URL "http://www.eclipse.org/legal/epl-v10.html". williamr@4: * williamr@4: * Initial Contributors: williamr@4: * Nokia Corporation - initial contribution. williamr@4: * williamr@4: * Contributors: williamr@4: * williamr@4: * Description: williamr@4: * CPluginDesc class declaration williamr@4: * williamr@4: */ williamr@4: williamr@4: williamr@4: /** williamr@4: @file williamr@4: @publishedAll williamr@4: @released williamr@4: */ williamr@4: williamr@4: #ifndef PLUGINDESC_H williamr@4: #define PLUGINDESC_H williamr@4: williamr@4: #include williamr@4: #include williamr@4: #include "authserver/authtypes.h" williamr@4: williamr@4: namespace AuthServer williamr@4: { williamr@4: williamr@4: /** williamr@4: * Provides a description of an authentication plugin's properties. williamr@4: **/ williamr@4: NONSHARABLE_CLASS(CPluginDesc) : public CBase williamr@4: { williamr@4: public: williamr@4: williamr@4: IMPORT_C static CPluginDesc* NewL( williamr@4: TPluginId aId, const TDesC& aName, williamr@4: TAuthPluginType aType, TAuthTrainingStatus aTrainingStatus, williamr@4: TEntropy aMinEntropy, TPercentage aFalsePositiveRate, williamr@4: TPercentage aFalseNegativeRate); williamr@4: IMPORT_C static CPluginDesc* NewLC(RReadStream& aIn); williamr@4: williamr@4: virtual ~CPluginDesc(); williamr@4: williamr@4: IMPORT_C TPluginId Id() const; williamr@4: IMPORT_C const TDesC* Name() const; williamr@4: IMPORT_C TAuthPluginType Type() const; williamr@4: IMPORT_C TAuthTrainingStatus TrainingStatus() const; williamr@4: IMPORT_C TEntropy MinEntropy() const; williamr@4: IMPORT_C TPercentage FalsePositiveRate() const; williamr@4: IMPORT_C TPercentage FalseNegativeRate() const; williamr@4: williamr@4: IMPORT_C void ExternalizeL(RWriteStream& aOut) const; williamr@4: williamr@4: private: williamr@4: static const TInt KMaxNameLength = 256; williamr@4: williamr@4: CPluginDesc(TPluginId aId, williamr@4: TAuthPluginType aType, williamr@4: TAuthTrainingStatus aTrainingStatus, williamr@4: TEntropy aMinEntropy, williamr@4: TPercentage aFalsePositiveRate, williamr@4: TPercentage aFalseNegativeRate); williamr@4: void ConstructL(const TDesC& aName); williamr@4: williamr@4: inline CPluginDesc(); williamr@4: void InternalizeL(RReadStream& aIn); williamr@4: williamr@4: /// the id of the plugin williamr@4: TPluginId iId; williamr@4: /// The name of the plugin williamr@4: HBufC* iName; williamr@4: /// The type of plugin williamr@4: TAuthPluginType iType; williamr@4: /// Indicates whether the plugin is trained for none, some or all williamr@4: /// known identities. williamr@4: TAuthTrainingStatus iTrainingStatus; williamr@4: /// The minumum entropy provided by the plugin. williamr@4: TEntropy iMinEntropy; williamr@4: /// The false positive rate of the plugin williamr@4: TPercentage iFalsePositiveRate; williamr@4: /// The false negative rate of the plugin. williamr@4: TPercentage iFalseNegativeRate; williamr@4: }; williamr@4: williamr@4: typedef RCPointerArray RPluginDescriptions; williamr@4: williamr@4: } williamr@4: williamr@4: #include williamr@4: williamr@4: #endif // PLUGINDESC_H