crypto/weakcryptospi/inc/spi/cryptobaseapi.h
changeset 8 35751d3474b7
child 30 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 base api interface
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 /**
       
    21  @file
       
    22  @publishedAll
       
    23  @released
       
    24 */
       
    25 
       
    26 #ifndef __CRYPTOAPI_BASEAPI_H__
       
    27 #define __CRYPTOAPI_BASEAPI_H__
       
    28 
       
    29 #include <e32base.h>
       
    30 #include <cryptospi/plugincharacteristics.h>
       
    31 
       
    32 namespace CryptoSpi
       
    33 	{
       
    34 	class MPlugin;
       
    35 	class MHash;
       
    36 	class MAsyncHash;
       
    37 	class CCryptoParams;
       
    38 	class CExtendedCharacteristics;
       
    39 		
       
    40 	NONSHARABLE_CLASS(CCryptoBase) : public CBase
       
    41 		{
       
    42 	public:
       
    43 		/**
       
    44 		Retrieves the plugin's common characteristics
       
    45 		@param aPluginCharacteristics The plugin characteristics value retrieved
       
    46 		*/
       
    47 		IMPORT_C void GetCharacteristicsL(const TCharacteristics*& aPluginCharacteristics);
       
    48 		
       
    49 		/**
       
    50 		Retrieves the plugin's extended characteristics
       
    51 		@return The extended plugin characteristics, on the heap.
       
    52 		This should be deleted by the caller when finished with.
       
    53 		*/	
       
    54 		IMPORT_C const CExtendedCharacteristics* GetExtendedCharacteristicsL();
       
    55 
       
    56         /**
       
    57         Resets the state of the crypto object to uninitialised. All prior
       
    58         state is lost.
       
    59         */
       
    60         IMPORT_C void Reset();
       
    61 	
       
    62 	protected:
       
    63 		/**
       
    64 		 * @internalComponent
       
    65 		 * 
       
    66 		 * Constructor
       
    67 		 **/		
       
    68 		CCryptoBase(MPlugin* aPlugin, TInt aLibHandle);
       
    69 		/**
       
    70 		Destructor
       
    71 		*/
       
    72 		virtual ~CCryptoBase();
       
    73 	
       
    74 	protected:
       
    75 		/**
       
    76 		The plugin implementation
       
    77 		*/
       
    78 		MPlugin* iPlugin;	
       
    79 		
       
    80 		/**
       
    81 		The current plugin DLL loaded
       
    82 		*/
       
    83 		TInt iLibHandle;
       
    84 		};
       
    85 	}
       
    86 
       
    87 #endif //__CRYPTOAPI_BASEAPI_H__
       
    88