os/security/cryptoservices/filebasedcertificateandkeystores/source/generic/client/CFStokenclient.h
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
     1 /*
     2 * Copyright (c) 2004-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 * Filetokens client side representation of MCTToken
    16 *
    17 */
    18 
    19 
    20 /**
    21  @file 
    22  @internalTechnology
    23 */
    24  
    25 #ifndef __CFSTOKENCLIENT_H__
    26 #define	__CFSTOKENCLIENT_H__
    27 
    28 #include "clientsession.h"
    29 #include "tokentypesenum.h"
    30 #include <ct.h>
    31 
    32 //!	Filetokens client side representation of MCTToken, provides client-side reference counting
    33 //!	which calls server with ECloseToken request when appropriate
    34 //! Created by CFSTokenTypeSession as part of OpenToken call
    35 //! Uses RFileStoreClientSession to communicate with filetokens server
    36 
    37 NONSHARABLE_CLASS(CFSTokenClient) : public CBase, public MCTToken
    38 {
    39 	friend class CFSCertStoreClient;	//	For token reference counting	
    40 public:
    41 	static MCTToken* NewL(ETokenEnum aTokenTypeVal, MCTTokenType* aTokenType, RFileStoreClientSession& aClient);
    42 public:	//	From MCTToken
    43 	virtual MCTTokenType& TokenType();
    44 	virtual const TDesC& Label();
    45 	virtual TCTTokenHandle Handle();
    46 protected:	//	From MCTToken
    47 	virtual TInt& ReferenceCount();
    48 	virtual void DoGetInterface(TUid aRequiredInterface, MCTTokenInterface*& aReturnedInterface, TRequestStatus& aStatus);
    49 	virtual TBool DoCancelGetInterface();
    50 	virtual const TDesC& Information(TTokenInformation aRequiredInformation);
    51 private:
    52 	CFSTokenClient(ETokenEnum aTokenTypeVal, MCTTokenType* aTokenType, RFileStoreClientSession& aClient);
    53 private:
    54 	ETokenEnum iTokenEnum;
    55 	MCTTokenType* iTokenType;
    56 	TInt iRefCount;
    57 	RFileStoreClientSession& iClient;
    58 };
    59 
    60 #endif