|
1 /* |
|
2 * Copyright (c) 2002-2005 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: Common constants. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef PHCLTCLIENTSERVER_H |
|
20 #define PHCLTCLIENTSERVER_H |
|
21 |
|
22 |
|
23 |
|
24 // INCLUDES |
|
25 #include <e32base.h> |
|
26 #ifdef SYMBIAN_OLD_EXPORT_LOCATION // Include should be removed when flag disabled from builds |
|
27 #include <cntdef.h> |
|
28 #endif |
|
29 #include <etelmm.h> |
|
30 #include <data_caging_path_literals.hrh> |
|
31 |
|
32 // CONSTANTS |
|
33 |
|
34 |
|
35 // Server startup related |
|
36 const TUid KPhCltServerUid = { 0x10000850 }; // from PhoneServer.mmp |
|
37 _LIT( PHONE_SERVER_NAME, "Phone Server" ); |
|
38 |
|
39 _LIT( KPhServerPathAndNameWINS, "PhoneServer" ); |
|
40 _LIT( KPhServerPathAndNameMARM, "PhoneServer.exe" ); |
|
41 |
|
42 _LIT( KPhServerThreadName, "PhoneServerThread" ); |
|
43 _LIT( KPhServerThreadNameFormat, "0x%8x" ); |
|
44 const TInt KPhMaxServerThreadNameLength = 30; |
|
45 const TUint KDefaultHeapSize = 0x10000; |
|
46 |
|
47 const TUid KUssdSecureId = { 0x10005955 }; |
|
48 const TUid KSatSecureId = { 0x1000A833 }; |
|
49 const TUid KPhoneSecureId = { 0x100058b3 }; |
|
50 #if defined(__WINSCW__) |
|
51 const TUid KEunitExeRunnerId = {0x20000fb3 }; // To enable module testing using EUnit |
|
52 #endif // __WINSCW__ |
|
53 |
|
54 // Phone client panic code - when the client is panicked by the server |
|
55 _LIT( KPhClientPanicCategory, "PhoneClient" ); |
|
56 |
|
57 // Resource file for USSD part. |
|
58 _LIT( KPhClientAndServerResourceFileName, "PhoneServer" ); |
|
59 _LIT( KPhCltServerZDrive, "z:" ); |
|
60 |
|
61 _LIT( KPhClientAndServerResourceFileExtensionWild, ".R??" ); |
|
62 _LIT( KPhClientAndServerResourceFileExtensionNoWild, ".RSC" ); |
|
63 const TInt KPhSrvMagicResourceFileSignature = 0; |
|
64 |
|
65 // PhoneClient resource file. |
|
66 _LIT( KPhCltResourceFileNameAndPath, "phoneclient.rsc" ); |
|
67 |
|
68 // The max amount of encoded USSD octects. |
|
69 const TInt KPhCltUssdMax7BitCharacterOctets = |
|
70 RMobileUssdMessaging::KGsmUssdDataSize; // 160 |
|
71 // The max amount of characters to be encoded as USSD octects. |
|
72 const TInt KPhCltUssdMax8BitCharacters = |
|
73 ( KPhCltUssdMax7BitCharacterOctets * 8 ) / 7; // 182 |
|
74 |
|
75 |
|
76 // DATA TYPES |
|
77 |
|
78 // Server initiated Client Panics - when the client is |
|
79 // mis-using the server API |
|
80 enum TPhCltServerInitiatedPanic |
|
81 { |
|
82 EPhCltServerInitiatedPanicInvalidRequest = 0, // Request is invalid. |
|
83 EPhCltServerInitiatedPanicInvalidHandle, // Handle is invalid. |
|
84 EPhCltServerInitiatedPanicBadDescriptor, // Descriptor is invalid. |
|
85 // Session request is inappropriate. |
|
86 EPhCltServerInitiatedPanicInappropriateSessionRequest, |
|
87 // The active object or request is already active. |
|
88 EPhCltServerInitiatedPanicRequestAlreadyActive, |
|
89 // The request is not active. |
|
90 EPhCltServerInitiatedPanicRequestNotActive, |
|
91 |
|
92 // From ussd |
|
93 EPhCltServerInitiatedPanicNotAssigned, // Not assigned. |
|
94 EPhCltServerInitiatedPanicNotConnected, // Connection not established. |
|
95 // The handler is missing. |
|
96 EPhCltServerInitiatedPanicNotifyHandlerMissing, |
|
97 EPhCltServerInitiatedPanicWaitingIsUsed, // Waiting is used. |
|
98 // |
|
99 EPhCltServerInitiatedPanicLast // Keep as last. |
|
100 }; |
|
101 |
|
102 // Opcodes used in message passing between Phone Client and Phone Server. |
|
103 enum TPhCltServerRequest |
|
104 { |
|
105 /** |
|
106 * ----> FROM RPhCltExtCall |
|
107 */ |
|
108 EPhoneServerExtCallSubSessionOpen = 0, // Open ExtCall subsession. |
|
109 EPhoneServerExtCallSubSessionClose, // Close ExtCall subsession. |
|
110 EPhoneServerExtCallSubSessionMakeCall, // Make a call. |
|
111 EPhoneServerExtCallSubSessionMakeCallCancel, // Cancel call creation. |
|
112 |
|
113 /** |
|
114 * ----> FROM RPhCltCallNotify |
|
115 */ |
|
116 EPhoneServerNotifySubSessionOpen = 100, // Open notify subsession. |
|
117 EPhoneServerNotifySubSessionClose, // Close notify subsession. |
|
118 // Notify call request attempt. |
|
119 EPhoneServerNotifySubSessionNotifyCallRequest, |
|
120 // Notify call request canceling. |
|
121 EPhoneServerNotifySubSessionNotifyCallRequestCancel, |
|
122 // Notify call status request. |
|
123 EPhoneServerNotifySubSessionNotifyStatusRequest, |
|
124 // Notify call status request cancel. |
|
125 EPhoneServerNotifySubSessionNotifyStatusRequestCancel, |
|
126 // Report phone status. |
|
127 EPhoneServerNotifySubSessionReportPhoneStatus, |
|
128 // Report phone status cancel. |
|
129 EPhoneServerNotifySubSessionReportPhoneStatusCancel, |
|
130 // Report the result of the call. |
|
131 EPhoneServerNotifySubSessionReportCallResult, |
|
132 // Notify dial data |
|
133 EPhoneServerNotifySubSessionDialData, |
|
134 |
|
135 |
|
136 /** |
|
137 * ----> FROM RPhCltUssd |
|
138 */ |
|
139 EPhoneServerUSSDSubSessionOpen = 200, // Open USSD subsession. |
|
140 EPhoneServerUSSDSubSessionClose, // Close USSD subsession. |
|
141 EPhoneServerUSSDSubSessionSendMessage, // Send USSD message. |
|
142 EPhoneServerUSSDSubSessionSendMessageCancel,// Cancel USSD message sending. |
|
143 EPhoneServerUSSDSubSessionStartEditing, // Start Service command editor. |
|
144 EPhoneServerUSSDSubSessionAppStarting, // SCE is starting. |
|
145 EPhoneServerUSSDSubSessionAppTerminating, // SCE is terminating. |
|
146 EPhoneServerUSSDSubSessionAppToForeground, // SCE comes to foreground. |
|
147 EPhoneServerUSSDSubSessionAppToBackground, // SCE goes to background. |
|
148 EPhoneServerUSSDSubSessionStartSAT, // SAT session is started. |
|
149 EPhoneServerUSSDSubSessionStopSAT, // Stop SAT session. |
|
150 |
|
151 /** |
|
152 * ----> FROM RPhCltEmergencyNumber |
|
153 */ |
|
154 EPhoneServerEmergencyNumberSubSessionOpen = 300, // Open EN subsession. |
|
155 EPhoneServerEmergencyNumberSubSessionClose, // Close EN subsession. |
|
156 // Check is the number emergency number or not. |
|
157 EPhoneServerEmergencyNumberSubSessionIsEmergencyNumber, |
|
158 EPhoneServerEmergencyNumberSubsessionEmergencyDial, |
|
159 EPhoneServerEmergencyNumberSubsessionEmergencyDialCancel, |
|
160 /** |
|
161 * ---> FROM RPhCltIhf |
|
162 */ |
|
163 EPhoneServerIhfSubSessionOpen = 400, // Open IHF subsession. |
|
164 EPhoneServerIhfSubSessionClose, // Close IHF subsession. |
|
165 EPhoneServerIhfSubSessionSetMode, // Set IHF mode. |
|
166 EPhoneServerIhfSubSessionSetModeFromPhone, // Set IHF mode from Phone app. |
|
167 |
|
168 /** |
|
169 * ----> Other |
|
170 */ |
|
171 EPhoneCreateAll = 500, // Create all subsessions |
|
172 |
|
173 // |
|
174 EPhoneServerLast, // Keep as last for PhoneClient. |
|
175 |
|
176 /** |
|
177 * ----> Base for Phone Client extensions, that may be defined in some other |
|
178 * header file. |
|
179 */ |
|
180 EPhoneServerExtensionBase = 600, |
|
181 |
|
182 /** |
|
183 * ----> FROM RPhCltEmergencyCallNotify |
|
184 */ |
|
185 //EPhoneServerNotifyEmergencySubSessionOpen, |
|
186 EPhoneServerNotifyEmergencySubSessionOpen = 1500, // Open notify subsession. |
|
187 EPhoneServerNotifyEmergencySubSessionClose, // Close notify subsession. |
|
188 // Notify call request attempt. |
|
189 EPhoneServerNotifyEmergencySubSessionNotifyCallRequest, |
|
190 // Notify call request canceling. |
|
191 EPhoneServerNotifyEmergencySubSessionNotifyCallRequestCancel, |
|
192 // Report the result of the call. |
|
193 EPhoneServerNotifyEmergencySubSessionReportCallResult |
|
194 |
|
195 |
|
196 |
|
197 }; |
|
198 |
|
199 /** |
|
200 * Opcodes used in message passing between Phone Client and Phone Server. |
|
201 */ |
|
202 enum TPhCltComHandServerRequest |
|
203 { |
|
204 /** |
|
205 * ---> FROM RPhCltCommandHandler |
|
206 */ |
|
207 // Open command handler subsession. |
|
208 EPhoneServerComHandSubSessionOpen = EPhoneServerExtensionBase, |
|
209 EPhoneServerComHandSubSessionClose, // Close comhand subsession. |
|
210 EPhoneServerComHandSubSessionAtd, // Atd. |
|
211 EPhoneServerComHandSubSessionAta, // Ata. |
|
212 EPhoneServerComHandSubSessionChld, // Chld. |
|
213 EPhoneServerComHandSubSessionChup, // Chup. |
|
214 EPhoneServerComHandSubSessionVts, // Vts. |
|
215 EPhoneServerComHandSubSessionCancel, // Cancel ongoing request. |
|
216 EPhoneServerComHandSubSessionMuteMic, // MuteMic |
|
217 EPhoneServerComHandSubSessionMuteRingingTone, // MuteRingingTone |
|
218 |
|
219 /** |
|
220 * ----> FROM RPhCltCommandHandlerNotify |
|
221 */ |
|
222 // Open command handler notify subsession. |
|
223 EPhoneServerComHandNotifySubSessionOpen = EPhoneServerExtensionBase + 100, |
|
224 // Close command handler notify subsession. |
|
225 EPhoneServerComHandNotifySubSessionClose, |
|
226 // Notify command handler request attempt. |
|
227 EPhoneServerComHandNotifySubSessionComHandRequest, |
|
228 // Notify command handler request canceling. |
|
229 EPhoneServerComHandNotifySubSessionComHandRequestCancel, |
|
230 // Report the result of the command handler request. |
|
231 EPhoneServerComHandNotifySubSessionReportComHandResult, |
|
232 // |
|
233 EPhoneServerComHandLast // Keep as last. |
|
234 }; |
|
235 |
|
236 /** |
|
237 * Opcodes used in message passing between |
|
238 * Phone Client Extension Messenger and Phone Server. |
|
239 */ |
|
240 enum TPhCltMessengerServerRequest |
|
241 { |
|
242 /** |
|
243 * ---> FROM RPhCltMessenger |
|
244 * @since 2.6 |
|
245 */ |
|
246 // Open Messenger subsession. |
|
247 EPhoneServerMessengerSubSessionOpen = EPhoneServerExtensionBase + 200, |
|
248 // Construct (reserve memory for) opened subsession. |
|
249 EPhoneServerMessengerSubSessionConstruct, |
|
250 EPhoneServerMessengerSubSessionClose, // Close Messenger subsession. |
|
251 EPhoneServerMessengerSubSessionReceive, // Receive. |
|
252 EPhoneServerMessengerSubSessionSend, // Send. |
|
253 EPhoneServerMessengerSubSessionCancel, // CancelRequest. |
|
254 EPhoneServerMessengerSubSessionSkip, // Skip. |
|
255 |
|
256 EPhoneServerMessengerLast // Keep as last. |
|
257 }; |
|
258 |
|
259 /** |
|
260 * Opcodes used in message passing between |
|
261 * Phone Client Extension and Phone Server. |
|
262 * Image handling specific. |
|
263 * |
|
264 * @since Series 60 3.0 |
|
265 */ |
|
266 |
|
267 enum TPhCltImageHandlerRequest |
|
268 { |
|
269 EPhoneServerImageHandlerSubSessionOpen = EPhoneServerExtensionBase + 300, |
|
270 EPhoneServerImageHandlerSubSessionClose, // Closes image handler subsession. |
|
271 EPhoneServerImageHandlerSubSessionSave, // SaveImages (deprecated for VT) |
|
272 EPhoneServerImageHandlerSubSessionLoad, // LoadImages (deprecated for VT) |
|
273 EPhoneServerImageHandlerSubSessionCommitLoad, // Finalize load operation |
|
274 EPhoneServerSaveVtImage, // saves VT image file |
|
275 EPhoneServerOpenVtImage, // opens VT image file |
|
276 EPhoneServerSaveVtImageCancel |
|
277 }; |
|
278 |
|
279 |
|
280 |
|
281 /** |
|
282 * Enumerates fixed operator logo indexes. |
|
283 * |
|
284 * @since Series60 3.2 |
|
285 * |
|
286 * EPhCltOperatorLogoIndex - only one logo at a time. |
|
287 * EPhCltCountryCode - logo specific country code. |
|
288 * EPhCltNetworkCode - logo specific country code. |
|
289 * EPhCltLogoTypeIndex - logo type |
|
290 */ |
|
291 enum TPhCltExtOperatorLogoIndexes |
|
292 { |
|
293 EPhCltExtIndexNotSet = -1, |
|
294 EPhCltExtOperatorLogoIndex = 0, |
|
295 EPhCltExtCountryCodeIndex, |
|
296 EPhCltExtNetworkCodeIndex, |
|
297 EPhCltExtLogoTypeIndex |
|
298 }; |
|
299 |
|
300 |
|
301 #endif // PHCLTCLIENTSERVER_H |
|
302 |
|
303 // End of File |