1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/epoc32/include/authserver/plugindesc.h Wed Mar 31 12:33:34 2010 +0100
1.3 @@ -0,0 +1,99 @@
1.4 +/*
1.5 +* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
1.6 +* All rights reserved.
1.7 +* This component and the accompanying materials are made available
1.8 +* under the terms of the License "Eclipse Public License v1.0"
1.9 +* which accompanies this distribution, and is available
1.10 +* at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.11 +*
1.12 +* Initial Contributors:
1.13 +* Nokia Corporation - initial contribution.
1.14 +*
1.15 +* Contributors:
1.16 +*
1.17 +* Description:
1.18 +* CPluginDesc class declaration
1.19 +*
1.20 +*/
1.21 +
1.22 +
1.23 +/**
1.24 + @file
1.25 + @publishedAll
1.26 + @released
1.27 +*/
1.28 +
1.29 +#ifndef PLUGINDESC_H
1.30 +#define PLUGINDESC_H
1.31 +
1.32 +#include <s32strm.h>
1.33 +#include <ct/rcpointerarray.h>
1.34 +#include "authserver/authtypes.h"
1.35 +
1.36 +namespace AuthServer
1.37 +{
1.38 +
1.39 +/**
1.40 + * Provides a description of an authentication plugin's properties.
1.41 + **/
1.42 +NONSHARABLE_CLASS(CPluginDesc) : public CBase
1.43 + {
1.44 +public:
1.45 +
1.46 + IMPORT_C static CPluginDesc* NewL(
1.47 + TPluginId aId, const TDesC& aName,
1.48 + TAuthPluginType aType, TAuthTrainingStatus aTrainingStatus,
1.49 + TEntropy aMinEntropy, TPercentage aFalsePositiveRate,
1.50 + TPercentage aFalseNegativeRate);
1.51 + IMPORT_C static CPluginDesc* NewLC(RReadStream& aIn);
1.52 +
1.53 + virtual ~CPluginDesc();
1.54 +
1.55 + IMPORT_C TPluginId Id() const;
1.56 + IMPORT_C const TDesC* Name() const;
1.57 + IMPORT_C TAuthPluginType Type() const;
1.58 + IMPORT_C TAuthTrainingStatus TrainingStatus() const;
1.59 + IMPORT_C TEntropy MinEntropy() const;
1.60 + IMPORT_C TPercentage FalsePositiveRate() const;
1.61 + IMPORT_C TPercentage FalseNegativeRate() const;
1.62 +
1.63 + IMPORT_C void ExternalizeL(RWriteStream& aOut) const;
1.64 +
1.65 +private:
1.66 + static const TInt KMaxNameLength = 256;
1.67 +
1.68 + CPluginDesc(TPluginId aId,
1.69 + TAuthPluginType aType,
1.70 + TAuthTrainingStatus aTrainingStatus,
1.71 + TEntropy aMinEntropy,
1.72 + TPercentage aFalsePositiveRate,
1.73 + TPercentage aFalseNegativeRate);
1.74 + void ConstructL(const TDesC& aName);
1.75 +
1.76 + inline CPluginDesc();
1.77 + void InternalizeL(RReadStream& aIn);
1.78 +
1.79 + /// the id of the plugin
1.80 + TPluginId iId;
1.81 + /// The name of the plugin
1.82 + HBufC* iName;
1.83 + /// The type of plugin
1.84 + TAuthPluginType iType;
1.85 + /// Indicates whether the plugin is trained for none, some or all
1.86 + /// known identities.
1.87 + TAuthTrainingStatus iTrainingStatus;
1.88 + /// The minumum entropy provided by the plugin.
1.89 + TEntropy iMinEntropy;
1.90 + /// The false positive rate of the plugin
1.91 + TPercentage iFalsePositiveRate;
1.92 + /// The false negative rate of the plugin.
1.93 + TPercentage iFalseNegativeRate;
1.94 + };
1.95 +
1.96 +typedef RCPointerArray<const CPluginDesc> RPluginDescriptions;
1.97 +
1.98 +}
1.99 +
1.100 +#include <authserver/plugindesc.inl>
1.101 +
1.102 +#endif // PLUGINDESC_H