2 * Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
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".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
15 * crypto spi application interface
26 #ifndef __CRYPTOAPI_CRYPTOSPISTATEAPI_H__
27 #define __CRYPTOAPI_CRYPTOSPISTATEAPI_H__
33 class MPluginSelector;
34 class CCharacteristicsAndPluginName;
37 The class provides the APIs to set and unset the rule-based selector.
39 NONSHARABLE_CLASS(CCryptoSpiStateApi)
44 Set the rule-based selector for the current thread. Once the rule-based
45 selector is set, it will be used by the crypto factory to select appropriate
46 plugin implementation. The owner of the selector is the user, and the ownership
49 @param aSelector The plugin selector to use
51 IMPORT_C static void SetSelector(MPluginSelector* aSelector);
54 The function unsets the selector for the current thread, so that
55 the legacy selector will be used to select plugins.
57 IMPORT_C static void UnsetSelector();
60 Enumerate the all characteristics in the system
61 @param aCharacteristics the array of characteristic dll list.
62 @param aInterface the uid of the interface, 0 means that enumerating characteristics for all the interfaces
63 @param aExtended if extended characteristic needs to be retrieved.
64 @leave ... Any of the crypto error codes defined in
65 cryptospi_errs.h or any of the system-wide error codes.
67 IMPORT_C static void EnumerateCharacteristicsL(RPointerArray<CCharacteristicsAndPluginName>& aCharacteristics, TInt32 aInterface, TBool aExtended);
71 #endif //__CRYPTOAPI_CRYPTOSPISTATEAPI_H__