crypto/weakcryptospi/inc/spi/cryptoplugin.h
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Tue, 24 Nov 2009 09:06:03 +0200
changeset 29 ece3df019add
parent 8 35751d3474b7
child 33 cf642210ecb7
permissions -rw-r--r--
Revision: 200948 Kit: 200948

/*
* Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of the License "Eclipse Public License v1.0"
* which accompanies this distribution, and is available
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
*
* Initial Contributors:
* Nokia Corporation - initial contribution.
*
* Contributors:
*
* Description: 
* cryptoplugin abstract interface
*
*/


/**
 @file
 @publishedPartner
 @released
*/

#ifndef __CRYPTOAPI_CRYPTOPLUGIN_H__
#define __CRYPTOAPI_CRYPTOPLUGIN_H__

#include <cryptospi/cryptobaseapi.h>
#include <cryptospi/plugincharacteristics.h>
#include <cryptospi/extendedcharacteristics.h>

namespace CryptoSpi
	{
	
	/**
	The crypto plugin base class definition
	*/
	class MPlugin
		{
	public:
		virtual void Close() = 0;
		
		/**
		Resets the crypto plugin.
		*/
		virtual void Reset() = 0;

		/**
		Retrieves the plugin's common characteristics
		@param aPluginCharacteristics	The plugin characteristics value retrieved
		*/
		virtual void GetCharacteristicsL(const TCharacteristics*& aPluginCharacteristics) = 0;
		
		/**
		Retrieves the plugin's extended characteristics
		@return The extended plugin characteristics, on the heap.
		This should be deleted by the caller when finished with.
		*/	
		virtual const CExtendedCharacteristics* GetExtendedCharacteristicsL() = 0;

		/**
		Interface that enable plugin to extend functionality
		@param aExtensionId The UID for the extended functionality
		@return The extended handler pointer
		*/
		virtual TAny* GetExtension(TUid aExtensionId) = 0;
		};
	}

#endif //__CRYPTOAPI_CRYPTOPLUGIN_H__