|
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 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef __KEYTOOL_ENGINE_H_ |
|
20 #define __KEYTOOL_ENGINE_H_ |
|
21 |
|
22 #include <e32base.h> |
|
23 #include <unifiedkeystore.h> |
|
24 |
|
25 #include "keytool_commands.h" |
|
26 |
|
27 class CKeyToolController; |
|
28 |
|
29 class CKeyToolEngine : public CActive |
|
30 { |
|
31 public: |
|
32 static CKeyToolEngine* NewLC(CKeyToolController* aController); |
|
33 static CKeyToolEngine* NewL(CKeyToolController* aController); |
|
34 ~CKeyToolEngine(); |
|
35 void ConstructL(); |
|
36 |
|
37 public: // Actual commands |
|
38 void ListL(CKeyToolParameters* aParam); |
|
39 void ImportL(CKeyToolParameters* aParam); |
|
40 void RemoveL(CKeyToolParameters* aParam); |
|
41 void DisplayUsageL(CKeyToolParameters* aParam); |
|
42 void ListStoresL(CKeyToolParameters* aParam); |
|
43 void SetPolicyL(CKeyToolParameters* aParam); |
|
44 |
|
45 public: // From CActive |
|
46 void RunL(); |
|
47 void DoCancel(); |
|
48 TInt RunError(TInt aError); |
|
49 |
|
50 protected: |
|
51 void InitializeL(); |
|
52 |
|
53 private: |
|
54 CKeyToolEngine(CKeyToolController* aController); |
|
55 |
|
56 private: |
|
57 enum |
|
58 { |
|
59 EInitialise, |
|
60 EExecuting, |
|
61 EDone |
|
62 } iState; |
|
63 enum |
|
64 { |
|
65 EIdle, |
|
66 EList, |
|
67 EImport, |
|
68 ERemove, |
|
69 ESetPolicy |
|
70 } iCurrentAction; |
|
71 |
|
72 TBool iInitialized; |
|
73 TBool iActiveStarted; |
|
74 CKeyToolCommand* iHandler; |
|
75 CKeyToolParameters* iParam; |
|
76 CKeyToolController* iController; |
|
77 |
|
78 RFs iFs; |
|
79 CUnifiedKeyStore* iKeyStore; |
|
80 CActiveScheduler* iScheduler; |
|
81 }; |
|
82 |
|
83 #endif |