|
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 * CRetrieveCertificate class implementation |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 /** |
|
23 @file |
|
24 @internalTechnology |
|
25 */ |
|
26 |
|
27 #ifndef __T_RETRIEVE_H__ |
|
28 #define __T_RETRIEVE_H__ |
|
29 |
|
30 #include "t_certstoreactions.h" |
|
31 |
|
32 class CCertificate; |
|
33 |
|
34 /** |
|
35 * An action to test retrieving certificate data. |
|
36 */ |
|
37 class CRetrieveCertificate : public CCertStoreTestAction |
|
38 { |
|
39 public: |
|
40 static CTestAction* NewL(RFs& aFs, |
|
41 CConsoleBase& aConsole, |
|
42 Output& aOut, |
|
43 const TTestActionSpec& aTestActionSpec); |
|
44 ~CRetrieveCertificate(); |
|
45 |
|
46 virtual void PerformAction(TRequestStatus& aStatus); |
|
47 virtual void PerformCancel(); |
|
48 virtual void Reset(); |
|
49 virtual void DoReportAction(); |
|
50 virtual void DoPerformPostrequisite(TRequestStatus& aStatus); |
|
51 virtual void DoCheckResult(TInt aError); |
|
52 |
|
53 private: |
|
54 CRetrieveCertificate(RFs& aFs, CConsoleBase& aConsole, Output& aOut); |
|
55 void ConstructL(const TTestActionSpec& aTestActionSpec); |
|
56 |
|
57 void SetDeletable(const TDesC8& aDeletableString); |
|
58 void SetFormatL(const TDesC8& aFormatString); |
|
59 TBool ValidCertInfo(); |
|
60 void DoWriteResultL(); |
|
61 |
|
62 private: |
|
63 enum TState |
|
64 { |
|
65 EList, |
|
66 ERetrieveData, |
|
67 EParseData, |
|
68 ERetrieveCert, |
|
69 ECheckRetrieve, |
|
70 EFinished |
|
71 }; |
|
72 |
|
73 TState iState; |
|
74 TCertLabel iLabel; |
|
75 CCertAttributeFilter* iFilter; |
|
76 RMPointerArray<CCTCertInfo> iCertInfos; |
|
77 CCTCertInfo* iCertInfo; |
|
78 HBufC8* iData; |
|
79 TPtr8 iDataPtr; |
|
80 CCertificate* iCert; |
|
81 |
|
82 // for format and deletable attribute tests |
|
83 TCertificateFormat iFormat; |
|
84 TBool iDeletable; |
|
85 TBool iTestForDeletable; |
|
86 }; |
|
87 |
|
88 #endif |