os/security/crypto/weakcryptospi/inc/spi/cryptoplugin.h
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
     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 		@leave ...		Any of the crypto error codes defined in 
    53   						cryptospi_errs.h or any of the system-wide error codes.
    54 		*/
    55 		virtual void GetCharacteristicsL(const TCharacteristics*& aPluginCharacteristics) = 0;
    56 		
    57 		/**
    58 		Retrieves the plugin's extended characteristics
    59 		@return The extended plugin characteristics, on the heap.
    60 		This should be deleted by the caller when finished with.
    61 		@leave ...		Any of the crypto error codes defined in 
    62   						cryptospi_errs.h or any of the system-wide error codes.
    63 		*/	
    64 		virtual const CExtendedCharacteristics* GetExtendedCharacteristicsL() = 0;
    65 
    66 		/**
    67 		Interface that enable plugin to extend functionality
    68 		@param aExtensionId The UID for the extended functionality
    69 		@return The extended handler pointer
    70 		*/
    71 		virtual TAny* GetExtension(TUid aExtensionId) = 0;
    72 		};
    73 	}
    74 
    75 #endif //__CRYPTOAPI_CRYPTOPLUGIN_H__