|
1 /* |
|
2 * Copyright (c) 2002 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: This class is instantiated via ECom for a particular token type |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CWIMTOKENTYPE_H |
|
20 #define CWIMTOKENTYPE_H |
|
21 |
|
22 // INCLUDES |
|
23 |
|
24 #include "WimSecModuleMgr.h" |
|
25 #include <e32base.h> |
|
26 #include <ct.h> |
|
27 |
|
28 |
|
29 /** |
|
30 * This refers to a software module that supports the instantiation of a tokens |
|
31 * |
|
32 * @lib WimPlugin |
|
33 * @since Series60 2.1 |
|
34 */ |
|
35 |
|
36 class CWimTokenType : public CCTTokenType |
|
37 { |
|
38 public: // Constructors and destructor |
|
39 |
|
40 /** |
|
41 * Two-phased constructor. |
|
42 */ |
|
43 static CWimTokenType* NewL(); |
|
44 |
|
45 |
|
46 /** |
|
47 * Destructor. |
|
48 */ |
|
49 virtual ~CWimTokenType(); |
|
50 |
|
51 public: // Functions from base class MCTTokenType |
|
52 |
|
53 /** |
|
54 * Lists all the tokens of this type. Caller owns all parameters and |
|
55 * is responsible to destroy all objects in the received RCPointerArray. |
|
56 * @param aTokens (OUT) The returned tokens are added to this array. |
|
57 * @param aStatus (IN/OUT). Asyncronous return status: |
|
58 * KErrNone, if no errors occurred |
|
59 * KErrNotFound, if Wim information not found |
|
60 * KErrCancel, if list operation cancelled |
|
61 * Any other system wide error code |
|
62 * @return void |
|
63 */ |
|
64 void List( RCPointerArray<HBufC>& aTokens, |
|
65 TRequestStatus& aStatus ); |
|
66 |
|
67 /** |
|
68 * Cancel a list operation. |
|
69 * @return void |
|
70 */ |
|
71 void CancelList(); |
|
72 |
|
73 /** |
|
74 * Opens a specified token with token info. |
|
75 * The caller owns all the parameters. |
|
76 * @param aTokenInfo (IN) The info of the required token (token label) |
|
77 * @param aToken (OUT) The returned token. |
|
78 * @param aStatus (IN/OUT) Asynchronous return status. |
|
79 * KErrNone, if token opening succeeded |
|
80 * KErrNotFound, if token not found by aTokenInfo |
|
81 * Any other system wide error code |
|
82 * @return void |
|
83 */ |
|
84 void OpenToken( const TDesC& aTokenInfo, |
|
85 MCTToken*& aToken, |
|
86 TRequestStatus& aStatus ); |
|
87 |
|
88 /** |
|
89 * Opens a specified token with handle |
|
90 * The caller owns all the parameters. |
|
91 * @param aHandle (IN) The handle of the required token |
|
92 * @param aToken (OUT) The returned token. |
|
93 * @param aStatus (IN/OUT) Asynchronous return status. |
|
94 * KErrNone, if token opening succeeded |
|
95 * KErrNotFound, if token not found by aHandle |
|
96 * Any other system wide error code |
|
97 * @return void |
|
98 */ |
|
99 void OpenToken( TCTTokenHandle aHandle, |
|
100 MCTToken*& aToken, |
|
101 TRequestStatus& aStatus ); |
|
102 |
|
103 /** |
|
104 * Cancel an OpenToken operation. |
|
105 * @return void |
|
106 */ |
|
107 void CancelOpenToken(); |
|
108 |
|
109 private: // Constructors |
|
110 |
|
111 /** |
|
112 * Second phase constructor |
|
113 */ |
|
114 void ConstructL(); |
|
115 |
|
116 /** |
|
117 * Default constructor |
|
118 */ |
|
119 CWimTokenType(); |
|
120 |
|
121 private: // Data |
|
122 |
|
123 // A pointer to security module handler. |
|
124 // The ownership of this object belongs to this class |
|
125 CWimSecModuleMgr* iWimSecModuleMgr; |
|
126 |
|
127 }; |
|
128 |
|
129 #endif // CWIMTOKENTYPE_H |
|
130 |
|
131 // End of File |