|
1 /* |
|
2 * Copyright (c) 2006 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 "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: The header file of DevToken |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef __DEVTOKEN_H__ |
|
21 #define __DEVTOKEN_H__ |
|
22 |
|
23 #include <ct.h> |
|
24 #include "DevTokenClientSession.h" |
|
25 #include "DevTokenTypesEnum.h" |
|
26 |
|
27 |
|
28 /** |
|
29 * Devicetokens client side representation of MCTToken, |
|
30 * provides client-side reference counting |
|
31 * which calls server with ECloseToken request when appropriate. |
|
32 * |
|
33 * Created by CDevTokenTypeSession as part of OpenToken call |
|
34 * Uses RDevTokenClientSession to communicate with DevTokens server |
|
35 * |
|
36 * @lib DevTokenClient.dll |
|
37 * @since S60 v3.2 |
|
38 */ |
|
39 class CDevToken : public CBase, public MCTToken |
|
40 { |
|
41 public: |
|
42 |
|
43 static MCTToken* NewL(EDevTokenEnum aTokenTypeVal, MCTTokenType* aTokenType, RDevTokenClientSession& aClient); |
|
44 |
|
45 public: // From MCTToken |
|
46 |
|
47 virtual MCTTokenType& TokenType(); |
|
48 |
|
49 virtual const TDesC& Label(); |
|
50 |
|
51 virtual TCTTokenHandle Handle(); |
|
52 |
|
53 protected: // From MCTToken |
|
54 |
|
55 virtual TInt& ReferenceCount(); |
|
56 |
|
57 virtual void DoGetInterface(TUid aRequiredInterface, MCTTokenInterface*& aReturnedInterface, TRequestStatus& aStatus); |
|
58 |
|
59 virtual TBool DoCancelGetInterface(); |
|
60 |
|
61 virtual const TDesC& Information(TTokenInformation aRequiredInformation); |
|
62 |
|
63 private: |
|
64 |
|
65 CDevToken(EDevTokenEnum aTokenTypeVal, MCTTokenType* aTokenType, RDevTokenClientSession& aClient); |
|
66 |
|
67 private: |
|
68 |
|
69 EDevTokenEnum iTokenEnum; |
|
70 |
|
71 MCTTokenType* iTokenType; |
|
72 |
|
73 TInt iRefCount; |
|
74 |
|
75 RDevTokenClientSession& iClientSession; |
|
76 }; |
|
77 |
|
78 #endif //__DEVTOKEN_H__ |
|
79 |
|
80 //EOF |
|
81 |