13 * |
13 * |
14 * Description: Wrapper class for Symbian's Security Framework's calls. |
14 * Description: Wrapper class for Symbian's Security Framework's calls. |
15 * |
15 * |
16 */ |
16 */ |
17 |
17 |
18 |
|
19 #ifndef SECMODUISYNCWRAPPER_H |
18 #ifndef SECMODUISYNCWRAPPER_H |
20 #define SECMODUISYNCWRAPPER_H |
19 #define SECMODUISYNCWRAPPER_H |
21 |
20 |
22 |
|
23 // INCLUDES |
|
24 #include <e32base.h> |
21 #include <e32base.h> |
25 #include <f32file.h> |
22 #include <f32file.h> |
26 #include <ct/rcpointerarray.h> |
23 #include <ct/rcpointerarray.h> |
27 #include <ct/rmpointerarray.h> |
24 #include <ct/rmpointerarray.h> |
28 |
25 |
29 // FORWARD DECLERATIONS |
|
30 class MCTToken; |
26 class MCTToken; |
31 class MCTAuthenticationObject; |
27 class MCTAuthenticationObject; |
32 class MCTAuthenticationObjectList; |
28 class MCTAuthenticationObjectList; |
33 class CUnifiedKeyStore; |
29 class CUnifiedKeyStore; |
34 class MCTTokenInterface; |
30 class MCTTokenInterface; |
35 class CCTKeyInfo; |
31 class CCTKeyInfo; |
36 class TCTKeyAttributeFilter; |
32 class TCTKeyAttributeFilter; |
37 class MCTKeyStore; |
33 class MCTKeyStore; |
38 class TCTTokenObjectHandle; |
34 class TCTTokenObjectHandle; |
39 // CLASS DECLARATION |
35 |
40 |
36 |
41 /** |
37 /** |
42 * class CSecModUISyncWrapper |
38 * class CSecModUISyncWrapper |
43 * Wrapper class for Symbian's Security Framework's calls. |
39 * Wrapper class for Symbian's Security Framework's calls. |
44 * |
40 * |
45 * @lib wimmanui.dll |
41 * @lib wimmanui.dll |
46 * @since Series 60 2.0 |
42 * @since Series 60 2.0 |
47 */ |
43 */ |
48 class CSecModUISyncWrapper : public CActive |
44 class CSecModUISyncWrapper : public CActive |
49 { |
45 { |
50 public: |
46 public: // Constructors and destructor |
51 |
47 |
52 /** |
|
53 * Two-phased constructor. |
|
54 */ |
|
55 static CSecModUISyncWrapper* NewLC(); |
48 static CSecModUISyncWrapper* NewLC(); |
56 |
|
57 /** |
|
58 * Two-phased constructor. |
|
59 */ |
|
60 static CSecModUISyncWrapper* NewL(); |
49 static CSecModUISyncWrapper* NewL(); |
61 |
|
62 /** |
|
63 * Destructor. |
|
64 */ |
|
65 virtual ~CSecModUISyncWrapper(); |
50 virtual ~CSecModUISyncWrapper(); |
66 |
51 |
67 public: // New functions |
52 public: // New functions |
68 |
|
69 /** |
|
70 * TInt ListL |
|
71 * @since S60 2.0 |
|
72 * @param aStore reference to store where operation is done. |
|
73 * @param aArray certificates are stored here. |
|
74 * @param aFilter Information on what kind certificates are looked. |
|
75 * @return TInt Status Symbian's API's call. |
|
76 */ |
|
77 |
|
78 |
53 |
79 TInt Initialize(CUnifiedKeyStore& aKeyStore ); |
54 TInt Initialize(CUnifiedKeyStore& aKeyStore ); |
80 |
55 |
81 TInt OpenWIM(); |
56 TInt OpenWIM(); |
82 |
57 |
83 TInt GetAuthObjectInterface( |
58 TInt GetAuthObjectInterface( |
84 MCTToken& aToken, |
59 MCTToken& aToken, |
85 MCTTokenInterface*& aTokenInterface); |
60 MCTTokenInterface*& aTokenInterface); |
86 |
61 |
87 TInt ListAuthObjects( |
62 TInt ListAuthObjects( |
88 MCTAuthenticationObjectList& aAuthObjList, |
63 MCTAuthenticationObjectList& aAuthObjList, |
89 RMPointerArray<MCTAuthenticationObject>& aAuthObjects ); |
64 RMPointerArray<MCTAuthenticationObject>& aAuthObjects ); |
90 |
65 |
91 TInt ListKeys( |
66 TInt ListKeys( |
92 MCTKeyStore& aKeyStore, |
67 MCTKeyStore& aKeyStore, |
93 RMPointerArray<CCTKeyInfo>& aKeysInfos, |
68 RMPointerArray<CCTKeyInfo>& aKeysInfos, |
94 const TCTKeyAttributeFilter& aFilter); |
69 const TCTKeyAttributeFilter& aFilter); |
95 |
70 |
96 TInt DeleteKey( |
71 TInt DeleteKey( |
97 CUnifiedKeyStore& aKeyStore, |
72 CUnifiedKeyStore& aKeyStore, |
98 TCTTokenObjectHandle aHandle); |
73 TCTTokenObjectHandle aHandle); |
99 |
74 |
100 TInt ChangeReferenceData( MCTAuthenticationObject& aAuthObject ); |
75 TInt ChangeReferenceData( MCTAuthenticationObject& aAuthObject ); |
101 |
76 |
102 TInt UnblockAuthObject( MCTAuthenticationObject& aAuthObject ); |
77 TInt UnblockAuthObject( MCTAuthenticationObject& aAuthObject ); |
103 |
78 |
104 TInt EnableAuthObject( MCTAuthenticationObject& aAuthObject ); |
79 TInt EnableAuthObject( MCTAuthenticationObject& aAuthObject ); |
105 |
80 |
106 TInt DisableAuthObject( MCTAuthenticationObject& aAuthObject ); |
81 TInt DisableAuthObject( MCTAuthenticationObject& aAuthObject ); |
107 |
82 |
108 TInt CloseAuthObject( MCTAuthenticationObject& aAuthObject ); |
83 TInt CloseAuthObject( MCTAuthenticationObject& aAuthObject ); |
109 |
84 |
110 TInt TimeRemaining( MCTAuthenticationObject& aAuthObject, TInt& aStime ); |
85 TInt TimeRemaining( MCTAuthenticationObject& aAuthObject, TInt& aStime ); |
111 |
86 |
112 protected: |
87 protected: // From CActive |
113 |
88 |
114 void DoCancel(); |
89 void DoCancel(); |
115 void RunL(); |
90 void RunL(); |
116 |
91 |
117 private: |
92 private: // New functions |
118 |
93 |
119 CSecModUISyncWrapper(); |
94 CSecModUISyncWrapper(); |
120 void HandleErrorL(); |
|
121 |
95 |
122 private: //Data |
96 private: // Data |
123 |
97 |
124 // Internal operation states. |
98 // Internal operation states. |
125 enum TOperation |
99 enum TOperation |
126 { |
100 { |
127 EOperationInit, |
101 EOperationInit, |
128 EOperationGetAOInterface, |
102 EOperationGetAOInterface, |
129 EOperationListAOs, |
103 EOperationListAOs, |
130 EOperationListKeys, |
104 EOperationListKeys, |
131 EOperationDelKey, |
105 EOperationDelKey, |
132 EOperationChangeReferenceData, |
106 EOperationChangeReferenceData, |
133 EOperationUnblockAO, |
107 EOperationUnblockAO, |
134 EOperationEnableAO, |
108 EOperationEnableAO, |
135 EOperationDisableAO, |
109 EOperationDisableAO, |
136 EOperationCloseAO, |
110 EOperationCloseAO, |