1 /* |
|
2 * Copyright (c) 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 "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: This file contains the keywords for the TestCombiner |
|
15 * module. |
|
16 * |
|
17 */ |
|
18 |
|
19 #ifndef TESTKEYWORDS_H |
|
20 #define TESTKEYWORDS_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <e32base.h> |
|
24 #include <StifTestInterface.h> |
|
25 |
|
26 // CONSTANTS |
|
27 // None |
|
28 |
|
29 // MACROS |
|
30 // None |
|
31 |
|
32 // DATA TYPES |
|
33 typedef TPtrC (*KeywordFunc)( TInt aKeyword ); |
|
34 |
|
35 // FUNCTION PROTOTYPES |
|
36 // None |
|
37 |
|
38 // FORWARD DECLARATIONS |
|
39 // None |
|
40 |
|
41 // CLASS DECLARATION |
|
42 |
|
43 // DESCRIPTION |
|
44 // Test Combiner Keyword class |
|
45 class TTCKeywords |
|
46 { |
|
47 public: // Enumerations |
|
48 // Keyword enum |
|
49 enum TKeywords |
|
50 { |
|
51 ETitle, |
|
52 ERun, |
|
53 ECancel, |
|
54 EPause, |
|
55 EResume, |
|
56 EComplete, |
|
57 ERequest, |
|
58 EWait, |
|
59 ERelease, |
|
60 ESet, |
|
61 EUnset, |
|
62 ETimeout, |
|
63 EPriority, |
|
64 EPrint, |
|
65 EAllocate, |
|
66 EFree, |
|
67 ERemote, |
|
68 ESendReceive, |
|
69 ECancelIfError, |
|
70 EMeasurement, |
|
71 ELoop, |
|
72 EEndLoop, |
|
73 EPauseCombiner, |
|
74 }; |
|
75 |
|
76 // run keyword optional arguments |
|
77 enum TRunOptArgs |
|
78 { |
|
79 EExpect, |
|
80 ETestid, |
|
81 EIni, |
|
82 ECategory, |
|
83 ECaseTimeout, |
|
84 ECaseTitle, |
|
85 EArgs, |
|
86 }; |
|
87 |
|
88 // pause keyword optional arguments |
|
89 enum TPauseOptArgs |
|
90 { |
|
91 ETime, |
|
92 }; |
|
93 |
|
94 // event keywords optional arguments |
|
95 enum TEventOptArgs |
|
96 { |
|
97 EState, |
|
98 }; |
|
99 |
|
100 // priorities |
|
101 enum TPriority |
|
102 { |
|
103 EPriHigh, |
|
104 EPriNormal, |
|
105 EPriLow, |
|
106 }; |
|
107 |
|
108 private: // Enumerations |
|
109 |
|
110 public: // Constructors and destructor |
|
111 |
|
112 public: // Constructors and destructor |
|
113 |
|
114 public: // New functions |
|
115 |
|
116 /** |
|
117 * Returns a string desrciptor corresponding to keyword number. |
|
118 */ |
|
119 static TPtrC Keyword( TInt aKeyword ); |
|
120 |
|
121 /** |
|
122 * Returns a string desrciptor corresponding to run keyword |
|
123 * optional argument number. |
|
124 */ |
|
125 static TPtrC RunOptArg( TInt aArg ); |
|
126 |
|
127 /** |
|
128 * Returns a string desrciptor corresponding to pause keyword |
|
129 * optional argument number. |
|
130 */ |
|
131 static TPtrC PauseOptArg( TInt aArg ); |
|
132 |
|
133 /** |
|
134 * Returns a string desrciptor corresponding to event keywords |
|
135 * optional argument number. |
|
136 */ |
|
137 static TPtrC EventOptArg( TInt aArg ); |
|
138 |
|
139 /** |
|
140 * Returns a string desrciptor corresponding to priority |
|
141 * enum value. |
|
142 */ |
|
143 static TPtrC Priority( TInt aArg ); |
|
144 |
|
145 /** |
|
146 * Returns a keyword enum corresponding to keyword |
|
147 * string descriptor. |
|
148 */ |
|
149 static TInt Parse( TDesC& aKeyword, KeywordFunc aFunc ); |
|
150 |
|
151 /** |
|
152 * Returns result category description. |
|
153 */ |
|
154 static TPtrC ResultCategory( TInt aArg ); |
|
155 |
|
156 /** |
|
157 * Returns result category type. |
|
158 */ |
|
159 static TFullTestResult::TCaseExecutionResult |
|
160 GetResultCategory( TDesC& aCategory ); |
|
161 |
|
162 public: // Functions from base classes |
|
163 |
|
164 protected: // New functions |
|
165 |
|
166 protected: // Functions from base classes |
|
167 |
|
168 private: // New functions |
|
169 |
|
170 public: // Data |
|
171 |
|
172 protected: // Data |
|
173 |
|
174 private: // Data |
|
175 |
|
176 public: // Friend classes |
|
177 |
|
178 protected: // Friend classes |
|
179 |
|
180 private: // Friend classes |
|
181 |
|
182 }; |
|
183 |
|
184 #endif // TESTKEYWORDS_H |
|
185 |
|
186 // End of File |
|