|
1 /* |
|
2 * Copyright (c) 2006-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 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef __CDUMMYTOKENCLIENT_H__ |
|
20 #define __CDUMMYTOKENCLIENT_H__ |
|
21 |
|
22 #include <ct.h> |
|
23 |
|
24 //! Filetokens client side representation of MCTToken, provides client-side reference counting |
|
25 //! which calls server with ECloseToken request when appropriate |
|
26 //! Created by CDummyTokenTypeSession as part of OpenToken call |
|
27 //! Uses RFileStoreClientSession to communicate with filetokens server |
|
28 |
|
29 NONSHARABLE_CLASS(CDummyTokenClient) : public CBase, public MCTToken |
|
30 { |
|
31 public: |
|
32 static MCTToken* NewL(MCTTokenType* aTokenType); |
|
33 |
|
34 public: // From MCTToken |
|
35 virtual MCTTokenType& TokenType(); |
|
36 virtual const TDesC& Label(); |
|
37 virtual TCTTokenHandle Handle(); |
|
38 |
|
39 protected: // From MCTToken |
|
40 virtual TInt& ReferenceCount(); |
|
41 virtual void DoGetInterface(TUid aRequiredInterface, MCTTokenInterface*& aReturnedInterface, TRequestStatus& aStatus); |
|
42 virtual TBool DoCancelGetInterface(); |
|
43 virtual const TDesC& Information(TTokenInformation aRequiredInformation); |
|
44 |
|
45 private: |
|
46 CDummyTokenClient(MCTTokenType* aTokenType); |
|
47 |
|
48 private: |
|
49 MCTTokenType* iTokenType; |
|
50 TInt iRefCount; |
|
51 }; |
|
52 |
|
53 #endif // __CDUMMYTOKENCLIENT_H__ |