os/security/crypto/weakcryptospi/test/kms/exported_include/kmsclient.h
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/security/crypto/weakcryptospi/test/kms/exported_include/kmsclient.h	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,68 @@
     1.4 +/*
     1.5 +* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.6 +* All rights reserved.
     1.7 +* This component and the accompanying materials are made available
     1.8 +* under the terms of the License "Eclipse Public License v1.0"
     1.9 +* which accompanies this distribution, and is available
    1.10 +* at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.11 +*
    1.12 +* Initial Contributors:
    1.13 +* Nokia Corporation - initial contribution.
    1.14 +*
    1.15 +* Contributors:
    1.16 +*
    1.17 +* Description: 
    1.18 +* API which clients use to talk to the key management server.
    1.19 +*
    1.20 +*/
    1.21 +
    1.22 +
    1.23 +
    1.24 +
    1.25 +/**
    1.26 + @file 
    1.27 + @internalTechnology
    1.28 +*/
    1.29 +
    1.30 +#ifndef KMSCLIENT_H
    1.31 +#define KMSCLIENT_H
    1.32 +
    1.33 +#include <e32std.h>
    1.34 +
    1.35 +#include "keyhandle.h"
    1.36 +
    1.37 +
    1.38 +/** The server will panic clients with the category if it detects an error. */
    1.39 +_LIT(KKmsClientPanicCat, "KmsClientPanic");
    1.40 +
    1.41 +enum TKmsClientPanic
    1.42 +/** Reasons why the KMS might panic a client. */
    1.43 +	{
    1.44 +	/**
    1.45 +		Client supplied an invalid descriptor.  The descriptor may have been
    1.46 +		created by the client DLL when the client passed a bad object reference.
    1.47 +	 */
    1.48 +    //  Unfortunately 0xBADDE5C causes the techview
    1.49 +    //  EikSrvs.exe::ViewServerThread to panic with bad descriptor
    1.50 +	//	EBadClientDescriptor = 0xBADDE5C
    1.51 +	EBadClientDescriptor = -38
    1.52 +	};
    1.53 +
    1.54 +class RKeyMgmtSession : public RSessionBase
    1.55 +	{
    1.56 +public:
    1.57 +	IMPORT_C TInt Connect();
    1.58 +	IMPORT_C TInt Connect(const TVersion& aReqVer);
    1.59 +	
    1.60 +	IMPORT_C TInt GenerateKey(TInt aLength, TKeyHandle& aHandle);
    1.61 +	IMPORT_C TInt StoreKey(const TDesC8& aData, TKeyHandle& aHandle);
    1.62 +	IMPORT_C TInt DeleteKey(TKeyHandle aHandle);
    1.63 +	IMPORT_C TInt AddUsage(TKeyHandle aHandle, TInt aOperation, const TSecurityPolicy& aSecPol);
    1.64 +	IMPORT_C TInt DeleteUsage(TKeyHandle aHandle, TInt aOperation);
    1.65 +
    1.66 +	IMPORT_C void SetHeapFail(TInt aValue);
    1.67 +	IMPORT_C void EndHeapFail();
    1.68 +	};
    1.69 +
    1.70 +#endif	// #ifndef KMSCLIENT_H
    1.71 +