Update contrib.
2 * Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
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".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
15 * CryptoSpi Utility Functionality definition
26 #ifndef __CRYPTOSPIUTIL_H__
27 #define __CRYPTOSPIUTIL_H__
29 #include <cryptospi/cryptocharacteristics.h>
30 #include <cryptospi/ruleselector.h>
39 Run the cryptospi setup executable to publish the characteristics
40 @return KErrNone if successful; otherwise, a system wide error code.
42 static TInt RunCryptoSpiPropertySetupExe();
45 Retrieve characteristics and Dll list for an interface
46 @param aInterface the interface Uid
48 static void RetrieveCharacteristicsL(TInt32 aInterface, RPointerArray<CCharacteristicsAndPluginName>& aList);
51 Retrieve characteristics and Dll list for an interface
52 @param aInterface the interface Uid
54 static void RetrieveCharacteristicsL(TInt32 aInterface, RPointerArray<CRulesCharacteristicsAndPluginName>& aList);
57 Get the plugin dll name from the given Dll index
58 @param aDllIndex dll index
59 @param aName the plugin file name
60 @return KErrNone if successful; otherwise, a system wide error code.
62 static TInt DllIndexToName(TInt aDllIndex, TFileName& aName);
65 Load the given name plugin Dll, and leaves the plugin handle on the cleanup stack
66 @param aLib the library handle of the plugin dll, which is put on the cleanup stack.
67 @param aFileName the plugin dll file name
69 static void LoadPluginDllLC(RLibrary& aLib, TFileName& aFileName);
72 Create the characteristics for a crypto interface
73 @param aInterface the crypto interface
74 @return the pointer to characteristic
76 static CCharacteristics* CreateCharacteristicsL(TInt32 aInterface);
80 Retrieve the characteristics to the given buffer
81 @param aInterface the crypto interface
82 @param aStream the steam to read from
83 @param aBuf the buffer which holds the characteristic
84 @param aCount the count of the characteristics.
86 static TInt RetrieveCharacteristicsL(TInt32 aInterface, RDesReadStream& aStream, RBuf8& aBuf, TInt& aCount);
90 #endif //__CRYPTOSPIUTIL_H__