|
1 // Copyright (c) 2002-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 // $Header$ |
|
15 // GT0149 Applications Protocol Integration Test Harness |
|
16 // blank application |
|
17 // created by: mark j davey |
|
18 // mjd systems solutions ltd |
|
19 // mark@mjdss.com |
|
20 // GT0149 System Info and Defintions |
|
21 // by mjd |
|
22 // |
|
23 // |
|
24 |
|
25 #ifndef __GT0149_H__ |
|
26 #define __GT0149_H__ |
|
27 |
|
28 //---------------------------------------------------------------------------- |
|
29 // Text to welcome a user |
|
30 |
|
31 _LIT(KTHAWelcome, "Test Harness Application"); |
|
32 |
|
33 //---------------------------------------------------------------------------- |
|
34 // Version Ident String |
|
35 |
|
36 _LIT(KTHAVersionIdent, "1.01"); |
|
37 |
|
38 //---------------------------------------------------------------------------- |
|
39 // Defined command line flags |
|
40 // -s = script to execute |
|
41 // -c = console required once script executed |
|
42 // -d = debug mode on (log to console as well) |
|
43 |
|
44 _LIT(KControlFlagSeparator, "-"); |
|
45 _LIT(KFileNameExtensionFlag, "."); |
|
46 |
|
47 // specify the required script |
|
48 _LIT(KControlFlagRequiredScript, "-s"); |
|
49 |
|
50 // if script specified, then provide console once completed |
|
51 _LIT(KControlFlagRequireConsole, "-c"); |
|
52 |
|
53 // provide console for debugging purposes (even during script) |
|
54 _LIT(KControlFlagDebugViaConsole, "-d"); |
|
55 |
|
56 //---------------------------------------------------------------------------- |
|
57 // Other Literals |
|
58 |
|
59 _LIT(KTxtNewLine, "\r\n"); |
|
60 _LIT(KTHAWelcomeMessage, "\r\nWelcome to the Integration Test Environment\r\n"); |
|
61 |
|
62 //----------------------------------------------------------------------------- |
|
63 // CONSTANTS |
|
64 |
|
65 //----------------------------------------------------------------------------- |
|
66 // New line separator in text output |
|
67 |
|
68 _LIT( TFR_KTxtNewLine, "\r\n"); |
|
69 |
|
70 //----------------------------------------------------------------------------- |
|
71 // Default command prompt |
|
72 |
|
73 _LIT(THA_CommandPrompt, "THA:> "); |
|
74 |
|
75 //---------------------------------------------------------------------------- |
|
76 // Assign characters and separators: |
|
77 |
|
78 _LIT(KTxtAssign, "="); |
|
79 _LIT(KTxtAddition, "+="); |
|
80 _LIT(KTxtSetFrom, ":="); // +TVi |
|
81 _LIT(KTxtListSeparator, ","); |
|
82 _LIT(KTxtCapSeparator, ":"); |
|
83 _LIT(KTxtValueSeparator, "&"); |
|
84 |
|
85 //---------------------------------------------------------------------------- |
|
86 // Boolean values: |
|
87 |
|
88 _LIT(KTxtFalse, "FALSE"); |
|
89 _LIT(KTxtTrue, "TRUE"); |
|
90 |
|
91 //---------------------------------------------------------------------------- |
|
92 // Comparison Operator values: |
|
93 |
|
94 enum TComparisonOperators |
|
95 { |
|
96 TCO_Equals, |
|
97 TCO_NotEqual, |
|
98 TCO_GreaterThan, |
|
99 TCO_LessThan, |
|
100 TCO_GreaterThanEq, |
|
101 TCO_LessThanEq, |
|
102 TCO_MaxComparisonOperators |
|
103 }; |
|
104 |
|
105 _LIT(KTxtEquals, "=="); |
|
106 _LIT(KTxtNotEqual, "!="); |
|
107 _LIT(KTxtGreaterThan, ">"); |
|
108 _LIT(KTxtLessThan, "<"); |
|
109 _LIT(KTxtGreaterThanEq, ">="); |
|
110 _LIT(KTxtLessThanEq, "<="); |
|
111 |
|
112 _LIT(KCompResult, "Comparison returns %d\r\n"); |
|
113 |
|
114 //---------------------------------------------------------------------------- |
|
115 // Log mode values: |
|
116 |
|
117 _LIT( KTxtLogALL, "ALL"); |
|
118 _LIT( KTxtLogNONE, "NONE"); |
|
119 _LIT( KTxtLogCOMMENTS, "COMMENTS"); |
|
120 _LIT( KTxtLogCOMMANDS, "COMMANDS"); |
|
121 _LIT( KTxtLogCASES, "CASES"); |
|
122 |
|
123 //----------------------------------------------------------------------------- |
|
124 |
|
125 _LIT(KTxtNone, "NONE"); |
|
126 |
|
127 //----------------------------------------------------------------------------- |
|
128 // Framework command phrases |
|
129 |
|
130 _LIT(THA_TxtCmdRemark, "#*"); |
|
131 _LIT(THA_TxtCmdComment, "//*"); |
|
132 |
|
133 _LIT(THA_TxtCmdTrace, "TRACE"); |
|
134 _LIT(THA_TxtCmdTraceHelp, "No help available"); |
|
135 |
|
136 _LIT(THA_TxtCmdLog, "LOG"); |
|
137 _LIT(THA_TxtCmdLogHelp, "LOG [ALL] [CASES | COMMENTS | COMMANDS]"); |
|
138 |
|
139 _LIT(THA_TxtCmdVersion, "VER"); |
|
140 _LIT(THA_TxtCmdVersionHelp, "Lists current THA version ident"); |
|
141 |
|
142 // this forces a listing of all commands defined... |
|
143 _LIT(THA_TxtCmdListAll, "?"); |
|
144 _LIT(THA_TxtCmdListAllHelp, "Lists all defined commands with help"); |
|
145 |
|
146 _LIT(THA_TxtCmdExit, "EXIT"); |
|
147 _LIT(THA_TxtCmdQuit, "QUIT"); |
|
148 _LIT(THA_TxtCmdStop, "STOP"); |
|
149 |
|
150 _LIT(THA_TxtCmdEchoMode, "ECHO"); |
|
151 |
|
152 _LIT(THA_TxtCmdPrint, "PRINT"); |
|
153 _LIT(THA_TxtCmdPrintHelp, "PRINT directs output to emulator or logfile"); |
|
154 |
|
155 _LIT(THA_TxtCmdCheckMode, "CHECK"); |
|
156 |
|
157 _LIT(THA_TxtCmdPause, "PAUSE"); |
|
158 |
|
159 _LIT(THA_TxtCmdHold, "HOLD"); |
|
160 |
|
161 _LIT(THA_TxtCmdSetPrompt, "PROMPT"); |
|
162 |
|
163 _LIT(THA_TxtCmdSetPath, "PATH"); |
|
164 |
|
165 _LIT(THA_TxtCmdCall, "CALL"); |
|
166 _LIT(THA_TxtCmdCallHelp, "Execute a script file"); |
|
167 |
|
168 _LIT(THA_TxtCmdReturn, "RETURN"); |
|
169 _LIT(THA_TxtCmdLogPath, "LOG PATH"); |
|
170 _LIT(THA_TxtCmdLogFile, "LOG FILE"); |
|
171 _LIT(THA_TxtCmdEndLog, "END LOG"); |
|
172 |
|
173 // to provide the ability to execute scripts from console |
|
174 //_LIT(THA_TxtCmdScript, "SCRIPT"); |
|
175 //_LIT(THA_TxtCmdScriptHelp, "Execute a script directly. Nb setting PATH might be helpful!"); |
|
176 |
|
177 // variable definition |
|
178 _LIT(THA_TxtCmdDefine, "DEFINE"); |
|
179 _LIT(THA_TxtCmdDefineHelp, "Define variables. DEFINE <variable> or DEFINE (lists all)"); |
|
180 |
|
181 // new command |
|
182 _LIT(THA_TxtCmdIf, "IF"); |
|
183 _LIT(THA_TxtCmdIfS, "IF*"); |
|
184 _LIT(THA_TxtCmdIfHelp, "IF <variable OP variable>. Performs a test on operands\r\n"); |
|
185 |
|
186 // new command (to complement the above IF!) |
|
187 _LIT(THA_TxtCmdElse, "ELSE"); |
|
188 _LIT(THA_TxtCmdElseHelp, "ELSE follows a failed IF evaluation (see $LastResult$)\r\n"); |
|
189 |
|
190 // new command (to complement the above IF!) |
|
191 _LIT(THA_TxtCmdEndIf, "ENDIF"); |
|
192 _LIT(THA_TxtCmdEndIfHelp, "ENDIF closes an IF block\r\n"); |
|
193 |
|
194 //---------------------------------------------------------------------------- |
|
195 // Miscellaneous [e.g. CASE and SELECT] commands |
|
196 |
|
197 _LIT(KTxtCase, "CASE"); |
|
198 _LIT(KTxtEndCase, "END CASE"); |
|
199 _LIT(KTxtCmdSelect, "SELECT CASES"); |
|
200 |
|
201 //---------------------------------------------------------------------------- |
|
202 // Framework command identifiers. The identifiers from 0 to the |
|
203 // TFR_KCmdCustomized - 1 have been reserved for the present and |
|
204 // future needs of the framework. Please do not overload them!! |
|
205 |
|
206 enum THA_FRAMEWORK |
|
207 { |
|
208 THA_KCmdListAll, |
|
209 THA_KCmdRemark, |
|
210 THA_KCmdComment, |
|
211 THA_KCmdExit, |
|
212 THA_KCmdEchoMode, |
|
213 THA_KCmdPrint, |
|
214 THA_KCmdCheckMode, |
|
215 THA_KCmdPause, |
|
216 THA_KCmdHold, |
|
217 THA_KCmdSetPrompt, |
|
218 THA_KCmdSetPath, |
|
219 THA_KCmdCall, |
|
220 THA_KCmdReturn, |
|
221 THA_KCmdLogPath, |
|
222 THA_KCmdLogFile, |
|
223 THA_KCmdEndLog, |
|
224 THA_KCmdDefine, |
|
225 THA_KCmdHelp, |
|
226 |
|
227 // these are associated with the IF command - but do not require |
|
228 // result to be recorded |
|
229 THA_KCmdElse, |
|
230 THA_KCmdEndIf, |
|
231 THA_KCmdMaxStandard, |
|
232 |
|
233 // commands below this will have their 'result' recorded |
|
234 THA_KCmdIf, |
|
235 |
|
236 // add new identifers above list line |
|
237 THA_KMaxCmdCustomized |
|
238 }; |
|
239 |
|
240 // Maximum number of arguments is a command file call. |
|
241 // There is no point in defining this one so very big. |
|
242 #define TFR_MAX_CALL_ARGUMENTS 16 |
|
243 |
|
244 //---------------------------------------------------------------------------- |
|
245 // Error messages |
|
246 //---------------------------------------------------------------------------- |
|
247 |
|
248 _LIT(KFmtErrInvalidCmd, "Error: Invalid %S command"); |
|
249 _LIT(KTxtErrNoAddition, "Error: \"+=\" not allowed"); |
|
250 _LIT(KTxtErrNoSetFrom, "Error: \":=\" not allowed"); // +TVi |
|
251 _LIT(KTxtErrValueMissing, "Error: Value missing"); |
|
252 _LIT(KTxtErrInvalidList, "Error: Invalid list"); |
|
253 _LIT(KTxtErrInvalidText, "Error: Invalid text (hyphen missing)"); |
|
254 _LIT(KTxtErrInvalidHexa, "Error: Invalid hexadecimal format"); |
|
255 _LIT(KTxtErrInvalidBool, "Error: Invalid value, should be FALSE or TRUE"); |
|
256 _LIT(KTxtErrInvalidBool2, "Error: Invalid value, should be FALSE, TRUE or NONE"); |
|
257 _LIT(KTxtErrInvalidSessType, "Error: Invalid value, should be CO"); |
|
258 _LIT(KTxtErrInvalidMethod, "Error: Value should be GET, OPTIONS, HEAD, DELETE, TRACE, POST, PUT or number"); |
|
259 _LIT(KTxtErrAliasAddr, "Error: Alias addr must be: [bearer] & [port] & [addr]"); |
|
260 _LIT(KTxtErrItemTooLong, "Error: Too long item"); |
|
261 _LIT(KTxtErrAddCapFailed, "Error: Capability adding failed (e.g.code page)"); |
|
262 _LIT(KFmtErrRubbishAtEnd, "Error: Rubbish at end: %S"); |
|
263 _LIT(KFmtErrNameTooLong, "Error: Too long name: %S"); |
|
264 _LIT(KFmtErrInvalidName, "Error: Invalid name: %S"); |
|
265 _LIT(KFmtErrMissing, "Error: \"%S\" missing"); |
|
266 _LIT(KFmtErrInvalidNbr, "Error: Invalid number: %S"); |
|
267 _LIT(KFmtErrInvalidBearer, "Error: Invalid bearer: %S (should be IP, SMS7, SMS, WAPSMS7, WAPSMS or ALL)"); |
|
268 _LIT(KFmtErrInvalidCapName, "Error: Unknown capability: %S"); |
|
269 _LIT(KFmtErrBulkEnc, "Error: Invalid bulk encryption algorithm: %S"); |
|
270 _LIT(KFmtErrMac, "Error: Invalid MAC algorithm: %S"); |
|
271 _LIT(KFmtErrKeyAlgorithm, "Error: Invalid key exchange algorithm: %S"); |
|
272 _LIT(KFmtErrIdType, "Error: Invalid id type: %S"); |
|
273 _LIT(KTxtErrSequenceNbrMode, "Error: Invalid value, should be NOTUSED, IMPLICIT, EXPLICIT or NONE"); |
|
274 _LIT(KTxtErrUnknownName, "Error: Name does not exist"); |
|
275 _LIT(KTxtWarnNameExists, "Warning: Name already exists"); |
|
276 _LIT(KTxtErrOpenFailed, "Error: Opening session failed"); |
|
277 _LIT(KFmtErrGetFile, "Error: Failed to get file: %S"); // +TVi |
|
278 _LIT(KTxtEmpty, ""); |
|
279 _LIT(KTxtErrConnectFailed, "Error: Connect failed"); |
|
280 |
|
281 |
|
282 _LIT(THA_KErrInvalidOptr, "Error: comparison operator [%S] is not recognized or supported\r\n"); |
|
283 _LIT(THA_KErrParameterLong, "Error: parameter [%S] is of invalid length (<1||>16)\r\n"); |
|
284 |
|
285 // Framework's lexical terms |
|
286 _LIT( TFR_KTxtTermOn , "ON" ); |
|
287 _LIT( TFR_KTxtTermOff , "OFF"); |
|
288 _LIT( TFR_KTxtTermYes , "YES" ); |
|
289 _LIT( TFR_KTxtTermNo , "NO"); |
|
290 _LIT( TFR_KTxtTermTrue , "TRUE" ); |
|
291 _LIT( TFR_KTxtTermFalse , "FALSE"); |
|
292 |
|
293 |
|
294 // ### |
|
295 // ### Framework's messages will come come here later |
|
296 // ### |
|
297 // ### ... |
|
298 |
|
299 |
|
300 // Notification i.e. plain messages |
|
301 _LIT( TFR_KTxtMsgPressAnyKey, "Press any key"); |
|
302 _LIT( TFR_KTxtMsgRunAborted, "- R U N A B O R T E D -\r\n"); |
|
303 _LIT( TFR_KTxtMsgRunStopped, "- R U N S T O P P E D -\r\n"); |
|
304 _LIT( TFR_KTxtMsgIsNSU, " is not supported"); |
|
305 _LIT( TFR_KTxtMsgIsNAV, " is not available"); |
|
306 |
|
307 // Notification i.e. message formats |
|
308 _LIT( TFR_KFmtMsgSorryS, "Sorry: %S"); |
|
309 _LIT( TFR_KFmtMsgSorrySS, "Sorry: %S %S"); |
|
310 _LIT( TFR_KExecuteScript, "Executing %S\r\n"); |
|
311 |
|
312 // Error messages |
|
313 _LIT( TFR_KTxtErrPrintOflo , "Error: too long text to print out\r\n"); |
|
314 _LIT( TFR_KTxtErrRecursiveTags, "Error: recursive tag definitions?\r\n"); |
|
315 _LIT( TFR_KTxtErrTooLongCmd , "Error: command is too long to handle\r\n"); |
|
316 _LIT( TFR_KTxtErrUnknownCmd , "Error: unknown or misspelled command\r\n"); |
|
317 |
|
318 // Error message formats |
|
319 _LIT( TFR_KFmtErrBadCmd , "Error: illegal or misspelled %S command\r\n"); |
|
320 _LIT( TFR_KFmtErrFailed , "Error: %S failed (%d)\r\n"); |
|
321 _LIT( TFR_KFmtErrParams , "Error: erroneous %S command, bad params\r\n"); |
|
322 _LIT( TFR_KFmtErrMissingParams, "Error: erroneous %S command, missing params\r\n"); |
|
323 |
|
324 _LIT(THA_KFmtErrFileNotFound, "Error: file %S not found\r\n"); |
|
325 _LIT(TFR_KInIFCmdAlready, "Error: An IF command is already being processed [%S]\r\n"); |
|
326 _LIT(THA_KFmtErrIAPVal, "Error: [%S] is not a valid IAP value\r\n"); |
|
327 |
|
328 //---------------------------------------------------------------------------- |
|
329 // Dump file names |
|
330 //---------------------------------------------------------------------------- |
|
331 |
|
332 // extension and default name for dump files |
|
333 _LIT(KTxtDumpFileExtension, ".dmp"); |
|
334 _LIT(KTxtDumpFileDefault, "unnamed"); |
|
335 _LIT(KTxtDumpFileSeparator, "-"); |
|
336 |
|
337 #endif // __GT0149_H__ |
|
338 |
|
339 //---------------------------------------------------------------------------- |
|
340 //---------------------------------------------------------------------------- |
|
341 // End of File |
|
342 //---------------------------------------------------------------------------- |
|
343 //---------------------------------------------------------------------------- |