1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/epoc32/include/ssm/ssmcmd.hrh Wed Mar 31 12:33:34 2010 +0100
1.3 @@ -0,0 +1,466 @@
1.4 +// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
1.5 +// All rights reserved.
1.6 +// This component and the accompanying materials are made available
1.7 +// under the terms of "Eclipse Public License v1.0"
1.8 +// which accompanies this distribution, and is available
1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.10 +//
1.11 +// Initial Contributors:
1.12 +// Nokia Corporation - initial contribution.
1.13 +//
1.14 +// Contributors:
1.15 +//
1.16 +// Description:
1.17 +//
1.18 +
1.19 +#ifndef __SSMCMD_HRH__
1.20 +#define __SSMCMD_HRH__
1.21 +
1.22 +/** UID2 for SSM command list resource files.
1.23 +
1.24 +@publishedPartner
1.25 +@released
1.26 +*/
1.27 +#define KUidSsmCommandListResourceFile 0x2000D764
1.28 +
1.29 +#ifdef SYMBIAN_SSM_FLEXIBLE_MERGE
1.30 +/** The value of default priority of a command if it is not supplied
1.31 +This value is a TUint16 value and will deafult to 10000
1.32 +
1.33 +@publishedPartner
1.34 +@released
1.35 +*/
1.36 +#define KDefaultCommandPriority 10000
1.37 +#endif
1.38 +
1.39 +/** Supported verions of command list resource files.
1.40 +
1.41 +@publishedPartner
1.42 +@released
1.43 +*/
1.44 +enum TSsmResourceVersion
1.45 + {
1.46 + ESsmInitialVersion = 1
1.47 + };
1.48 +
1.49 +/** Identifiers for different command types.
1.50 +
1.51 +Note: To add a new command type, extend this enum and add a
1.52 +new struct to ssmcmd.rh.
1.53 +All command structs must start with the following header:
1.54 +1. LLINK conditional_information - set to zero for a command that must always
1.55 +be included in the command list or the id of a resource (in the same resource file)
1.56 +containing information used by the policy to determine whether the command
1.57 +will be included in the command list.
1.58 +2. WORD type - Command type declared by TSsmCommandType.
1.59 +3. WORD version - Supported version for the new command type.
1.60 +
1.61 +@publishedPartner
1.62 +@released
1.63 +*/
1.64 +enum TSsmCommandType
1.65 + {
1.66 + /**
1.67 + Command not defined.
1.68 + */
1.69 + ESsmCmdUndefined = 0,
1.70 + /**
1.71 + This command is used for starting processes.
1.72 + */
1.73 + ESsmCmdStartProcess,
1.74 + /**
1.75 + This command is used for starting apps.
1.76 + */
1.77 + ESsmCmdStartApp,
1.78 + /**
1.79 + This command is used to wait for apparc to initialise its list of applications.
1.80 + */
1.81 + ESsmCmdWaitForApparcInit,
1.82 + /**
1.83 + This command is used to wait until all previous commands with
1.84 + start_method ESsmDeferredWaitForSignal have completed.
1.85 + */
1.86 + ESsmCmdMultipleWait,
1.87 + /**
1.88 + This command is used for starting AMAStarter with a particular DSC.
1.89 + */
1.90 + ESsmCmdAMAStarter,
1.91 +
1.92 + /**
1.93 + This command is used for publishing a system state change.
1.94 + */
1.95 + ESsmCmdPublishSystemState,
1.96 + /**
1.97 + This command is used for publishing a system-wide property change.
1.98 + */
1.99 + ESsmCmdPublishSwp,
1.100 + /**
1.101 + This command is used for creating a system-wide property.
1.102 + */
1.103 + ESsmCmdCreateSwp,
1.104 + /**
1.105 + This command is used for requesting a change to a system-wide property.
1.106 + */
1.107 + ESsmCmdReqSwProperty,
1.108 + /**
1.109 + This command is used for loading a State Utility Plugin.
1.110 + */
1.111 + ESsmCmdLoadSup,
1.112 + /**
1.113 + This command is used for initiating a device restart or shutdown.
1.114 + */
1.115 + ESsmCmdPowerOff,
1.116 + /**
1.117 + This command is used for finalising drives.
1.118 + */
1.119 + ESsmCmdFinaliseDrives,
1.120 + /**
1.121 + This command is used for persisting HAL attributes.
1.122 + */
1.123 + ESsmCmdPersistHalAttributes,
1.124 + /**
1.125 + This command is used for starting an old-style custom command.
1.126 + */
1.127 + ESsmCmdLoadDLL,
1.128 + /**
1.129 + This command is used for starting a custom command.
1.130 + */
1.131 + ESsmCmdCustomCommand,
1.132 + /**
1.133 + This command is used to set the publish and subscribe key.
1.134 + */
1.135 + ESsmCmdSetPAndSKey,
1.136 + /**
1.137 + It is used to store the monitor information for a process/app.
1.138 + */
1.139 + ESsmMonitorInfo
1.140 + };
1.141 +
1.142 +enum TSsmSoftwareReasons
1.143 + {
1.144 + ESoftwareNormal,
1.145 + ERestoreFactorySettings,
1.146 + EFirstBoot,
1.147 + EUnconditionalSoftwareReason = 0xFFFFFFFF
1.148 + };
1.149 +
1.150 +enum TSsmHardwareReasons
1.151 + {
1.152 + EHardwareNormal,
1.153 + ETest,
1.154 + EUnconditionalHardwareReason = 0xFFFFFFFF
1.155 + };
1.156 +
1.157 +/** Identifiers for each start-up method.
1.158 +
1.159 +@publishedPartner
1.160 +@released
1.161 +*/
1.162 +enum TSsmExecutionBehaviour
1.163 + {
1.164 + /**
1.165 + By using this type the starter can continue immediately
1.166 + with executing its next command.
1.167 + */
1.168 + ESsmFireAndForget = 1,
1.169 + /**
1.170 + By using this type the starter cannot continue with the
1.171 + next command until a command is completed.
1.172 + It means rendezvous for StartApp and StartProcess and completion of Execute() for other commands.
1.173 + */
1.174 + ESsmWaitForSignal,
1.175 + /**
1.176 + By using this type the starter will continue with the next command
1.177 + before commands completion. However the completion will be checked later when a
1.178 + MULTIPLE_WAIT command is encountered.
1.179 + */
1.180 + ESsmDeferredWaitForSignal
1.181 + };
1.182 +
1.183 +/** Identifier for the level of severity to be associated with a command failure.
1.184 +
1.185 +@publishedPartner
1.186 +@released
1.187 +*/
1.188 +enum TCmdErrorSeverity
1.189 + {
1.190 + /**
1.191 + Ignore the command failure.
1.192 + */
1.193 + ECmdIgnoreFailure = 0,
1.194 +
1.195 + /**
1.196 + */
1.197 + ECmdLowSeverity = 25,
1.198 +
1.199 + /**
1.200 + */
1.201 + ECmdMediumSeverity = 50,
1.202 +
1.203 + /**
1.204 + */
1.205 + ECmdHighSeverity = 75,
1.206 +
1.207 + /**
1.208 + */
1.209 + ECmdCriticalSeverity = 100
1.210 + };
1.211 +
1.212 +/**
1.213 +Identifier for the versions of individual Built-In Commands
1.214 +*/
1.215 +
1.216 +/**
1.217 +@publishedPartner
1.218 +@released
1.219 +*/
1.220 +enum TCmdPublishSystemStateVersion
1.221 + {
1.222 + ECmdPublishSystemStateInitialVersion = 1
1.223 +#ifdef SYMBIAN_SSM_FLEXIBLE_MERGE
1.224 + /*
1.225 + The ECmdPublishSystemStateVersionWithPriority will support the priority field in the command
1.226 + */
1.227 + , ECmdPublishSystemStateVersionWithPriority
1.228 +#endif
1.229 + };
1.230 +
1.231 +/**
1.232 +@publishedPartner
1.233 +@released
1.234 +*/
1.235 +enum TCmdPublishSwpVersion
1.236 + {
1.237 + ECmdPublishSwpInitialVersion = 1
1.238 +#ifdef SYMBIAN_SSM_FLEXIBLE_MERGE
1.239 + /*
1.240 + The ECmdPublishSwpVersionWithPriority will support the priority field in the command
1.241 + */
1.242 + , ECmdPublishSwpVersionWithPriority
1.243 +#endif
1.244 + };
1.245 +
1.246 +/**
1.247 +@publishedPartner
1.248 +@released
1.249 +*/
1.250 +enum TCmdCreateSwpVersion
1.251 + {
1.252 + ECmdCreateSwpInitialVersion = 1
1.253 +#ifdef SYMBIAN_SSM_FLEXIBLE_MERGE
1.254 + /*
1.255 + The ECmdCreateSwpVersionWithPriority will support the priority field in the command
1.256 + */
1.257 + , ECmdCreateSwpVersionWithPriority
1.258 +#endif
1.259 + };
1.260 +
1.261 +/**
1.262 +@publishedPartner
1.263 +@released
1.264 +*/
1.265 +enum TCmdReqSwPropertyVersion
1.266 + {
1.267 + ECmdReqSwPropertyInitialVersion = 1
1.268 +#ifdef SYMBIAN_SSM_FLEXIBLE_MERGE
1.269 + /*
1.270 + The ECmdReqSwPropertyVersionWithPriority will support the priority field in the command
1.271 + */
1.272 + , ECmdReqSwPropertyVersionWithPriority
1.273 +#endif
1.274 + };
1.275 +
1.276 +/**
1.277 +@publishedPartner
1.278 +@released
1.279 +*/
1.280 +enum TCmdLoadSupVersion
1.281 + {
1.282 + ECmdLoadSupInitialVersion = 1
1.283 +#ifdef SYMBIAN_SSM_FLEXIBLE_MERGE
1.284 + /*
1.285 + The ECmdLoadSupVersionWithPriority will support the priority field in the command
1.286 + */
1.287 + , ECmdLoadSupVersionWithPriority
1.288 +#endif
1.289 + };
1.290 +
1.291 +/**
1.292 +@publishedPartner
1.293 +@released
1.294 +*/
1.295 +enum TCmdPowerOffVersion
1.296 + {
1.297 + ECmdPowerOffInitialVersion = 1
1.298 + };
1.299 +
1.300 +/**
1.301 +@publishedPartner
1.302 +@released
1.303 +*/
1.304 +enum TCmdFinaliseDrivesVersion
1.305 + {
1.306 + ECmdFinaliseDrivesInitialVersion = 1
1.307 + };
1.308 +
1.309 +/**
1.310 +@publishedPartner
1.311 +@released
1.312 +*/
1.313 +enum TCmdPersistHalAttributesVersion
1.314 + {
1.315 + ECmdPersistHalAttributesInitialVersion = 1
1.316 + };
1.317 +
1.318 +/**
1.319 +@publishedPartner
1.320 +@released
1.321 +*/
1.322 +enum TCmdCustomCommandVersion
1.323 + {
1.324 + ECmdCustomCommandInitialVersion = 1
1.325 +#ifdef SYMBIAN_SSM_FLEXIBLE_MERGE
1.326 + /*
1.327 + The ECmdCustomCommandVersionWithPriority will support the priority field in the command
1.328 + */
1.329 + , ECmdCustomCommandVersionWithPriority
1.330 +#endif
1.331 + };
1.332 +
1.333 +/**
1.334 +@publishedPartner
1.335 +@released
1.336 +*/
1.337 +enum TCmdAmaStarterVersion
1.338 + {
1.339 + ECmdAmaStarterInitialVersion = 1
1.340 +#ifdef SYMBIAN_SSM_FLEXIBLE_MERGE
1.341 + /*
1.342 + The ECmdAmaStarterVersionWithPriority will support the priority field in the command
1.343 + */
1.344 + , ECmdAmaStarterVersionWithPriority
1.345 +#endif
1.346 + };
1.347 +
1.348 +/**
1.349 +@publishedPartner
1.350 +@released
1.351 +*/
1.352 +enum TCmdMultipleWaitVersion
1.353 + {
1.354 + ECmdMultipleWaitInitialVersion = 1
1.355 +#ifdef SYMBIAN_SSM_FLEXIBLE_MERGE
1.356 + /*
1.357 + The ECmdMultipleWaitVersionWithPriority will support the priority field in the command
1.358 + */
1.359 + , ECmdMultipleWaitVersionWithPriority
1.360 +#endif //SYMBIAN_SSM_FLEXIBLE_MERGE
1.361 + };
1.362 +
1.363 +/**
1.364 +@publishedPartner
1.365 +@released
1.366 +*/
1.367 +enum TCmdSetPAndSKeyVersion
1.368 + {
1.369 + ECmdSetPAndSKeyInitialVersion = 1
1.370 +#ifdef SYMBIAN_SSM_FLEXIBLE_MERGE
1.371 + /*
1.372 + The ECmdSetPAndSKeyVersionWithPriority will support the priority field in the command
1.373 + */
1.374 + , ECmdSetPAndSKeyVersionWithPriority
1.375 +#endif
1.376 + };
1.377 +
1.378 +/**
1.379 +@publishedPartner
1.380 +@released
1.381 +*/
1.382 +enum TCmdStartAppVersion
1.383 + {
1.384 + ECmdStartAppInitialVersion = 1
1.385 +#ifdef SYMBIAN_SSM_FLEXIBLE_MERGE
1.386 + /*
1.387 + The ECmdStartAppVersionWithPriority will support the priority field in the command
1.388 + */
1.389 + , ECmdStartAppVersionWithPriority
1.390 +#endif
1.391 + };
1.392 +
1.393 +/**
1.394 +@publishedPartner
1.395 +@released
1.396 +*/
1.397 +enum TCmdStartProcessVersion
1.398 + {
1.399 + ECmdStartProcessInitialVersion = 1
1.400 +#ifdef SYMBIAN_SSM_FLEXIBLE_MERGE
1.401 + /*
1.402 + The ECmdStartProcessVersionWithPriority will support the priority field in the command
1.403 + */
1.404 + , ECmdStartProcessVersionWithPriority
1.405 +#endif
1.406 + };
1.407 +
1.408 +/**
1.409 +@publishedPartner
1.410 +@released
1.411 +*/
1.412 +enum TCmdWaitForApparcInitVersion
1.413 + {
1.414 + ECmdWaitForApparcInitInitialVersion = 1
1.415 +#ifdef SYMBIAN_SSM_FLEXIBLE_MERGE
1.416 + /*
1.417 + The ECmdWaitForApparcInitVersionWithPriority will support the priority field in the command
1.418 + */
1.419 + , ECmdWaitForApparcInitVersionWithPriority
1.420 +#endif
1.421 + };
1.422 +
1.423 +/**
1.424 +@publishedPartner
1.425 +@released
1.426 +*/
1.427 +enum TSsmMonitorInfoVersion
1.428 + {
1.429 + ESsmMonitorInfoInitialVersion = 1
1.430 + };
1.431 +
1.432 +/** Defines the possible unloading options for the custom command dll
1.433 +@publishedPartner
1.434 +@released
1.435 +*/
1.436 +enum TCmdCustomCommandLibUnloading
1.437 + {
1.438 + EUnloadOnCommandCompletion = 0, // once Custom Command has completed, the dll is unloaded
1.439 + ENeverUnload // no attempt is made to unload the dll
1.440 + };
1.441 +
1.442 +/** Defines the action to be taken on component failure.
1.443 +This should be used to set the restart_policy member of SSM_MONITOR_INFO structure to determine what to do
1.444 +when all retry attempts of the component have failed.
1.445 +
1.446 +@publishedPartner
1.447 +@released
1.448 +*/
1.449 +enum TSsmRecoveryMethod
1.450 + {
1.451 + /**
1.452 + Ignore the command failure
1.453 + */
1.454 + ESsmIgnoreOnFailure,
1.455 + /**
1.456 + Reboot the OS
1.457 + */
1.458 + ESsmRestartOS,
1.459 + /**
1.460 + Reboot the OS in a particular mode
1.461 + */
1.462 + ESsmRestartOSWithMode,
1.463 + /**
1.464 + Reboot the OS (with no attempts to restart the component being attempted)
1.465 + */
1.466 + ESsmCriticalNoRetries
1.467 + };
1.468 +
1.469 +#endif // __SSMCMD_HRH__