crypto/weakcryptospi/test/kms/private_include/product/kmsldd.h
changeset 8 35751d3474b7
child 15 da2ae96f639b
equal deleted inserted replaced
2:675a964f4eb5 8:35751d3474b7
       
     1 /*
       
     2 * Copyright (c) 2007-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 * User-side classes which provide access to the KMS LDD.
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 
       
    21 
       
    22 /**
       
    23  @file
       
    24  @internalComponent
       
    25 */
       
    26 
       
    27 
       
    28 #ifndef KMSLDD_H
       
    29 #define KMSLDD_H
       
    30 
       
    31 #include <e32cmn.h>
       
    32 
       
    33 #ifndef __KERNEL_MODE__
       
    34 #include <e32std.h>
       
    35 #endif
       
    36 
       
    37 #include <keyhandle.h>
       
    38 
       
    39 /** Hardware store LDD filename, as supplied to LoadLogicalDevice. */
       
    40 _LIT(KKmsLddFileName, "KMSLDDK");
       
    41 
       
    42 
       
    43 class RKmsChannel : public RBusLogicalChannel
       
    44 /**
       
    45 	User-side channel used to control the KMS LDD.
       
    46 	This can only be used by the key management server.
       
    47 	
       
    48 	@internalTechnology
       
    49  */
       
    50 	{
       
    51 public:
       
    52 	IMPORT_C TInt Open();
       
    53 	inline static const TDesC& FactoryName();
       
    54 	
       
    55 #ifndef __KERNEL_MODE__
       
    56 	IMPORT_C void GenerateKey(TInt aLength, RProcess aOwner, TKeyHandle& aHandle, TRequestStatus& aStatus);
       
    57 	IMPORT_C void StoreKey(const TDesC8& aData, RProcess aOwner, TKeyHandle& aHandle, TRequestStatus& aStatus);
       
    58 	IMPORT_C void DeleteKey(RProcess aClaimedOwner, TKeyHandle aHandle, TRequestStatus& aStatus);
       
    59 	IMPORT_C void AddUsage(RProcess aClaimedOwner, TKeyHandle aHandle, TInt aOperation, const TSecurityPolicy& aSecPol, TRequestStatus& aStatus);
       
    60 	IMPORT_C void DeleteUsage(RProcess aDeletor, TKeyHandle aHandle, TInt aOperation, TRequestStatus& aStatus);
       
    61 	IMPORT_C void UsageAllowed(RProcess aUserProc, TKeyHandle aHandle, TInt aOperation, TBool& aResult, TRequestStatus& aStatus);
       
    62 #endif
       
    63 	};
       
    64 
       
    65 
       
    66 #include "kmsldd.inl"
       
    67 
       
    68 
       
    69 #endif	// KMSLDD_H
       
    70