sl@0
|
1 |
/*
|
sl@0
|
2 |
* Copyright (c) 1998-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 |
@file
|
sl@0
|
21 |
@internalTechnology
|
sl@0
|
22 |
*/
|
sl@0
|
23 |
|
sl@0
|
24 |
#ifndef __T_UNIFIEDCERTSTOREREMOVE_H__
|
sl@0
|
25 |
#define __T_UNIFIEDCERTSTOREREMOVE_H__
|
sl@0
|
26 |
|
sl@0
|
27 |
#include "t_certstoreactions.h"
|
sl@0
|
28 |
class CDeleteCertificate : public CSubscriberAction
|
sl@0
|
29 |
{
|
sl@0
|
30 |
|
sl@0
|
31 |
public:
|
sl@0
|
32 |
static CTestAction* NewL(RFs& aFs, CConsoleBase& aConsole, Output& aOut,
|
sl@0
|
33 |
const TTestActionSpec& aTestActionSpec);
|
sl@0
|
34 |
~CDeleteCertificate();
|
sl@0
|
35 |
|
sl@0
|
36 |
public:
|
sl@0
|
37 |
virtual void PerformAction(TRequestStatus& aStatus);
|
sl@0
|
38 |
virtual void PerformCancel();
|
sl@0
|
39 |
virtual void Reset();
|
sl@0
|
40 |
|
sl@0
|
41 |
protected:
|
sl@0
|
42 |
CDeleteCertificate(RFs& aFs, CConsoleBase& aConsole, Output& aOut);
|
sl@0
|
43 |
void GetCerts(TRequestStatus& aStatus);
|
sl@0
|
44 |
void DeleteCert(TRequestStatus& aStatus);
|
sl@0
|
45 |
void ConstructL(const TTestActionSpec& aTestActionSpec);
|
sl@0
|
46 |
void DoReportAction();
|
sl@0
|
47 |
void DoCheckResult(TInt aError);
|
sl@0
|
48 |
TBool CheckCertType( CCTCertInfo& aCertInfo);
|
sl@0
|
49 |
|
sl@0
|
50 |
protected:
|
sl@0
|
51 |
enum TDeleteCertState
|
sl@0
|
52 |
{
|
sl@0
|
53 |
EIdle,
|
sl@0
|
54 |
EGettingCerts,
|
sl@0
|
55 |
EDeletingCert,
|
sl@0
|
56 |
ECheckNotification,
|
sl@0
|
57 |
EFinished
|
sl@0
|
58 |
};
|
sl@0
|
59 |
|
sl@0
|
60 |
protected:
|
sl@0
|
61 |
TDeleteCertState iState;
|
sl@0
|
62 |
TCertLabel iCertLabel;
|
sl@0
|
63 |
RMPointerArray<CCTCertInfo> iCertInfos;
|
sl@0
|
64 |
CCTCertInfo* iCertInfoToDelete;
|
sl@0
|
65 |
CCertAttributeFilter* iFilter;
|
sl@0
|
66 |
TBool iDeleteAllCerts;
|
sl@0
|
67 |
HBufC8* iCertDeleteType;
|
sl@0
|
68 |
};
|
sl@0
|
69 |
|
sl@0
|
70 |
class CDeleteRetrieveCertificate : public CSubscriberAction
|
sl@0
|
71 |
{
|
sl@0
|
72 |
public:
|
sl@0
|
73 |
virtual void PerformAction(TRequestStatus& aStatus);
|
sl@0
|
74 |
virtual void PerformCancel();
|
sl@0
|
75 |
virtual void Reset();
|
sl@0
|
76 |
|
sl@0
|
77 |
protected:
|
sl@0
|
78 |
CDeleteRetrieveCertificate(RFs& aFs, CConsoleBase& aConsole, Output& aOut);
|
sl@0
|
79 |
virtual void GetCerts(TRequestStatus& aStatus) = 0;
|
sl@0
|
80 |
virtual void RetrieveCerts(TRequestStatus& aStatus) = 0;
|
sl@0
|
81 |
virtual void DeleteCert(TRequestStatus& aStatus) = 0;
|
sl@0
|
82 |
|
sl@0
|
83 |
protected:
|
sl@0
|
84 |
enum TDeleteCertState
|
sl@0
|
85 |
{
|
sl@0
|
86 |
EIdle,
|
sl@0
|
87 |
EGettingCerts,
|
sl@0
|
88 |
EDeletingCert,
|
sl@0
|
89 |
ECheckNotification,
|
sl@0
|
90 |
EFinished
|
sl@0
|
91 |
};
|
sl@0
|
92 |
|
sl@0
|
93 |
protected:
|
sl@0
|
94 |
TDeleteCertState iState;
|
sl@0
|
95 |
TCertLabel iCertLabel;
|
sl@0
|
96 |
RPointerArray<HBufC8>* iCertlisted;
|
sl@0
|
97 |
RMPointerArray<CCTCertInfo> iCertInfos;
|
sl@0
|
98 |
CCTCertInfo* iCertInfoToDelete;
|
sl@0
|
99 |
CCTCertInfo* iCertInfoToRetrieve;
|
sl@0
|
100 |
TPtr8* iBuf;
|
sl@0
|
101 |
};
|
sl@0
|
102 |
|
sl@0
|
103 |
class CDeleteRetrieveCACertificate : public CDeleteRetrieveCertificate
|
sl@0
|
104 |
{
|
sl@0
|
105 |
public:
|
sl@0
|
106 |
static CTestAction* NewL(RFs& aFs, CConsoleBase& aConsole, Output& aOut,
|
sl@0
|
107 |
const TTestActionSpec& aTestActionSpec);
|
sl@0
|
108 |
~CDeleteRetrieveCACertificate();
|
sl@0
|
109 |
|
sl@0
|
110 |
private:
|
sl@0
|
111 |
CDeleteRetrieveCACertificate(RFs& aFs, CConsoleBase& aConsole, Output& aOut);
|
sl@0
|
112 |
void ConstructL(const TTestActionSpec& aTestActionSpec);
|
sl@0
|
113 |
void GetCerts(TRequestStatus& aStatus);
|
sl@0
|
114 |
void RetrieveCerts(TRequestStatus& aStatus);
|
sl@0
|
115 |
void DeleteCert(TRequestStatus& aStatus);
|
sl@0
|
116 |
void DoReportAction();
|
sl@0
|
117 |
void DoCheckResult(TInt aError);
|
sl@0
|
118 |
|
sl@0
|
119 |
private:
|
sl@0
|
120 |
CCertAttributeFilter* iFilter;
|
sl@0
|
121 |
};
|
sl@0
|
122 |
|
sl@0
|
123 |
class CDeleteRetrieveUserCertificate : public CDeleteRetrieveCertificate
|
sl@0
|
124 |
{
|
sl@0
|
125 |
public:
|
sl@0
|
126 |
static CTestAction* NewL(RFs& aFs, CConsoleBase& aConsole, Output& aOut,
|
sl@0
|
127 |
const TTestActionSpec& aTestActionSpec);
|
sl@0
|
128 |
~CDeleteRetrieveUserCertificate();
|
sl@0
|
129 |
private:
|
sl@0
|
130 |
CDeleteRetrieveUserCertificate(RFs& aFs, CConsoleBase& aConsole, Output& aOut);
|
sl@0
|
131 |
void ConstructL(const TTestActionSpec& aTestActionSpec);
|
sl@0
|
132 |
void GetCerts(TRequestStatus& aStatus);
|
sl@0
|
133 |
void RetrieveCerts(TRequestStatus& aStatus);
|
sl@0
|
134 |
void DeleteCert(TRequestStatus& aStatus);
|
sl@0
|
135 |
void DoReportAction();
|
sl@0
|
136 |
void DoCheckResult(TInt aError);
|
sl@0
|
137 |
|
sl@0
|
138 |
private:
|
sl@0
|
139 |
CCertAttributeFilter* iFilter;
|
sl@0
|
140 |
};
|
sl@0
|
141 |
|
sl@0
|
142 |
#endif
|
sl@0
|
143 |
|