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".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
16 #ifndef __SSMCMD_HRH__
17 #define __SSMCMD_HRH__
19 /** UID2 for SSM command list resource files.
24 #define KUidSsmCommandListResourceFile 0x2000D764
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
33 #define KDefaultCommandPriority 10000
36 /** Supported verions of command list resource files.
41 enum TSsmResourceVersion
43 ESsmInitialVersion = 1
46 /** Identifiers for different command types.
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.
68 This command is used for starting processes.
72 This command is used for starting apps.
76 This command is used to wait for apparc to initialise its list of applications.
78 ESsmCmdWaitForApparcInit,
80 This command is used to wait until all previous commands with
81 start_method ESsmDeferredWaitForSignal have completed.
85 This command is used for starting AMAStarter with a particular DSC.
90 This command is used for publishing a system state change.
92 ESsmCmdPublishSystemState,
94 This command is used for publishing a system-wide property change.
98 This command is used for creating a system-wide property.
102 This command is used for requesting a change to a system-wide property.
104 ESsmCmdReqSwProperty,
106 This command is used for loading a State Utility Plugin.
110 This command is used for initiating a device restart or shutdown.
114 This command is used for finalising drives.
116 ESsmCmdFinaliseDrives,
118 This command is used for persisting HAL attributes.
120 ESsmCmdPersistHalAttributes,
122 This command is used for starting an old-style custom command.
126 This command is used for starting a custom command.
128 ESsmCmdCustomCommand,
130 This command is used to set the publish and subscribe key.
134 It is used to store the monitor information for a process/app.
139 enum TSsmSoftwareReasons
142 ERestoreFactorySettings,
144 EUnconditionalSoftwareReason = 0xFFFFFFFF
147 enum TSsmHardwareReasons
151 EUnconditionalHardwareReason = 0xFFFFFFFF
154 /** Identifiers for each start-up method.
159 enum TSsmExecutionBehaviour
162 By using this type the starter can continue immediately
163 with executing its next command.
165 ESsmFireAndForget = 1,
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.
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.
177 ESsmDeferredWaitForSignal
180 /** Identifier for the level of severity to be associated with a command failure.
185 enum TCmdErrorSeverity
188 Ignore the command failure.
190 ECmdIgnoreFailure = 0,
194 ECmdLowSeverity = 25,
198 ECmdMediumSeverity = 50,
202 ECmdHighSeverity = 75,
206 ECmdCriticalSeverity = 100
210 Identifier for the versions of individual Built-In Commands
217 enum TCmdPublishSystemStateVersion
219 ECmdPublishSystemStateInitialVersion = 1
220 #ifdef SYMBIAN_SSM_FLEXIBLE_MERGE
222 The ECmdPublishSystemStateVersionWithPriority will support the priority field in the command
224 , ECmdPublishSystemStateVersionWithPriority
232 enum TCmdPublishSwpVersion
234 ECmdPublishSwpInitialVersion = 1
235 #ifdef SYMBIAN_SSM_FLEXIBLE_MERGE
237 The ECmdPublishSwpVersionWithPriority will support the priority field in the command
239 , ECmdPublishSwpVersionWithPriority
247 enum TCmdCreateSwpVersion
249 ECmdCreateSwpInitialVersion = 1
250 #ifdef SYMBIAN_SSM_FLEXIBLE_MERGE
252 The ECmdCreateSwpVersionWithPriority will support the priority field in the command
254 , ECmdCreateSwpVersionWithPriority
262 enum TCmdReqSwPropertyVersion
264 ECmdReqSwPropertyInitialVersion = 1
265 #ifdef SYMBIAN_SSM_FLEXIBLE_MERGE
267 The ECmdReqSwPropertyVersionWithPriority will support the priority field in the command
269 , ECmdReqSwPropertyVersionWithPriority
277 enum TCmdLoadSupVersion
279 ECmdLoadSupInitialVersion = 1
280 #ifdef SYMBIAN_SSM_FLEXIBLE_MERGE
282 The ECmdLoadSupVersionWithPriority will support the priority field in the command
284 , ECmdLoadSupVersionWithPriority
292 enum TCmdPowerOffVersion
294 ECmdPowerOffInitialVersion = 1
301 enum TCmdFinaliseDrivesVersion
303 ECmdFinaliseDrivesInitialVersion = 1
310 enum TCmdPersistHalAttributesVersion
312 ECmdPersistHalAttributesInitialVersion = 1
319 enum TCmdCustomCommandVersion
321 ECmdCustomCommandInitialVersion = 1
322 #ifdef SYMBIAN_SSM_FLEXIBLE_MERGE
324 The ECmdCustomCommandVersionWithPriority will support the priority field in the command
326 , ECmdCustomCommandVersionWithPriority
334 enum TCmdAmaStarterVersion
336 ECmdAmaStarterInitialVersion = 1
337 #ifdef SYMBIAN_SSM_FLEXIBLE_MERGE
339 The ECmdAmaStarterVersionWithPriority will support the priority field in the command
341 , ECmdAmaStarterVersionWithPriority
349 enum TCmdMultipleWaitVersion
351 ECmdMultipleWaitInitialVersion = 1
352 #ifdef SYMBIAN_SSM_FLEXIBLE_MERGE
354 The ECmdMultipleWaitVersionWithPriority will support the priority field in the command
356 , ECmdMultipleWaitVersionWithPriority
357 #endif //SYMBIAN_SSM_FLEXIBLE_MERGE
364 enum TCmdSetPAndSKeyVersion
366 ECmdSetPAndSKeyInitialVersion = 1
367 #ifdef SYMBIAN_SSM_FLEXIBLE_MERGE
369 The ECmdSetPAndSKeyVersionWithPriority will support the priority field in the command
371 , ECmdSetPAndSKeyVersionWithPriority
379 enum TCmdStartAppVersion
381 ECmdStartAppInitialVersion = 1
382 #ifdef SYMBIAN_SSM_FLEXIBLE_MERGE
384 The ECmdStartAppVersionWithPriority will support the priority field in the command
386 , ECmdStartAppVersionWithPriority
394 enum TCmdStartProcessVersion
396 ECmdStartProcessInitialVersion = 1
397 #ifdef SYMBIAN_SSM_FLEXIBLE_MERGE
399 The ECmdStartProcessVersionWithPriority will support the priority field in the command
401 , ECmdStartProcessVersionWithPriority
409 enum TCmdWaitForApparcInitVersion
411 ECmdWaitForApparcInitInitialVersion = 1
412 #ifdef SYMBIAN_SSM_FLEXIBLE_MERGE
414 The ECmdWaitForApparcInitVersionWithPriority will support the priority field in the command
416 , ECmdWaitForApparcInitVersionWithPriority
424 enum TSsmMonitorInfoVersion
426 ESsmMonitorInfoInitialVersion = 1
429 /** Defines the possible unloading options for the custom command dll
433 enum TCmdCustomCommandLibUnloading
435 EUnloadOnCommandCompletion = 0, // once Custom Command has completed, the dll is unloaded
436 ENeverUnload // no attempt is made to unload the dll
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.
446 enum TSsmRecoveryMethod
449 Ignore the command failure
457 Reboot the OS in a particular mode
459 ESsmRestartOSWithMode,
461 Reboot the OS (with no attempts to restart the component being attempted)
463 ESsmCriticalNoRetries
466 #endif // __SSMCMD_HRH__