|
1 /* |
|
2 * Copyright (c) 2003-2006 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: Declares common constants to be used in both resources and |
|
15 * C++ code of consumers and providers. |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 #ifndef AIW_COMMON_HRH |
|
24 #define AIW_COMMON_HRH |
|
25 |
|
26 // DATA TYPES |
|
27 |
|
28 // CONSTANTS |
|
29 |
|
30 /** |
|
31 * Predefined service commands (UIDs). |
|
32 */ |
|
33 enum TAiwServiceCommands |
|
34 { |
|
35 /** Null value. */ |
|
36 KAiwCmdNone = 0, |
|
37 |
|
38 /** Show help content. */ |
|
39 KAiwCmdHelp = 0x10275075, |
|
40 |
|
41 /** Client can request that map should be displayed on screen. */ |
|
42 KAiwCmdMnShowMap = 0x10206904, |
|
43 |
|
44 /** Allows to start navigation to desired destination. */ |
|
45 KAiwCmdMnNavigateTo = 0x10206905, |
|
46 |
|
47 /** Starts reverse geocoding request: finding address for given coordinate. */ |
|
48 KAiwCmdMnAddrByCoord = 0x10206906, |
|
49 |
|
50 /** Starts geocoding request: finding coordinate by given address. */ |
|
51 KAiwCmdMnCoordByAddr = 0x10206907, |
|
52 |
|
53 /** Allows client to request that user shall select a location from map. */ |
|
54 KAiwCmdMnSelectFromMap = 0x10206908 |
|
55 }; |
|
56 |
|
57 |
|
58 // Service command strings. These strings are used in service provider's |
|
59 // opaque data field to specify what service command(s) the provider implements. |
|
60 |
|
61 #define KAiwCmdNoneStr "00000000" |
|
62 #define KAiwCmdHelpStr "10275075" |
|
63 #define KAiwCmdMnShowMapStr "10206904" |
|
64 #define KAiwCmdMnNavigateToStr "10206905" |
|
65 #define KAiwCmdMnAddrByCoordStr "10206906" |
|
66 #define KAiwCmdMnCoordByAddrStr "10206907" |
|
67 #define KAiwCmdMnSelectFromMapStr "10206908" |
|
68 |
|
69 |
|
70 /** |
|
71 * Service command options (bits) to alter command handling behaviour. |
|
72 */ |
|
73 enum TAiwServiceCmdOptions |
|
74 { |
|
75 /** |
|
76 * Consumer wants asynchronous command handling. |
|
77 * The default is synchronous command handling. |
|
78 * In asynchronous case consumer needs to pass a callback to provider. |
|
79 */ |
|
80 KAiwOptASyncronous = 0x0001, |
|
81 |
|
82 /** |
|
83 * Consumer wants provider to make a callback to check coming output |
|
84 * parameters prior returning from service command handling. |
|
85 * Consumer needs to pass a callback to provider. |
|
86 */ |
|
87 KAiwOptOutParamCheck = 0x0002, |
|
88 |
|
89 /** |
|
90 * Consumer tells provider that it is prepared to handle |
|
91 * callback events for possibly incomplete/wrong parameter list. |
|
92 */ |
|
93 KAiwOptInParamCheck = 0x0004, |
|
94 |
|
95 /** |
|
96 * Consumer wants to cancel an asynchronous AIW service. |
|
97 * When a consumer wants to cancel the asynchronous service that a provider |
|
98 * is executing, it should call ExecuteMenuCmdL() or ExecuteServiceCmdL() |
|
99 * with the same parameters as when requesting the service, but set this |
|
100 * cancel bit on. The cancel operation itself is synchronous, i.e. the |
|
101 * provider must call the consumer's callback with KAiwEventCanceled before |
|
102 * the Execute*CmdL() returns. |
|
103 */ |
|
104 KAiwOptCancel = 0x0008 |
|
105 }; |
|
106 |
|
107 |
|
108 /** |
|
109 * Service classes (UID). Technically these are same as service interface UIDs. |
|
110 */ |
|
111 enum TAiwServiceClass |
|
112 { |
|
113 /** |
|
114 * None. |
|
115 */ |
|
116 KAiwClassNone = 0x0, |
|
117 |
|
118 /** |
|
119 * Base service (no UI expected). |
|
120 * Every other class must implement this always! |
|
121 */ |
|
122 KAiwClassBase = 0x101F8650, |
|
123 |
|
124 /** |
|
125 * Menu service class (offers menu based services). |
|
126 */ |
|
127 KAiwClassMenu = 0x101F8652 |
|
128 }; |
|
129 |
|
130 |
|
131 /** |
|
132 * Event codes. To be used with HandleNotifyL method. |
|
133 */ |
|
134 enum |
|
135 { |
|
136 /** |
|
137 * Asynchronous service informs consumer to prepare itself for |
|
138 * action. |
|
139 */ |
|
140 KAiwEventStarted = 1, |
|
141 |
|
142 /** |
|
143 * Asynchronous service request completed. |
|
144 */ |
|
145 KAiwEventCompleted = 2, |
|
146 |
|
147 /** |
|
148 * Asynchronous service request canceled. |
|
149 */ |
|
150 KAiwEventCanceled = 3, |
|
151 |
|
152 /** |
|
153 * Error during asynchronous service request. |
|
154 */ |
|
155 KAiwEventError = 4, |
|
156 |
|
157 /** |
|
158 * Relates to KAiwOptOutParamCheck. |
|
159 */ |
|
160 KAiwEventOutParamCheck = 5, |
|
161 |
|
162 /** |
|
163 * Relates to KAiwOptInParamCheck. |
|
164 */ |
|
165 KAiwEventInParamCheck = 6, |
|
166 |
|
167 /** |
|
168 * Provider informs consumer that service is no longer available or |
|
169 * has stopped. |
|
170 */ |
|
171 KAiwEventStopped = 7, |
|
172 |
|
173 /** |
|
174 * Provider asks consumer whether Exit can be done (needed at least in |
|
175 * embedded use cases where server application offers Exit possibility |
|
176 * to end user, but consumer can not allow Exit due to fact that for |
|
177 * example network connections owned by consumer are open and they need |
|
178 * to be kept alive). |
|
179 */ |
|
180 KAiwEventQueryExit = 8 |
|
181 }; |
|
182 |
|
183 // ============================================================================ |
|
184 // Menu item flags for AIW consumers. |
|
185 // ============================================================================ |
|
186 /** |
|
187 * Always keep the provider menu items in a submenu. |
|
188 */ |
|
189 #define AIW_CASCADE_ID 0x01010001 |
|
190 |
|
191 /** |
|
192 * Menu item is placed intelligently either to the main level or a submenu. |
|
193 */ |
|
194 #define AIW_INTELLIGENT_CASCADE_ID 0x01010010 |
|
195 |
|
196 /** |
|
197 * Consumer defines the menu title. |
|
198 */ |
|
199 #define AIW_LOCK_SUBMENU_TITLE 0x00000020 |
|
200 |
|
201 // ============================================================================ |
|
202 // Criteria item flags for AIW consumers. |
|
203 // ============================================================================ |
|
204 /** |
|
205 * Criteria item loadOptions bit, only providers in ROM are accepted. |
|
206 */ |
|
207 #define AIW_OPTIONS_ROM_ONLY 0x01 |
|
208 |
|
209 #endif // AIW_COMMON_HRH |
|
210 |
|
211 // End of file |
|
212 |
|
213 |