|
1 /* |
|
2 * Copyright (c) 2005-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: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 #include "stdafx.h" |
|
22 #include "CSTATReturnCodes.h" |
|
23 |
|
24 static char *messages[] = |
|
25 { |
|
26 "General Failure.", // 0 |
|
27 "This version of STAT has expired, please contact Symbian Ltd.", |
|
28 "Unable to initialise time delay for the chosen platform.", |
|
29 "DLL initialisation failure.", |
|
30 "Interpreting STAT commands...", |
|
31 "Unable to convert commands to 8-bit.", |
|
32 "Unable to initialise Command Decoder.", |
|
33 "Unable to initialise Data Format Converter.", |
|
34 "Unable to initialise Directory Manager.", |
|
35 "Unable to initialise Return Codes.", |
|
36 "Unable to initialise COM library.", // 10 |
|
37 "Copying...", |
|
38 "Old images currently exist on the local machine.\r\n\r\nSelect YES to replace the images, NO to use the existing images, or CANCEL to stop.", |
|
39 "The script completed successfully", |
|
40 "Time delay set ok.", |
|
41 "ALMOST THERE...", |
|
42 "Error accessing registry.", |
|
43 "Error with logfile directory.", |
|
44 "Logfile directory found.", |
|
45 "Logfile name found, but it is not a directory! Please remove/rename.", |
|
46 "Error in logfile registry key value - directory cannot be created.", // 20 |
|
47 "Cannot create directory.", |
|
48 "Logfile directory is :", |
|
49 "Error with log file registry entry value.", |
|
50 "Error with log file creation.", |
|
51 "Log file created ok.", |
|
52 "Script opened ok.", |
|
53 "Unable to open script.", |
|
54 "Error with cleanup.", |
|
55 "NO END COMMAND FOUND IN SCRIPT FILE", |
|
56 "End of script file.", // 30 |
|
57 "Missing <B> or <E> command in script file", |
|
58 "Please Connect first!", |
|
59 "Unable to allocate memory for connection.", |
|
60 "Connected.", |
|
61 "Invalid # command.", |
|
62 "New image directory...", |
|
63 "Standard image directory created.", |
|
64 "Cannot find trailing comment syntax.", |
|
65 "Comment...", |
|
66 "Invalid '/' found.", // 40 |
|
67 "Unable to initialise log file class.", |
|
68 "Pause...", |
|
69 "Device information received.", |
|
70 "Trying for device info...", |
|
71 "Cannot retrieve device info.", |
|
72 "Machine information received.", |
|
73 "Trying for machine info...", |
|
74 "Cannot retrieve machine info.", |
|
75 "Key data...", |
|
76 "Key data sent.", // 50 |
|
77 "Key data sending failure.", |
|
78 "System key data...", |
|
79 "System key data sent.", |
|
80 "System key data sending failure.", |
|
81 "Combination key data...", |
|
82 "Combination key data sent.", |
|
83 "Combination key data sending failure.", |
|
84 "Invalid script combination key data.", |
|
85 "Application startup...", |
|
86 "Application data sent.", // 60 |
|
87 "Application data sending failure.", |
|
88 "File opening...", |
|
89 "File data sent.", |
|
90 "File data sending failure.", |
|
91 "File transfer...", |
|
92 "File transfer ok.", |
|
93 "File transfer failure.", |
|
94 "A Symbian Connect session could not be instantiated.", |
|
95 "File retrieval (move)...", |
|
96 "File retrieval ok.", // 70 |
|
97 "File retrieval failure.", |
|
98 "Touch screen...", |
|
99 "Touch screen ok.", |
|
100 "Touch screen failure.", |
|
101 "Attempting to close application...", |
|
102 "Closed application ok.", |
|
103 "Could not close application.", |
|
104 "Starting EShell...", |
|
105 "Started EShell ok.", |
|
106 "Starting EShell failure.", // 80 |
|
107 "Stopping EShell...", |
|
108 "Stopped EShell ok.", |
|
109 "Stopping EShell failure.", |
|
110 "Attempting to take screenshot...", |
|
111 "Screenshot taken ok.", |
|
112 "Screenshot failure.", |
|
113 "Attempting to move screenshot to PC...", |
|
114 "Screenshot moved.", |
|
115 "Screenshot moving failure.", |
|
116 "Screenshot conversion failure.", // 90 |
|
117 "Screenshot converted ok.", |
|
118 "Unable to initialise Image Verifier.", |
|
119 "Unable to delete reference images.", |
|
120 "Reference image loaded ok.", |
|
121 "Reference image loading failure.", |
|
122 "No more reference images left for verification.", |
|
123 "New image loaded OK", |
|
124 "New image loading failure.", |
|
125 "Image verification passed.", |
|
126 "Image verification failed.", // 100 |
|
127 "Attempting image verification...", |
|
128 "Unable to create new image directory.", |
|
129 "No reference images! Verification disabled.", |
|
130 "Invalid touch screen command.", |
|
131 "Key hold command...", |
|
132 "Key hold ok.", |
|
133 "Key hold failure.", |
|
134 "Invalid keyhold command.", |
|
135 "Keyhold command string is too long.", |
|
136 "Invalid image directory.", // 110 |
|
137 "File copy operation failed.", |
|
138 "An invalid platform was specified.", |
|
139 "An external COM file system interface could not be obtained.", |
|
140 "An external COM request interface could not be obtained.", |
|
141 "A Symbian Connect session could not be initialised.", |
|
142 "A COM request object could not be instantiated.", |
|
143 "Remote device could not be initialised. Check STAT support DLLs exist.", |
|
144 "No reference images could be located", |
|
145 "Deleting file...", |
|
146 "File delete operation ok.", // 120 |
|
147 "File delete operation failed.", |
|
148 "Creating folder...", |
|
149 "Create folder operation ok.", |
|
150 "Create folder operation failed.", |
|
151 "Removing folder...", |
|
152 "Remove folder operation ok.", |
|
153 "Remove folder operation failed.", |
|
154 "The requested operation is not supported", |
|
155 "Script cancelled at user's request", |
|
156 "Out of memory", // 130 |
|
157 "Invalid command format", |
|
158 "Messaging initialisation failure", |
|
159 "The file format is invalid", |
|
160 "Could not open Symbian OS file to read", |
|
161 "Image folder (PC side) does not exist for conversion", |
|
162 "No images to convert", |
|
163 "The bitmap could not be loaded prior to conversion", |
|
164 "The converted bitmap could not be saved", |
|
165 "The file write operation failed", |
|
166 "Could not open bitmap file to write", // 140 |
|
167 "Unknown data compression type", |
|
168 "A leftover .mbm file could not be removed prior to bitmap conversion", |
|
169 "Converting bitmap image from:", |
|
170 "To:", |
|
171 "File retrieval (copy)...", |
|
172 "Invalid command syntax", |
|
173 "Reading bitmap image into memory...", |
|
174 "Screenshot read into memory successfully.", |
|
175 "Command could not be sent...Retrying...", |
|
176 "Retries exhausted. Command failed.", // 150 |
|
177 "A connection could not be established", |
|
178 "Write to port failed", |
|
179 "Read from port failed", |
|
180 "No data read from port", |
|
181 "Maximum time limit exceeded on single command", |
|
182 "Maximum error limit exceeded on single command", |
|
183 "Command ID of this type was not expected", |
|
184 "Bad file name or file does not exist", |
|
185 "Incorrect number of bytes read or written", |
|
186 "Insufficient memory or connection type not supported", // 160 |
|
187 "Retrieving file to:", |
|
188 "Invalid command type", |
|
189 "Communication needs to resynchronise", |
|
190 "No data to save to file", |
|
191 "Windows Socket Server could not be started", |
|
192 "Socket could not be created", |
|
193 "Socket connection failed", |
|
194 "Socket could not be bound to this port", |
|
195 "Socket could not listen on this port", |
|
196 "Host name could not be obtained", // 170 |
|
197 "Socket send failed", |
|
198 "Socket receive failed", |
|
199 "Script task terminated at user's request", |
|
200 "Socket could not be closed", |
|
201 "Windows Server shutdown failed", |
|
202 "Using existing images", |
|
203 "No connection specified", |
|
204 NULL |
|
205 }; |
|
206 |
|
207 CSTATReturnCodes::CSTATReturnCodes() |
|
208 : iMaxCodes(0) |
|
209 { |
|
210 // determine the maximum error code possible |
|
211 while(messages[iMaxCodes]) |
|
212 iMaxCodes++; |
|
213 } |
|
214 |
|
215 const char* |
|
216 CSTATReturnCodes::GetRetMsg(const DWORD codenum) |
|
217 { |
|
218 static CString retval; |
|
219 if (codenum < iMaxCodes) |
|
220 retval = messages[(int)codenum]; |
|
221 else |
|
222 retval = _T("No error text associated with this code"); |
|
223 |
|
224 return retval.operator LPCTSTR( ); |
|
225 } |