epoc32/include/cryptospi/cryptobaseapi.h
branchSymbian3
changeset 4 837f303aceeb
equal deleted inserted replaced
3:e1b950c65cb4 4:837f303aceeb
       
     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 		@leave ...	Any of the crypto error codes defined in 
       
    47   					cryptospi_errs.h or any of the system-wide error codes.
       
    48 		*/
       
    49 		IMPORT_C void GetCharacteristicsL(const TCharacteristics*& aPluginCharacteristics);
       
    50 		
       
    51 		/**
       
    52 		Retrieves the plugin's extended characteristics
       
    53 		@return The extended plugin characteristics, on the heap.
       
    54 		This should be deleted by the caller when finished with.
       
    55 		@leave ...	Any of the crypto error codes defined in 
       
    56   					cryptospi_errs.h or any of the system-wide error codes.
       
    57 		*/	
       
    58 		IMPORT_C const CExtendedCharacteristics* GetExtendedCharacteristicsL();
       
    59 
       
    60         /**
       
    61         Resets the state of the crypto object to uninitialised. All prior
       
    62         state is lost.
       
    63         */
       
    64         IMPORT_C void Reset();
       
    65 	
       
    66 	protected:
       
    67 		/**
       
    68 		 * @internalComponent
       
    69 		 * 
       
    70 		 * Constructor
       
    71 		 **/		
       
    72 		CCryptoBase(MPlugin* aPlugin, TInt aLibHandle);
       
    73 		/**
       
    74 		Destructor
       
    75 		*/
       
    76 		virtual ~CCryptoBase();
       
    77 	
       
    78 	protected:
       
    79 		/**
       
    80 		The plugin implementation
       
    81 		*/
       
    82 		MPlugin* iPlugin;	
       
    83 		
       
    84 		/**
       
    85 		The current plugin DLL loaded
       
    86 		*/
       
    87 		TInt iLibHandle;
       
    88 		};
       
    89 	}
       
    90 
       
    91 #endif //__CRYPTOAPI_BASEAPI_H__
       
    92