|
1 // Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 /** |
|
17 @file |
|
18 @internalTechnology |
|
19 */ |
|
20 |
|
21 #ifndef __TOCSP_MAIN_H__ |
|
22 #define __TOCSP_MAIN_H__ |
|
23 |
|
24 #include <e32base.h> |
|
25 #include <f32file.h> |
|
26 |
|
27 #include "TEFparser.h" |
|
28 |
|
29 /** UID for setting cert applicability. */ |
|
30 |
|
31 const TInt KTOCSP_UID = 0x1000A405; |
|
32 |
|
33 class CTOCSPLogger; |
|
34 class CTOCSPResult; |
|
35 class CTOCSPScript; |
|
36 class CCertUtils; |
|
37 |
|
38 /** |
|
39 * Runs OCSP test script. |
|
40 */ |
|
41 |
|
42 class CTOCSPMain : public CActive |
|
43 { |
|
44 public: |
|
45 |
|
46 static CTOCSPMain* NewLC(const TDesC& aScriptFile, const TDesC& aLogFile); |
|
47 ~CTOCSPMain(); |
|
48 |
|
49 void RunNormalTestsL(); |
|
50 void RunOOMTestsL(); |
|
51 const TPtrC& getSectionData() { return iSectionData; }; |
|
52 |
|
53 TBool getScriptFlag() { return iScriptFlag; }; |
|
54 |
|
55 private: |
|
56 |
|
57 enum TState |
|
58 { |
|
59 ERunningNormalTest, |
|
60 ERunningOOMTest |
|
61 }; |
|
62 |
|
63 CTOCSPMain(const TDesC& aScriptFile); |
|
64 void ConstructL(const TDesC& aLogFile); |
|
65 void RunTestsL(TState aState); |
|
66 |
|
67 void FinishedNormalTestL(); |
|
68 void StartNextOOMTestL(); |
|
69 void FinishedOOMTestL(); |
|
70 TBool CheckOOMTestResultL(); |
|
71 void ResetTestL(); |
|
72 void ReportErrorL(); |
|
73 |
|
74 // Implementation of CActive methods |
|
75 void RunL(); |
|
76 TInt RunError(TInt aError); |
|
77 void DoCancel(); |
|
78 |
|
79 TState iState; |
|
80 RFs iFs; |
|
81 CCertUtils* iCertUtils; |
|
82 const TDesC& iScriptFile; |
|
83 CTOCSPLogger* iLog; |
|
84 TInt iTransaction; |
|
85 TInt iFailPoint; |
|
86 TInt iError; |
|
87 CTOCSPResult* iResult; |
|
88 CTOCSPScript* iTest; |
|
89 TInt iCompletions; |
|
90 |
|
91 TPtrC iSectionData; |
|
92 TBool iScriptFlag; |
|
93 TBuf16<256> iTocspTestFile; |
|
94 }; |
|
95 |
|
96 #endif |