sl@0
|
1 |
/*
|
sl@0
|
2 |
* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
|
sl@0
|
3 |
* All rights reserved.
|
sl@0
|
4 |
* This component and the accompanying materials are made available
|
sl@0
|
5 |
* under the terms of the License "Eclipse Public License v1.0"
|
sl@0
|
6 |
* which accompanies this distribution, and is available
|
sl@0
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
sl@0
|
8 |
*
|
sl@0
|
9 |
* Initial Contributors:
|
sl@0
|
10 |
* Nokia Corporation - initial contribution.
|
sl@0
|
11 |
*
|
sl@0
|
12 |
* Contributors:
|
sl@0
|
13 |
*
|
sl@0
|
14 |
* Description:
|
sl@0
|
15 |
*
|
sl@0
|
16 |
*/
|
sl@0
|
17 |
|
sl@0
|
18 |
|
sl@0
|
19 |
#include "keytool_utils.h"
|
sl@0
|
20 |
#include "certtool_commands.h"
|
sl@0
|
21 |
#include "certtool_controller.h"
|
sl@0
|
22 |
|
sl@0
|
23 |
|
sl@0
|
24 |
/*static*/ CCertToolUsage* CCertToolUsage::NewLC(CCertToolController* aController)
|
sl@0
|
25 |
{
|
sl@0
|
26 |
CCertToolUsage* self = new (ELeave) CCertToolUsage(aController);
|
sl@0
|
27 |
CleanupStack::PushL(self);
|
sl@0
|
28 |
self->ConstructL();
|
sl@0
|
29 |
return self;
|
sl@0
|
30 |
}
|
sl@0
|
31 |
|
sl@0
|
32 |
/*static*/ CCertToolUsage* CCertToolUsage::NewL(CCertToolController* aController)
|
sl@0
|
33 |
{
|
sl@0
|
34 |
CCertToolUsage* self = CCertToolUsage::NewLC(aController);
|
sl@0
|
35 |
CleanupStack::Pop(self);
|
sl@0
|
36 |
return self;
|
sl@0
|
37 |
}
|
sl@0
|
38 |
|
sl@0
|
39 |
CCertToolUsage::CCertToolUsage(CCertToolController* aController) : CCertToolCommand(aController)
|
sl@0
|
40 |
{
|
sl@0
|
41 |
}
|
sl@0
|
42 |
|
sl@0
|
43 |
void CCertToolUsage::ConstructL()
|
sl@0
|
44 |
{
|
sl@0
|
45 |
}
|
sl@0
|
46 |
|
sl@0
|
47 |
CCertToolUsage::~CCertToolUsage()
|
sl@0
|
48 |
{
|
sl@0
|
49 |
}
|
sl@0
|
50 |
|
sl@0
|
51 |
void CCertToolUsage::RunL()
|
sl@0
|
52 |
{
|
sl@0
|
53 |
|
sl@0
|
54 |
}
|
sl@0
|
55 |
|
sl@0
|
56 |
void CCertToolUsage::DoCancel()
|
sl@0
|
57 |
{
|
sl@0
|
58 |
|
sl@0
|
59 |
}
|
sl@0
|
60 |
|
sl@0
|
61 |
void CCertToolUsage::DoCommandL(CUnifiedCertStore& /*aCertStore*/, CKeyToolParameters* aParam)
|
sl@0
|
62 |
{
|
sl@0
|
63 |
// Depending on parameters show the help!
|
sl@0
|
64 |
if (!aParam->iDefault)
|
sl@0
|
65 |
{
|
sl@0
|
66 |
// Display general usage!
|
sl@0
|
67 |
iController->DisplayLocalisedMsgL(R_CERTTOOL_USAGE);
|
sl@0
|
68 |
iController->DisplayLocalisedMsgL(R_CERTTOOL_USAGE2);
|
sl@0
|
69 |
iController->DisplayLocalisedMsgL(R_CERTTOOL_USAGE3);
|
sl@0
|
70 |
iController->DisplayLocalisedMsgL(R_CERTTOOL_USAGE4);
|
sl@0
|
71 |
return;
|
sl@0
|
72 |
}
|
sl@0
|
73 |
|
sl@0
|
74 |
if (!aParam->iDefault->Compare(_L("import")) )
|
sl@0
|
75 |
{
|
sl@0
|
76 |
iController->DisplayLocalisedMsgL(R_CERTTOOL_USAGE_IMPORT);
|
sl@0
|
77 |
iController->DisplayLocalisedMsgL(R_CERTTOOL_USAGE_IMPORT2);
|
sl@0
|
78 |
iController->DisplayLocalisedMsgL(R_CERTTOOL_USAGE_IMPORT3);
|
sl@0
|
79 |
iController->DisplayLocalisedMsgL(R_CERTTOOL_USAGE_IMPORT4);
|
sl@0
|
80 |
iController->DisplayLocalisedMsgL(R_CERTTOOL_USAGE_IMPORT5);
|
sl@0
|
81 |
iController->DisplayLocalisedMsgL(R_CERTTOOL_USAGE_IMPORT6);
|
sl@0
|
82 |
}
|
sl@0
|
83 |
else
|
sl@0
|
84 |
if (!aParam->iDefault->Compare(_L("list")) )
|
sl@0
|
85 |
{
|
sl@0
|
86 |
iController->DisplayLocalisedMsgL(R_CERTTOOL_USAGE_LIST);
|
sl@0
|
87 |
iController->DisplayLocalisedMsgL(R_CERTTOOL_USAGE_LIST2);
|
sl@0
|
88 |
iController->DisplayLocalisedMsgL(R_CERTTOOL_USAGE_LIST3);
|
sl@0
|
89 |
iController->DisplayLocalisedMsgL(R_CERTTOOL_USAGE_LIST4);
|
sl@0
|
90 |
}
|
sl@0
|
91 |
else
|
sl@0
|
92 |
if (!aParam->iDefault->Compare(_L("liststores")) )
|
sl@0
|
93 |
{
|
sl@0
|
94 |
iController->DisplayLocalisedMsgL(R_CERTTOOL_USAGE_LISTSTORES);
|
sl@0
|
95 |
}
|
sl@0
|
96 |
else
|
sl@0
|
97 |
if (!aParam->iDefault->Compare(_L("remove")) )
|
sl@0
|
98 |
{
|
sl@0
|
99 |
iController->DisplayLocalisedMsgL(R_CERTTOOL_USAGE_REMOVE);
|
sl@0
|
100 |
iController->DisplayLocalisedMsgL(R_CERTTOOL_USAGE_REMOVE2);
|
sl@0
|
101 |
}
|
sl@0
|
102 |
else
|
sl@0
|
103 |
if (!aParam->iDefault->Compare(_L("setapps")) )
|
sl@0
|
104 |
{
|
sl@0
|
105 |
iController->DisplayLocalisedMsgL(R_CERTTOOL_USAGE_SETAPPS);
|
sl@0
|
106 |
iController->DisplayLocalisedMsgL(R_CERTTOOL_USAGE_SETAPPS2);
|
sl@0
|
107 |
}
|
sl@0
|
108 |
else
|
sl@0
|
109 |
if (!aParam->iDefault->Compare(_L("addapps")) )
|
sl@0
|
110 |
{
|
sl@0
|
111 |
iController->DisplayLocalisedMsgL(R_CERTTOOL_USAGE_ADDAPPS);
|
sl@0
|
112 |
iController->DisplayLocalisedMsgL(R_CERTTOOL_USAGE_ADDAPPS2);
|
sl@0
|
113 |
}
|
sl@0
|
114 |
else
|
sl@0
|
115 |
if (!aParam->iDefault->Compare(_L("removeapps")) )
|
sl@0
|
116 |
{
|
sl@0
|
117 |
iController->DisplayLocalisedMsgL(R_CERTTOOL_USAGE_REMOVEAPPS);
|
sl@0
|
118 |
iController->DisplayLocalisedMsgL(R_CERTTOOL_USAGE_REMOVEAPPS2);
|
sl@0
|
119 |
}
|
sl@0
|
120 |
else
|
sl@0
|
121 |
if (!aParam->iDefault->Compare(_L("noninteractive")) )
|
sl@0
|
122 |
{
|
sl@0
|
123 |
iController->DisplayLocalisedMsgL(R_CERTTOOL_USAGE_NONINTERACTIVE);
|
sl@0
|
124 |
iController->DisplayLocalisedMsgL(R_CERTTOOL_USAGE_NONINTERACTIVE1);
|
sl@0
|
125 |
}
|
sl@0
|
126 |
else
|
sl@0
|
127 |
if ( !aParam->iDefault->Compare( _L("expiry") ) )
|
sl@0
|
128 |
{
|
sl@0
|
129 |
// iController->DisplayLocalisedMsgL(R_CERTTOOL_USAGE_EXPIRY);
|
sl@0
|
130 |
}
|
sl@0
|
131 |
else
|
sl@0
|
132 |
if ( !aParam->iDefault->Compare( _L("page") ) )
|
sl@0
|
133 |
{
|
sl@0
|
134 |
iController->DisplayLocalisedMsgL(R_CERTTOOL_USAGE_PAGE);
|
sl@0
|
135 |
iController->DisplayLocalisedMsgL(R_CERTTOOL_USAGE_PAGE2);
|
sl@0
|
136 |
}
|
sl@0
|
137 |
else
|
sl@0
|
138 |
{
|
sl@0
|
139 |
// Display general usage!
|
sl@0
|
140 |
iController->DisplayLocalisedMsgL(R_CERTTOOL_USAGE);
|
sl@0
|
141 |
iController->DisplayLocalisedMsgL(R_CERTTOOL_USAGE2);
|
sl@0
|
142 |
iController->DisplayLocalisedMsgL(R_CERTTOOL_USAGE3);
|
sl@0
|
143 |
iController->DisplayLocalisedMsgL(R_CERTTOOL_USAGE4);
|
sl@0
|
144 |
}
|
sl@0
|
145 |
}
|