|
1 <?xml version="1.0" encoding="utf-8"?> |
|
2 <!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. --> |
|
3 <!-- This component and the accompanying materials are made available under the terms of the License |
|
4 "Eclipse Public License v1.0" which accompanies this distribution, |
|
5 and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". --> |
|
6 <!-- Initial Contributors: |
|
7 Nokia Corporation - initial contribution. |
|
8 Contributors: |
|
9 --> |
|
10 <!DOCTYPE task |
|
11 PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"> |
|
12 <task id="GUID-E9FAE433-BDBE-5ABD-B168-6562D29112B1" xml:lang="en"><title>Creating |
|
13 a Static CommandList</title><shortdesc>SCLs contain a list of commands that are run by the SSM. The SysCLE |
|
14 runs these commands as per the policy. The policy for deciding which commandLists |
|
15 are run by the SysCLE is included within the system state Manager component |
|
16 (<filepath>SysStateMgr.exe</filepath>). </shortdesc><prolog><metadata><keywords/></metadata></prolog><taskbody> |
|
17 <context><p>When there is a system state or a property transition, SysState |
|
18 goes through a series of policy steps to find which <codeph>commandList</codeph> must |
|
19 be run by SysCLE. SysCLE responds with a result code which is passed back |
|
20 to the state policy plug-in. The next action returned by the state policy |
|
21 plug-in depends on this result code. SCLs contains a list of commands that |
|
22 are run by the SSM and SysCLE runs the commands as per the policy. SysCLE |
|
23 is based on SysStart, but it is converted into a DLL. After GSA is migrated |
|
24 to SSMA, the current Static Startup Configuration (SSC) commands are maintained. |
|
25 The following table lists the new commands and functions that are introduced |
|
26 into SysCLE. </p><p>Follow the steps given below to create a static <codeph>commandList</codeph>:</p> </context> |
|
27 <steps id="GUID-C7D94CA1-0A62-5CAC-B2DB-118A4DAD2A64"> |
|
28 <step id="GUID-E70E0840-0EFA-559A-9B92-A51E30276DC2"><cmd/> |
|
29 <info>Include <filepath>ssmcmd.rh</filepath> to write a <codeph>commandList</codeph>. </info> |
|
30 </step> |
|
31 <step id="GUID-8D4518E2-C284-57E8-BA72-6DC96C16FC6C"><cmd/> |
|
32 <info>Include <filepath>ssmsubstates.hrh</filepath> to write a <codeph>commandList</codeph> for |
|
33 the system-wide property. </info> |
|
34 </step> |
|
35 <step id="GUID-9A7DB580-C196-51D8-A55C-2FA1B7D74153"><cmd/> |
|
36 <info>Include a constant, UID2 <codeph>KUidSsmCommandListResourceFile</codeph> to |
|
37 identify the startup list. </info> |
|
38 </step> |
|
39 <step id="GUID-E1AB45ED-9D6B-5DA6-AD6F-04654621E1C0"><cmd/> |
|
40 <info>Include <codeph>RESOURCE SSM_COMMAND_LIST_ROOT</codeph>. This is the |
|
41 first resource in a <codeph>commandList</codeph> resource file that needs |
|
42 to be included. </info> |
|
43 <info> <codeph>RESOURCE SSM_COMMAND_LIST_ROOT</codeph> has <codeph>RESOURCE |
|
44 SSM_COMMAND_LIST_MAPPING</codeph> and <codeph>RESOURCE SSM_COMMAND_LIST</codeph>. <note> Resource <codeph>STRUCT |
|
45 SSM_START_AMA_STARTER</codeph> is a resource structure in the command list |
|
46 resource file that needs to be included to launch After Market Components |
|
47 (AMCs) at phone boot time. This structure contains the UID of the DSC to execute. |
|
48 The DSC can be created using the After Market Application (AMA) Starter component.</note></info> |
|
49 </step> |
|
50 </steps> |
|
51 <result><p>The static command list is created. </p> </result> |
|
52 <example><title>Example</title> <p>The following example code shows how a |
|
53 static <codeph>commandList</codeph> is created: </p> <codeblock id="GUID-08C73A05-C6CE-52C9-AD54-EACA2D297AEF" xml:space="preserve"> |
|
54 #include <ssmcmd.rh> |
|
55 #include <ssmsubstates.hrh> |
|
56 UID2 KUidSsmCommandListResourceFile |
|
57 // SSM_COMMAND_LIST_ROOT must be the first resource in a command list resource file. |
|
58 // The SSM relies on this having a resource ID of 1. |
|
59 RESOURCE SSM_COMMAND_LIST_ROOT |
|
60 { |
|
61 command_list_mapping = r_command_list_mapping; |
|
62 } |
|
63 |
|
64 RESOURCE SSM_COMMAND_LIST_MAPPING r_command_list_mapping |
|
65 { |
|
66 mappings = |
|
67 { |
|
68 SSM_COMMANDLISTID_TO_RESOURCEID |
|
69 { |
|
70 command_list_1 = ESsm_1; |
|
71 resource_id_1 = r_commands_1; |
|
72 }, |
|
73 }; |
|
74 } |
|
75 |
|
76 RESOURCE SSM_COMMAND_LIST r_command_1 |
|
77 { |
|
78 commands = |
|
79 { |
|
80 r_command_1, |
|
81 r_command_2, |
|
82 r_command_3, |
|
83 r_command_4 |
|
84 }; |
|
85 } |
|
86 |
|
87 RESOURCE SSM_COMMAND_LIST r_ command_2 |
|
88 { |
|
89 commands = |
|
90 { |
|
91 r_command_1, |
|
92 r_command_2, |
|
93 r_command_3 |
|
94 }; |
|
95 } |
|
96 </codeblock> </example> |
|
97 </taskbody><related-links> |
|
98 <link href="GUID-F8C42900-CA69-5F5B-914A-B085EBB45815.dita"><linktext>After Market |
|
99 Application (AMA) Starter</linktext></link> |
|
100 <link href="GUID-623B375B-6EAD-53A2-AB4E-CCDF1BDB5057.dita"><linktext>Creating |
|
101 a Dynamic start-up Configuration</linktext></link> |
|
102 </related-links></task> |