crypto/weakcryptospi/inc/spi/cryptospistateapi.h
changeset 8 35751d3474b7
child 33 cf642210ecb7
equal deleted inserted replaced
2:675a964f4eb5 8:35751d3474b7
       
     1 /*
       
     2 * Copyright (c) 2006-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 * crypto spi application interface
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 /**
       
    21  @file
       
    22  @publishedAll
       
    23  @released
       
    24 */
       
    25 
       
    26 #ifndef __CRYPTOAPI_CRYPTOSPISTATEAPI_H__
       
    27 #define __CRYPTOAPI_CRYPTOSPISTATEAPI_H__
       
    28 
       
    29 #include <e32base.h>
       
    30 
       
    31 namespace CryptoSpi
       
    32 	{
       
    33 	class MPluginSelector;
       
    34 	class CCharacteristicsAndPluginName;
       
    35 
       
    36 	/**
       
    37 	The class provides the APIs to set and unset the rule-based selector.
       
    38 	*/
       
    39 	NONSHARABLE_CLASS(CCryptoSpiStateApi)
       
    40 		{
       
    41 	public:
       
    42 
       
    43 		/**
       
    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 
       
    47 		is not transferd.
       
    48 		
       
    49 		@param aSelector The plugin selector to use
       
    50 		*/
       
    51 		IMPORT_C static void SetSelector(MPluginSelector* aSelector);
       
    52 		
       
    53 		/**
       
    54 		The function unsets the selector for the current thread, so that
       
    55 		the legacy selector will be used to select plugins. 
       
    56 		*/
       
    57 		IMPORT_C static void UnsetSelector();
       
    58 		
       
    59 		/**
       
    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 		*/
       
    65 		IMPORT_C static void EnumerateCharacteristicsL(RPointerArray<CCharacteristicsAndPluginName>& aCharacteristics, TInt32 aInterface, TBool aExtended);
       
    66 		};
       
    67 	}
       
    68 	
       
    69 #endif //__CRYPTOAPI_CRYPTOSPISTATEAPI_H__