|
1 // Copyright (c) 2007-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 #ifndef __SSMCMD_HRH__ |
|
17 #define __SSMCMD_HRH__ |
|
18 |
|
19 /** UID2 for SSM command list resource files. |
|
20 |
|
21 @publishedPartner |
|
22 @released |
|
23 */ |
|
24 #define KUidSsmCommandListResourceFile 0x2000D764 |
|
25 |
|
26 #ifdef SYMBIAN_SSM_FLEXIBLE_MERGE |
|
27 /** The value of default priority of a command if it is not supplied |
|
28 This value is a TUint16 value and will deafult to 10000 |
|
29 |
|
30 @publishedPartner |
|
31 @released |
|
32 */ |
|
33 #define KDefaultCommandPriority 10000 |
|
34 #endif |
|
35 |
|
36 /** Supported verions of command list resource files. |
|
37 |
|
38 @publishedPartner |
|
39 @released |
|
40 */ |
|
41 enum TSsmResourceVersion |
|
42 { |
|
43 ESsmInitialVersion = 1 |
|
44 }; |
|
45 |
|
46 /** Identifiers for different command types. |
|
47 |
|
48 Note: To add a new command type, extend this enum and add a |
|
49 new struct to ssmcmd.rh. |
|
50 All command structs must start with the following header: |
|
51 1. LLINK conditional_information - set to zero for a command that must always |
|
52 be included in the command list or the id of a resource (in the same resource file) |
|
53 containing information used by the policy to determine whether the command |
|
54 will be included in the command list. |
|
55 2. WORD type - Command type declared by TSsmCommandType. |
|
56 3. WORD version - Supported version for the new command type. |
|
57 |
|
58 @publishedPartner |
|
59 @released |
|
60 */ |
|
61 enum TSsmCommandType |
|
62 { |
|
63 /** |
|
64 Command not defined. |
|
65 */ |
|
66 ESsmCmdUndefined = 0, |
|
67 /** |
|
68 This command is used for starting processes. |
|
69 */ |
|
70 ESsmCmdStartProcess, |
|
71 /** |
|
72 This command is used for starting apps. |
|
73 */ |
|
74 ESsmCmdStartApp, |
|
75 /** |
|
76 This command is used to wait for apparc to initialise its list of applications. |
|
77 */ |
|
78 ESsmCmdWaitForApparcInit, |
|
79 /** |
|
80 This command is used to wait until all previous commands with |
|
81 start_method ESsmDeferredWaitForSignal have completed. |
|
82 */ |
|
83 ESsmCmdMultipleWait, |
|
84 /** |
|
85 This command is used for starting AMAStarter with a particular DSC. |
|
86 */ |
|
87 ESsmCmdAMAStarter, |
|
88 |
|
89 /** |
|
90 This command is used for publishing a system state change. |
|
91 */ |
|
92 ESsmCmdPublishSystemState, |
|
93 /** |
|
94 This command is used for publishing a system-wide property change. |
|
95 */ |
|
96 ESsmCmdPublishSwp, |
|
97 /** |
|
98 This command is used for creating a system-wide property. |
|
99 */ |
|
100 ESsmCmdCreateSwp, |
|
101 /** |
|
102 This command is used for requesting a change to a system-wide property. |
|
103 */ |
|
104 ESsmCmdReqSwProperty, |
|
105 /** |
|
106 This command is used for loading a State Utility Plugin. |
|
107 */ |
|
108 ESsmCmdLoadSup, |
|
109 /** |
|
110 This command is used for initiating a device restart or shutdown. |
|
111 */ |
|
112 ESsmCmdPowerOff, |
|
113 /** |
|
114 This command is used for finalising drives. |
|
115 */ |
|
116 ESsmCmdFinaliseDrives, |
|
117 /** |
|
118 This command is used for persisting HAL attributes. |
|
119 */ |
|
120 ESsmCmdPersistHalAttributes, |
|
121 /** |
|
122 This command is used for starting an old-style custom command. |
|
123 */ |
|
124 ESsmCmdLoadDLL, |
|
125 /** |
|
126 This command is used for starting a custom command. |
|
127 */ |
|
128 ESsmCmdCustomCommand, |
|
129 /** |
|
130 This command is used to set the publish and subscribe key. |
|
131 */ |
|
132 ESsmCmdSetPAndSKey, |
|
133 /** |
|
134 It is used to store the monitor information for a process/app. |
|
135 */ |
|
136 ESsmMonitorInfo |
|
137 }; |
|
138 |
|
139 enum TSsmSoftwareReasons |
|
140 { |
|
141 ESoftwareNormal, |
|
142 ERestoreFactorySettings, |
|
143 EFirstBoot, |
|
144 EUnconditionalSoftwareReason = 0xFFFFFFFF |
|
145 }; |
|
146 |
|
147 enum TSsmHardwareReasons |
|
148 { |
|
149 EHardwareNormal, |
|
150 ETest, |
|
151 EUnconditionalHardwareReason = 0xFFFFFFFF |
|
152 }; |
|
153 |
|
154 /** Identifiers for each start-up method. |
|
155 |
|
156 @publishedPartner |
|
157 @released |
|
158 */ |
|
159 enum TSsmExecutionBehaviour |
|
160 { |
|
161 /** |
|
162 By using this type the starter can continue immediately |
|
163 with executing its next command. |
|
164 */ |
|
165 ESsmFireAndForget = 1, |
|
166 /** |
|
167 By using this type the starter cannot continue with the |
|
168 next command until a command is completed. |
|
169 It means rendezvous for StartApp and StartProcess and completion of Execute() for other commands. |
|
170 */ |
|
171 ESsmWaitForSignal, |
|
172 /** |
|
173 By using this type the starter will continue with the next command |
|
174 before commands completion. However the completion will be checked later when a |
|
175 MULTIPLE_WAIT command is encountered. |
|
176 */ |
|
177 ESsmDeferredWaitForSignal |
|
178 }; |
|
179 |
|
180 /** Identifier for the level of severity to be associated with a command failure. |
|
181 |
|
182 @publishedPartner |
|
183 @released |
|
184 */ |
|
185 enum TCmdErrorSeverity |
|
186 { |
|
187 /** |
|
188 Ignore the command failure. |
|
189 */ |
|
190 ECmdIgnoreFailure = 0, |
|
191 |
|
192 /** |
|
193 */ |
|
194 ECmdLowSeverity = 25, |
|
195 |
|
196 /** |
|
197 */ |
|
198 ECmdMediumSeverity = 50, |
|
199 |
|
200 /** |
|
201 */ |
|
202 ECmdHighSeverity = 75, |
|
203 |
|
204 /** |
|
205 */ |
|
206 ECmdCriticalSeverity = 100 |
|
207 }; |
|
208 |
|
209 /** |
|
210 Identifier for the versions of individual Built-In Commands |
|
211 */ |
|
212 |
|
213 /** |
|
214 @publishedPartner |
|
215 @released |
|
216 */ |
|
217 enum TCmdPublishSystemStateVersion |
|
218 { |
|
219 ECmdPublishSystemStateInitialVersion = 1 |
|
220 #ifdef SYMBIAN_SSM_FLEXIBLE_MERGE |
|
221 /* |
|
222 The ECmdPublishSystemStateVersionWithPriority will support the priority field in the command |
|
223 */ |
|
224 , ECmdPublishSystemStateVersionWithPriority |
|
225 #endif |
|
226 }; |
|
227 |
|
228 /** |
|
229 @publishedPartner |
|
230 @released |
|
231 */ |
|
232 enum TCmdPublishSwpVersion |
|
233 { |
|
234 ECmdPublishSwpInitialVersion = 1 |
|
235 #ifdef SYMBIAN_SSM_FLEXIBLE_MERGE |
|
236 /* |
|
237 The ECmdPublishSwpVersionWithPriority will support the priority field in the command |
|
238 */ |
|
239 , ECmdPublishSwpVersionWithPriority |
|
240 #endif |
|
241 }; |
|
242 |
|
243 /** |
|
244 @publishedPartner |
|
245 @released |
|
246 */ |
|
247 enum TCmdCreateSwpVersion |
|
248 { |
|
249 ECmdCreateSwpInitialVersion = 1 |
|
250 #ifdef SYMBIAN_SSM_FLEXIBLE_MERGE |
|
251 /* |
|
252 The ECmdCreateSwpVersionWithPriority will support the priority field in the command |
|
253 */ |
|
254 , ECmdCreateSwpVersionWithPriority |
|
255 #endif |
|
256 }; |
|
257 |
|
258 /** |
|
259 @publishedPartner |
|
260 @released |
|
261 */ |
|
262 enum TCmdReqSwPropertyVersion |
|
263 { |
|
264 ECmdReqSwPropertyInitialVersion = 1 |
|
265 #ifdef SYMBIAN_SSM_FLEXIBLE_MERGE |
|
266 /* |
|
267 The ECmdReqSwPropertyVersionWithPriority will support the priority field in the command |
|
268 */ |
|
269 , ECmdReqSwPropertyVersionWithPriority |
|
270 #endif |
|
271 }; |
|
272 |
|
273 /** |
|
274 @publishedPartner |
|
275 @released |
|
276 */ |
|
277 enum TCmdLoadSupVersion |
|
278 { |
|
279 ECmdLoadSupInitialVersion = 1 |
|
280 #ifdef SYMBIAN_SSM_FLEXIBLE_MERGE |
|
281 /* |
|
282 The ECmdLoadSupVersionWithPriority will support the priority field in the command |
|
283 */ |
|
284 , ECmdLoadSupVersionWithPriority |
|
285 #endif |
|
286 }; |
|
287 |
|
288 /** |
|
289 @publishedPartner |
|
290 @released |
|
291 */ |
|
292 enum TCmdPowerOffVersion |
|
293 { |
|
294 ECmdPowerOffInitialVersion = 1 |
|
295 }; |
|
296 |
|
297 /** |
|
298 @publishedPartner |
|
299 @released |
|
300 */ |
|
301 enum TCmdFinaliseDrivesVersion |
|
302 { |
|
303 ECmdFinaliseDrivesInitialVersion = 1 |
|
304 }; |
|
305 |
|
306 /** |
|
307 @publishedPartner |
|
308 @released |
|
309 */ |
|
310 enum TCmdPersistHalAttributesVersion |
|
311 { |
|
312 ECmdPersistHalAttributesInitialVersion = 1 |
|
313 }; |
|
314 |
|
315 /** |
|
316 @publishedPartner |
|
317 @released |
|
318 */ |
|
319 enum TCmdCustomCommandVersion |
|
320 { |
|
321 ECmdCustomCommandInitialVersion = 1 |
|
322 #ifdef SYMBIAN_SSM_FLEXIBLE_MERGE |
|
323 /* |
|
324 The ECmdCustomCommandVersionWithPriority will support the priority field in the command |
|
325 */ |
|
326 , ECmdCustomCommandVersionWithPriority |
|
327 #endif |
|
328 }; |
|
329 |
|
330 /** |
|
331 @publishedPartner |
|
332 @released |
|
333 */ |
|
334 enum TCmdAmaStarterVersion |
|
335 { |
|
336 ECmdAmaStarterInitialVersion = 1 |
|
337 #ifdef SYMBIAN_SSM_FLEXIBLE_MERGE |
|
338 /* |
|
339 The ECmdAmaStarterVersionWithPriority will support the priority field in the command |
|
340 */ |
|
341 , ECmdAmaStarterVersionWithPriority |
|
342 #endif |
|
343 }; |
|
344 |
|
345 /** |
|
346 @publishedPartner |
|
347 @released |
|
348 */ |
|
349 enum TCmdMultipleWaitVersion |
|
350 { |
|
351 ECmdMultipleWaitInitialVersion = 1 |
|
352 #ifdef SYMBIAN_SSM_FLEXIBLE_MERGE |
|
353 /* |
|
354 The ECmdMultipleWaitVersionWithPriority will support the priority field in the command |
|
355 */ |
|
356 , ECmdMultipleWaitVersionWithPriority |
|
357 #endif //SYMBIAN_SSM_FLEXIBLE_MERGE |
|
358 }; |
|
359 |
|
360 /** |
|
361 @publishedPartner |
|
362 @released |
|
363 */ |
|
364 enum TCmdSetPAndSKeyVersion |
|
365 { |
|
366 ECmdSetPAndSKeyInitialVersion = 1 |
|
367 #ifdef SYMBIAN_SSM_FLEXIBLE_MERGE |
|
368 /* |
|
369 The ECmdSetPAndSKeyVersionWithPriority will support the priority field in the command |
|
370 */ |
|
371 , ECmdSetPAndSKeyVersionWithPriority |
|
372 #endif |
|
373 }; |
|
374 |
|
375 /** |
|
376 @publishedPartner |
|
377 @released |
|
378 */ |
|
379 enum TCmdStartAppVersion |
|
380 { |
|
381 ECmdStartAppInitialVersion = 1 |
|
382 #ifdef SYMBIAN_SSM_FLEXIBLE_MERGE |
|
383 /* |
|
384 The ECmdStartAppVersionWithPriority will support the priority field in the command |
|
385 */ |
|
386 , ECmdStartAppVersionWithPriority |
|
387 #endif |
|
388 }; |
|
389 |
|
390 /** |
|
391 @publishedPartner |
|
392 @released |
|
393 */ |
|
394 enum TCmdStartProcessVersion |
|
395 { |
|
396 ECmdStartProcessInitialVersion = 1 |
|
397 #ifdef SYMBIAN_SSM_FLEXIBLE_MERGE |
|
398 /* |
|
399 The ECmdStartProcessVersionWithPriority will support the priority field in the command |
|
400 */ |
|
401 , ECmdStartProcessVersionWithPriority |
|
402 #endif |
|
403 }; |
|
404 |
|
405 /** |
|
406 @publishedPartner |
|
407 @released |
|
408 */ |
|
409 enum TCmdWaitForApparcInitVersion |
|
410 { |
|
411 ECmdWaitForApparcInitInitialVersion = 1 |
|
412 #ifdef SYMBIAN_SSM_FLEXIBLE_MERGE |
|
413 /* |
|
414 The ECmdWaitForApparcInitVersionWithPriority will support the priority field in the command |
|
415 */ |
|
416 , ECmdWaitForApparcInitVersionWithPriority |
|
417 #endif |
|
418 }; |
|
419 |
|
420 /** |
|
421 @publishedPartner |
|
422 @released |
|
423 */ |
|
424 enum TSsmMonitorInfoVersion |
|
425 { |
|
426 ESsmMonitorInfoInitialVersion = 1 |
|
427 }; |
|
428 |
|
429 /** Defines the possible unloading options for the custom command dll |
|
430 @publishedPartner |
|
431 @released |
|
432 */ |
|
433 enum TCmdCustomCommandLibUnloading |
|
434 { |
|
435 EUnloadOnCommandCompletion = 0, // once Custom Command has completed, the dll is unloaded |
|
436 ENeverUnload // no attempt is made to unload the dll |
|
437 }; |
|
438 |
|
439 /** Defines the action to be taken on component failure. |
|
440 This should be used to set the restart_policy member of SSM_MONITOR_INFO structure to determine what to do |
|
441 when all retry attempts of the component have failed. |
|
442 |
|
443 @publishedPartner |
|
444 @released |
|
445 */ |
|
446 enum TSsmRecoveryMethod |
|
447 { |
|
448 /** |
|
449 Ignore the command failure |
|
450 */ |
|
451 ESsmIgnoreOnFailure, |
|
452 /** |
|
453 Reboot the OS |
|
454 */ |
|
455 ESsmRestartOS, |
|
456 /** |
|
457 Reboot the OS in a particular mode |
|
458 */ |
|
459 ESsmRestartOSWithMode, |
|
460 /** |
|
461 Reboot the OS (with no attempts to restart the component being attempted) |
|
462 */ |
|
463 ESsmCriticalNoRetries |
|
464 }; |
|
465 |
|
466 #endif // __SSMCMD_HRH__ |