sl@0
|
1 |
/*
|
sl@0
|
2 |
* Copyright (c) 2005-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 |
|
sl@0
|
20 |
|
sl@0
|
21 |
/**
|
sl@0
|
22 |
@file
|
sl@0
|
23 |
@internalTechnology
|
sl@0
|
24 |
*/
|
sl@0
|
25 |
|
sl@0
|
26 |
|
sl@0
|
27 |
#ifndef __T_CERTSTOREACTIONSCLIENT_H__
|
sl@0
|
28 |
#define __T_CERTSTOREACTIONSCLIENT_H__
|
sl@0
|
29 |
|
sl@0
|
30 |
#include "t_certstoreactions.h"
|
sl@0
|
31 |
|
sl@0
|
32 |
class CInitCertificateAppInfoManager : public CCertStoreTestAction
|
sl@0
|
33 |
{
|
sl@0
|
34 |
public:
|
sl@0
|
35 |
static CTestAction* NewL(RFs &aFs,
|
sl@0
|
36 |
CConsoleBase& aConsole, Output& aOut, const TTestActionSpec& aTestActionSpec);
|
sl@0
|
37 |
static CTestAction* NewLC(RFs &aFs,
|
sl@0
|
38 |
CConsoleBase& aConsole, Output& aOut, const TTestActionSpec& aTestActionSpec);
|
sl@0
|
39 |
virtual ~CInitCertificateAppInfoManager();
|
sl@0
|
40 |
virtual void PerformAction(TRequestStatus& aStatus);
|
sl@0
|
41 |
virtual void PerformCancel();
|
sl@0
|
42 |
virtual void Reset();
|
sl@0
|
43 |
|
sl@0
|
44 |
private:
|
sl@0
|
45 |
CInitCertificateAppInfoManager(RFs &aFs,
|
sl@0
|
46 |
CConsoleBase& aConsole, Output& aOut);
|
sl@0
|
47 |
void ConstructL(const TTestActionSpec& aTestActionSpec);
|
sl@0
|
48 |
|
sl@0
|
49 |
void HandleEInit();
|
sl@0
|
50 |
|
sl@0
|
51 |
void DoReportAction();
|
sl@0
|
52 |
void DoCheckResult(TInt aError);
|
sl@0
|
53 |
|
sl@0
|
54 |
private:
|
sl@0
|
55 |
enum TState
|
sl@0
|
56 |
{
|
sl@0
|
57 |
EInit,
|
sl@0
|
58 |
EFinished
|
sl@0
|
59 |
};
|
sl@0
|
60 |
|
sl@0
|
61 |
private:
|
sl@0
|
62 |
TState iState;
|
sl@0
|
63 |
RFs& iFs;
|
sl@0
|
64 |
};
|
sl@0
|
65 |
|
sl@0
|
66 |
class CDeleteCertificateAppInfoManager : public CCertStoreTestAction
|
sl@0
|
67 |
{
|
sl@0
|
68 |
public:
|
sl@0
|
69 |
static CTestAction* NewL(RFs& aFs, CConsoleBase& aConsole, Output& aOut,
|
sl@0
|
70 |
const TTestActionSpec& aTestActionSpec);
|
sl@0
|
71 |
~CDeleteCertificateAppInfoManager();
|
sl@0
|
72 |
virtual void PerformAction(TRequestStatus& aStatus);
|
sl@0
|
73 |
virtual void PerformCancel();
|
sl@0
|
74 |
virtual void Reset();
|
sl@0
|
75 |
|
sl@0
|
76 |
private:
|
sl@0
|
77 |
CDeleteCertificateAppInfoManager(RFs& aFs, CConsoleBase& aConsole, Output& aOut);
|
sl@0
|
78 |
void ConstructL(const TTestActionSpec& aTestActionSpec);
|
sl@0
|
79 |
void DoReportAction();
|
sl@0
|
80 |
void DoCheckResult(TInt aError);
|
sl@0
|
81 |
|
sl@0
|
82 |
private:
|
sl@0
|
83 |
enum TState
|
sl@0
|
84 |
{
|
sl@0
|
85 |
EDelete,
|
sl@0
|
86 |
EFinished
|
sl@0
|
87 |
};
|
sl@0
|
88 |
|
sl@0
|
89 |
private:
|
sl@0
|
90 |
TState iState;
|
sl@0
|
91 |
};
|
sl@0
|
92 |
|
sl@0
|
93 |
/**
|
sl@0
|
94 |
* Client management tests
|
sl@0
|
95 |
*/
|
sl@0
|
96 |
class CAddClient : public CCertStoreTestAction
|
sl@0
|
97 |
{
|
sl@0
|
98 |
public:
|
sl@0
|
99 |
static CTestAction* NewL(RFs& aFs, CConsoleBase& aConsole, Output& aOut,
|
sl@0
|
100 |
const TTestActionSpec& aTestActionSpec);
|
sl@0
|
101 |
~CAddClient();
|
sl@0
|
102 |
virtual void PerformAction(TRequestStatus& aStatus);
|
sl@0
|
103 |
virtual void PerformCancel();
|
sl@0
|
104 |
virtual void Reset();
|
sl@0
|
105 |
|
sl@0
|
106 |
private:
|
sl@0
|
107 |
CAddClient(RFs& aFs, CConsoleBase& aConsole, Output& aOut);
|
sl@0
|
108 |
void ConstructL(const TTestActionSpec& aTestActionSpec);
|
sl@0
|
109 |
void DoReportAction();
|
sl@0
|
110 |
void DoCheckResult(TInt aError);
|
sl@0
|
111 |
|
sl@0
|
112 |
private:
|
sl@0
|
113 |
enum TState
|
sl@0
|
114 |
{
|
sl@0
|
115 |
EAdd,
|
sl@0
|
116 |
EFinished
|
sl@0
|
117 |
};
|
sl@0
|
118 |
|
sl@0
|
119 |
private:
|
sl@0
|
120 |
TState iState;
|
sl@0
|
121 |
TCertificateAppInfo* iClientInfo;
|
sl@0
|
122 |
};
|
sl@0
|
123 |
|
sl@0
|
124 |
class CGetClients : public CCertStoreTestAction
|
sl@0
|
125 |
{
|
sl@0
|
126 |
public:
|
sl@0
|
127 |
static CTestAction* NewL(RFs& aFs, CConsoleBase& aConsole, Output& aOut,
|
sl@0
|
128 |
const TTestActionSpec& aTestActionSpec);
|
sl@0
|
129 |
~CGetClients();
|
sl@0
|
130 |
virtual void PerformAction(TRequestStatus& aStatus);
|
sl@0
|
131 |
virtual void PerformCancel();
|
sl@0
|
132 |
virtual void Reset();
|
sl@0
|
133 |
|
sl@0
|
134 |
private:
|
sl@0
|
135 |
CGetClients(RFs& aFs, CConsoleBase& aConsole, Output& aOut);
|
sl@0
|
136 |
void ConstructL(const TTestActionSpec& aTestActionSpec);
|
sl@0
|
137 |
void DoReportAction();
|
sl@0
|
138 |
void DoCheckResult(TInt aError);
|
sl@0
|
139 |
|
sl@0
|
140 |
private:
|
sl@0
|
141 |
enum TState
|
sl@0
|
142 |
{
|
sl@0
|
143 |
EGet,
|
sl@0
|
144 |
EFinished
|
sl@0
|
145 |
};
|
sl@0
|
146 |
|
sl@0
|
147 |
private:
|
sl@0
|
148 |
TState iState;
|
sl@0
|
149 |
const RArray<TCertificateAppInfo>* iClients;
|
sl@0
|
150 |
RArray<TUid> iExpectedClients;
|
sl@0
|
151 |
};
|
sl@0
|
152 |
|
sl@0
|
153 |
class CRemoveClient : public CCertStoreTestAction
|
sl@0
|
154 |
{
|
sl@0
|
155 |
public:
|
sl@0
|
156 |
static CTestAction* NewL(RFs& aFs, CConsoleBase& aConsole, Output& aOut,
|
sl@0
|
157 |
const TTestActionSpec& aTestActionSpec);
|
sl@0
|
158 |
~CRemoveClient();
|
sl@0
|
159 |
virtual void PerformAction(TRequestStatus& aStatus);
|
sl@0
|
160 |
virtual void PerformCancel();
|
sl@0
|
161 |
virtual void Reset();
|
sl@0
|
162 |
|
sl@0
|
163 |
private:
|
sl@0
|
164 |
CRemoveClient(RFs& aFs, CConsoleBase& aConsole, Output& aOut);
|
sl@0
|
165 |
void ConstructL(const TTestActionSpec& aTestActionSpec);
|
sl@0
|
166 |
void DoReportAction();
|
sl@0
|
167 |
void DoCheckResult(TInt aError);
|
sl@0
|
168 |
|
sl@0
|
169 |
private:
|
sl@0
|
170 |
enum TState
|
sl@0
|
171 |
{
|
sl@0
|
172 |
ERemove,
|
sl@0
|
173 |
EFinished
|
sl@0
|
174 |
};
|
sl@0
|
175 |
|
sl@0
|
176 |
private:
|
sl@0
|
177 |
TState iState;
|
sl@0
|
178 |
TUid iUid;
|
sl@0
|
179 |
};
|
sl@0
|
180 |
|
sl@0
|
181 |
#endif
|