williamr@4: /* williamr@4: * Copyright (c) 2006-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: * crypto spi application interface 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 __CRYPTOAPI_CRYPTOSPISTATEAPI_H__ williamr@4: #define __CRYPTOAPI_CRYPTOSPISTATEAPI_H__ williamr@4: williamr@4: #include williamr@4: williamr@4: namespace CryptoSpi williamr@4: { williamr@4: class MPluginSelector; williamr@4: class CCharacteristicsAndPluginName; williamr@4: williamr@4: /** williamr@4: The class provides the APIs to set and unset the rule-based selector. williamr@4: */ williamr@4: NONSHARABLE_CLASS(CCryptoSpiStateApi) williamr@4: { williamr@4: public: williamr@4: williamr@4: /** williamr@4: Set the rule-based selector for the current thread. Once the rule-based williamr@4: selector is set, it will be used by the crypto factory to select appropriate williamr@4: plugin implementation. The owner of the selector is the user, and the ownership williamr@4: is not transferd. williamr@4: williamr@4: @param aSelector The plugin selector to use williamr@4: */ williamr@4: IMPORT_C static void SetSelector(MPluginSelector* aSelector); williamr@4: williamr@4: /** williamr@4: The function unsets the selector for the current thread, so that williamr@4: the legacy selector will be used to select plugins. williamr@4: */ williamr@4: IMPORT_C static void UnsetSelector(); williamr@4: williamr@4: /** williamr@4: Enumerate the all characteristics in the system williamr@4: @param aCharacteristics the array of characteristic dll list. williamr@4: @param aInterface the uid of the interface, 0 means that enumerating characteristics for all the interfaces williamr@4: @param aExtended if extended characteristic needs to be retrieved. williamr@4: @leave ... Any of the crypto error codes defined in williamr@4: cryptospi_errs.h or any of the system-wide error codes. williamr@4: */ williamr@4: IMPORT_C static void EnumerateCharacteristicsL(RPointerArray& aCharacteristics, TInt32 aInterface, TBool aExtended); williamr@4: }; williamr@4: } williamr@4: williamr@4: #endif //__CRYPTOAPI_CRYPTOSPISTATEAPI_H__