crypto/weakcryptospi/inc/spi/cryptoplugin.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 * cryptoplugin abstract interface
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 /**
       
    21  @file
       
    22  @publishedPartner
       
    23  @released
       
    24 */
       
    25 
       
    26 #ifndef __CRYPTOAPI_CRYPTOPLUGIN_H__
       
    27 #define __CRYPTOAPI_CRYPTOPLUGIN_H__
       
    28 
       
    29 #include <cryptospi/cryptobaseapi.h>
       
    30 #include <cryptospi/plugincharacteristics.h>
       
    31 #include <cryptospi/extendedcharacteristics.h>
       
    32 
       
    33 namespace CryptoSpi
       
    34 	{
       
    35 	
       
    36 	/**
       
    37 	The crypto plugin base class definition
       
    38 	*/
       
    39 	class MPlugin
       
    40 		{
       
    41 	public:
       
    42 		virtual void Close() = 0;
       
    43 		
       
    44 		/**
       
    45 		Resets the crypto plugin.
       
    46 		*/
       
    47 		virtual void Reset() = 0;
       
    48 
       
    49 		/**
       
    50 		Retrieves the plugin's common characteristics
       
    51 		@param aPluginCharacteristics	The plugin characteristics value retrieved
       
    52 		*/
       
    53 		virtual void GetCharacteristicsL(const TCharacteristics*& aPluginCharacteristics) = 0;
       
    54 		
       
    55 		/**
       
    56 		Retrieves the plugin's extended characteristics
       
    57 		@return The extended plugin characteristics, on the heap.
       
    58 		This should be deleted by the caller when finished with.
       
    59 		*/	
       
    60 		virtual const CExtendedCharacteristics* GetExtendedCharacteristicsL() = 0;
       
    61 
       
    62 		/**
       
    63 		Interface that enable plugin to extend functionality
       
    64 		@param aExtensionId The UID for the extended functionality
       
    65 		@return The extended handler pointer
       
    66 		*/
       
    67 		virtual TAny* GetExtension(TUid aExtensionId) = 0;
       
    68 		};
       
    69 	}
       
    70 
       
    71 #endif //__CRYPTOAPI_CRYPTOPLUGIN_H__