|
1 /* |
|
2 * Copyright (c) 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 * Command lists for the RF SWP: |
|
16 * - Normal RF On. |
|
17 * - Normal RF Off. |
|
18 * - Normal BT SAP. |
|
19 * |
|
20 */ |
|
21 |
|
22 #include <ssm/ssmcmd.rh> |
|
23 #include <ssm/clayerswp.hrh> |
|
24 |
|
25 #include "ssmswp.hrh" |
|
26 #include "ssmdlldatadefs.rh" |
|
27 |
|
28 // Identify command list type |
|
29 UID2 KUidSsmCommandListResourceFile |
|
30 |
|
31 // --------------------------------------------------------------------------- |
|
32 // r_entry_point |
|
33 // This must be the first resource |
|
34 // --------------------------------------------------------------------------- |
|
35 // |
|
36 RESOURCE SSM_COMMAND_LIST_ROOT r_entry_point |
|
37 { |
|
38 command_list_mapping = r_map; |
|
39 } |
|
40 |
|
41 // --------------------------------------------------------------------------- |
|
42 // r_map |
|
43 // Mapping of command list ids to resource ids. |
|
44 // --------------------------------------------------------------------------- |
|
45 // |
|
46 RESOURCE SSM_COMMAND_LIST_MAPPING r_map |
|
47 { |
|
48 mappings = |
|
49 { |
|
50 SSM_COMMANDLISTID_TO_RESOURCEID |
|
51 { |
|
52 command_list_id = ESsmRfOn; |
|
53 resource_id = r_online_commands; |
|
54 }, |
|
55 SSM_COMMANDLISTID_TO_RESOURCEID |
|
56 { |
|
57 command_list_id = ESsmRfOff; |
|
58 resource_id = r_offline_commands; |
|
59 }, |
|
60 SSM_COMMANDLISTID_TO_RESOURCEID |
|
61 { |
|
62 command_list_id = ESsmBtSap; |
|
63 resource_id = r_btsap_commands; |
|
64 } |
|
65 }; |
|
66 } |
|
67 |
|
68 // =========================================================================== |
|
69 // Command lists in alphabetical order |
|
70 // =========================================================================== |
|
71 // |
|
72 |
|
73 // --------------------------------------------------------------------------- |
|
74 // r_btsap_commands |
|
75 // --------------------------------------------------------------------------- |
|
76 // |
|
77 RESOURCE SSM_COMMAND_LIST r_btsap_commands |
|
78 { |
|
79 commands = |
|
80 { |
|
81 r_cmd_sastate_btsap, // This needs to be the first command in state, prio 0xFFF2 |
|
82 r_cmd_publishswp, // prio 0xFFF1 |
|
83 r_cmd_psstate_btsap // prio 0xFFF0 |
|
84 }; |
|
85 } |
|
86 |
|
87 // --------------------------------------------------------------------------- |
|
88 // r_offline_commands |
|
89 // --------------------------------------------------------------------------- |
|
90 // |
|
91 RESOURCE SSM_COMMAND_LIST r_offline_commands |
|
92 { |
|
93 commands = |
|
94 { |
|
95 r_cmd_sastate_offline, // This needs to be the first command in state, prio 0xFFF2 |
|
96 r_cmd_publishswp, // prio 0xFFF1 |
|
97 r_cmd_psstate_offline // prio 0xFFF0 |
|
98 }; |
|
99 } |
|
100 |
|
101 // --------------------------------------------------------------------------- |
|
102 // r_online_commands |
|
103 // --------------------------------------------------------------------------- |
|
104 // |
|
105 RESOURCE SSM_COMMAND_LIST r_online_commands |
|
106 { |
|
107 commands = |
|
108 { |
|
109 r_cmd_sastate_online, // This needs to be the first command in state, prio 0xFFF2 |
|
110 r_cmd_publishswp, // prio 0xFFF1 |
|
111 r_cmd_psstate_online // prio 0xFFF0 |
|
112 }; |
|
113 } |
|
114 |
|
115 // =========================================================================== |
|
116 // Command items in alphabetical order |
|
117 // =========================================================================== |
|
118 // |
|
119 |
|
120 // --------------------------------------------------------------------------- |
|
121 // r_cmd_psstate_btsap |
|
122 // --------------------------------------------------------------------------- |
|
123 // |
|
124 RESOURCE SSM_SET_PUBLISH_AND_SUBSCRIBE r_cmd_psstate_btsap |
|
125 { |
|
126 priority = 0xFFF0; |
|
127 severity = ECmdCriticalSeverity; |
|
128 category = 0x101F8766; // KPSUidStartup |
|
129 key = 0x00000041; // KPSGlobalSystemState |
|
130 value = 111; // ESwStateNormalBTSap |
|
131 } |
|
132 |
|
133 // --------------------------------------------------------------------------- |
|
134 // r_cmd_psstate_offline |
|
135 // --------------------------------------------------------------------------- |
|
136 // |
|
137 RESOURCE SSM_SET_PUBLISH_AND_SUBSCRIBE r_cmd_psstate_offline |
|
138 { |
|
139 priority = 0xFFF0; |
|
140 severity = ECmdCriticalSeverity; |
|
141 category = 0x101F8766; // KPSUidStartup |
|
142 key = 0x00000041; // KPSGlobalSystemState |
|
143 value = 110; // ESwStateNormalRfOff |
|
144 } |
|
145 |
|
146 // --------------------------------------------------------------------------- |
|
147 // r_cmd_psstate_online |
|
148 // --------------------------------------------------------------------------- |
|
149 // |
|
150 RESOURCE SSM_SET_PUBLISH_AND_SUBSCRIBE r_cmd_psstate_online |
|
151 { |
|
152 priority = 0xFFF0; |
|
153 severity = ECmdCriticalSeverity; |
|
154 category = 0x101F8766; // KPSUidStartup |
|
155 key = 0x00000041; // KPSGlobalSystemState |
|
156 value = 109; // ESwStateNormalRfOn |
|
157 } |
|
158 |
|
159 // --------------------------------------------------------------------------- |
|
160 // r_cmd_publishswp |
|
161 // --------------------------------------------------------------------------- |
|
162 // |
|
163 RESOURCE SSM_PUBLISH_SYSTEM_WIDE_PROPERTY r_cmd_publishswp |
|
164 { |
|
165 priority = 0xFFF1; |
|
166 severity = ECmdCriticalSeverity; |
|
167 } |
|
168 |
|
169 // --------------------------------------------------------------------------- |
|
170 // r_cmd_sastate_btsap |
|
171 // --------------------------------------------------------------------------- |
|
172 // |
|
173 RESOURCE SSM_START_CUSTOM_COMMAND r_cmd_sastate_btsap |
|
174 { |
|
175 priority = 0xFFF2; |
|
176 severity = ECmdCriticalSeverity; |
|
177 dllname = "customcmds.dll"; |
|
178 ordinal = 8; |
|
179 unload_on_finish = ENeverUnload; |
|
180 retries = 2; |
|
181 dll_data = r_dlldata_sastate_btsap; |
|
182 } |
|
183 |
|
184 // --------------------------------------------------------------------------- |
|
185 // r_cmd_sastate_offline |
|
186 // --------------------------------------------------------------------------- |
|
187 // |
|
188 RESOURCE SSM_START_CUSTOM_COMMAND r_cmd_sastate_offline |
|
189 { |
|
190 priority = 0xFFF2; |
|
191 severity = ECmdCriticalSeverity; |
|
192 dllname = "customcmds.dll"; |
|
193 ordinal = 8; |
|
194 unload_on_finish = ENeverUnload; |
|
195 retries = 2; |
|
196 dll_data = r_dlldata_sastate_offline; |
|
197 } |
|
198 |
|
199 // --------------------------------------------------------------------------- |
|
200 // r_cmd_sastate_online |
|
201 // --------------------------------------------------------------------------- |
|
202 // |
|
203 RESOURCE SSM_START_CUSTOM_COMMAND r_cmd_sastate_online |
|
204 { |
|
205 priority = 0xFFF2; |
|
206 severity = ECmdCriticalSeverity; |
|
207 dllname = "customcmds.dll"; |
|
208 ordinal = 8; |
|
209 unload_on_finish = ENeverUnload; |
|
210 retries = 2; |
|
211 dll_data = r_dlldata_sastate_online; |
|
212 } |
|
213 |
|
214 // =========================================================================== |
|
215 // DLL data items in alphabetical order |
|
216 // =========================================================================== |
|
217 // |
|
218 |
|
219 // --------------------------------------------------------------------------- |
|
220 // r_dlldata_sastate_btsap |
|
221 // --------------------------------------------------------------------------- |
|
222 // |
|
223 RESOURCE CMD_PARAM_STATE_CHANGE r_dlldata_sastate_btsap |
|
224 { |
|
225 mainstate = 1; // ESsmNormal |
|
226 substate = 0x1B; |
|
227 } |
|
228 |
|
229 // --------------------------------------------------------------------------- |
|
230 // r_dlldata_sastate_offline |
|
231 // --------------------------------------------------------------------------- |
|
232 // |
|
233 RESOURCE CMD_PARAM_STATE_CHANGE r_dlldata_sastate_offline |
|
234 { |
|
235 mainstate = 1; // ESsmNormal |
|
236 substate = 0x1A; |
|
237 } |
|
238 |
|
239 // --------------------------------------------------------------------------- |
|
240 // r_dlldata_sastate_online |
|
241 // --------------------------------------------------------------------------- |
|
242 // |
|
243 RESOURCE CMD_PARAM_STATE_CHANGE r_dlldata_sastate_online |
|
244 { |
|
245 mainstate = 1; // ESsmNormal |
|
246 substate = 0x19; |
|
247 } |