|
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 |
|
22 /** |
|
23 @file |
|
24 @internalTechnology |
|
25 */ |
|
26 |
|
27 #ifndef __CFSTOKENCLIENT_H__ |
|
28 #define __CFSTOKENCLIENT_H__ |
|
29 |
|
30 #include "clientsession.h" |
|
31 #include <tokentypesenum.h> |
|
32 #include <ct.h> |
|
33 |
|
34 //! Filetokens client side representation of MCTToken, provides client-side reference counting |
|
35 //! which calls server with ECloseToken request when appropriate |
|
36 //! Created by CFSTokenTypeSession as part of OpenToken call |
|
37 //! Uses RFileStoreClientSession to communicate with filetokens server |
|
38 |
|
39 NONSHARABLE_CLASS(CFSTokenClient) : public CBase, public MCTToken |
|
40 { |
|
41 friend class CFSCertStoreClient; // For token reference counting |
|
42 public: |
|
43 static MCTToken* NewL(ETokenEnum aTokenTypeVal, MCTTokenType* aTokenType, RFileStoreClientSession& aClient); |
|
44 public: // From MCTToken |
|
45 virtual MCTTokenType& TokenType(); |
|
46 virtual const TDesC& Label(); |
|
47 virtual TCTTokenHandle Handle(); |
|
48 protected: // From MCTToken |
|
49 virtual TInt& ReferenceCount(); |
|
50 virtual void DoGetInterface(TUid aRequiredInterface, MCTTokenInterface*& aReturnedInterface, TRequestStatus& aStatus); |
|
51 virtual TBool DoCancelGetInterface(); |
|
52 virtual const TDesC& Information(TTokenInformation aRequiredInformation); |
|
53 private: |
|
54 CFSTokenClient(ETokenEnum aTokenTypeVal, MCTTokenType* aTokenType, RFileStoreClientSession& aClient); |
|
55 private: |
|
56 ETokenEnum iTokenEnum; |
|
57 MCTTokenType* iTokenType; |
|
58 TInt iRefCount; |
|
59 RFileStoreClientSession& iClient; |
|
60 }; |
|
61 |
|
62 #endif |