|
1 // Copyright (c) 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 // Test transport object. May be used in place of the automatically-constructed |
|
15 // transport object from OCSP.DLL |
|
16 // Allows a file to be specified, the contents of which will be returned as the response. |
|
17 // |
|
18 // |
|
19 |
|
20 /** |
|
21 @file |
|
22 @internalTechnology |
|
23 */ |
|
24 |
|
25 #ifndef TEFPARSER_H_ |
|
26 #define TEFPARSER_H_ |
|
27 |
|
28 |
|
29 |
|
30 #include <e32base.h> |
|
31 #include <f32file.h> |
|
32 |
|
33 class CTOCSPLogger; |
|
34 |
|
35 class TEFparser |
|
36 { |
|
37 public: |
|
38 |
|
39 // Checks if the input test script is a .script file |
|
40 IMPORT_C static TBool FileType(const TDesC& aBuf); |
|
41 |
|
42 // Reads the file |
|
43 IMPORT_C static TInt ReadFileLC(RFs& aFs, const TDesC& aScriptFilepath, TPtrC& aScriptFileContents); |
|
44 |
|
45 // Searches and gets the first RUN_TESTSTEP from the .script file |
|
46 IMPORT_C static TPtrC GetRunTestStep(TPtrC& aBuf, const TDesC& aTag, TInt& aPos, TInt& aError); |
|
47 |
|
48 // Gets ini file name and sectionname from the RUN_TESTSTEp |
|
49 IMPORT_C static TInt GetIniFileInfo(TDesC& aBuf, TPtrC& aIniFileName, TPtrC& aIniSectionName); |
|
50 |
|
51 // Generates the ini file path from .script file path taken from command line |
|
52 IMPORT_C static TInt GetiniPath(TDesC& aBuf, const TDesC& aScriptPath, TDes& aIniFilePath); |
|
53 |
|
54 // Searches the .ini file with section name to fetch the setion data |
|
55 IMPORT_C static TInt GetSectionData(TDesC& aScriptFilepath, TPtrC& aSectiontag, TDesC16 &aTocspTestFile, RFs& aFs); |
|
56 |
|
57 // Trims data of its spaces and newline |
|
58 IMPORT_C static TPtrC Trim(const TDesC& aBuf); |
|
59 |
|
60 // Gets the nth word from a data block |
|
61 IMPORT_C static TPtrC ParseNthElement(const TDesC& aBuf, TInt aWordPos); |
|
62 |
|
63 |
|
64 |
|
65 private: |
|
66 |
|
67 |
|
68 }; |
|
69 |
|
70 #endif /*TEFPARSER_H_*/ |