os/security/cryptoservices/filebasedcertificateandkeystores/source/generic/client/CFStokenclient.h
Update contrib.
2 * Copyright (c) 2004-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 * Filetokens client side representation of MCTToken
25 #ifndef __CFSTOKENCLIENT_H__
26 #define __CFSTOKENCLIENT_H__
28 #include "clientsession.h"
29 #include "tokentypesenum.h"
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
37 NONSHARABLE_CLASS(CFSTokenClient) : public CBase, public MCTToken
39 friend class CFSCertStoreClient; // For token reference counting
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);
52 CFSTokenClient(ETokenEnum aTokenTypeVal, MCTTokenType* aTokenType, RFileStoreClientSession& aClient);
54 ETokenEnum iTokenEnum;
55 MCTTokenType* iTokenType;
57 RFileStoreClientSession& iClient;