1 /* |
1 /* |
2 * Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies). |
2 * Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). |
3 * All rights reserved. |
3 * All rights reserved. |
4 * This component and the accompanying materials are made available |
4 * This component and the accompanying materials are made available |
5 * under the terms of "Eclipse Public License v1.0" |
5 * under the terms of "Eclipse Public License v1.0" |
6 * which accompanies this distribution, and is available |
6 * which accompanies this distribution, and is available |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
19 #define CPHSRVUSSDMANAGER_H |
19 #define CPHSRVUSSDMANAGER_H |
20 |
20 |
21 |
21 |
22 // INCLUDES |
22 // INCLUDES |
23 #include <etelmm.h> // ETel |
23 #include <etelmm.h> // ETel |
24 #include "phcltclientserver.h" |
24 #include "PhCltClientServer.h" |
25 #include "mphsrvussdnetworkobserver.h" |
25 #include "MPhSrvUssdNetworkObserver.h" |
26 #include "mphsrvussdreplytimerobserver.h" |
26 #include "MPhSrvUssdReplyTimerObserver.h" |
27 #include <badesca.h> |
27 #include <badesca.h> |
28 #include <hbdevicemessageboxsymbian.h> |
28 |
29 |
29 |
30 // FORWARD DECLARATIONS |
30 // FORWARD DECLARATIONS |
31 class RFs; |
31 class RFs; |
32 class CPhSrvResourceManager; |
32 class CPhSrvResourceManager; |
33 class CPhSrvUssdSendHandler; |
33 class CPhSrvUssdSendHandler; |
34 class CPhSrvUssdReceiveHandler; |
34 class CPhSrvUssdReceiveHandler; |
35 class CPhSrvUssdReplyTimer; |
35 class CPhSrvUssdReplyTimer; |
36 class MPhSrvPhoneInterface; |
36 class MPhSrvPhoneInterface; |
37 class MPhSrvUssdMessageSentObserver; |
37 class MPhSrvUssdMessageSentObserver; |
|
38 class CAknGlobalMsgQuery; |
38 class CPhSrvUssdSessionCancelWaiter; |
39 class CPhSrvUssdSessionCancelWaiter; |
39 class CPhSrvUssdNotifyNWRelease; |
40 class CPhSrvUssdNotifyNWRelease; |
|
41 // RM-RIM 417-66528 |
|
42 class CUssdExtensionInterface; |
40 |
43 |
41 // CLASS DECLARATION |
44 // CLASS DECLARATION |
42 |
45 |
43 /** |
46 /** |
44 * Handles all the Ussd sessions. |
47 * Handles all the Ussd sessions. |
46 * @since 1.0 |
49 * @since 1.0 |
47 */ |
50 */ |
48 class CPhSrvUssdManager : |
51 class CPhSrvUssdManager : |
49 public CActive, |
52 public CActive, |
50 public MPhSrvUssdNetworkObserver, |
53 public MPhSrvUssdNetworkObserver, |
51 public MPhSrvUssdReplyTimerObserver, |
54 public MPhSrvUssdReplyTimerObserver |
52 public MHbDeviceMessageBoxObserver |
|
53 { |
55 { |
54 public: // Constructors and destructor |
56 public: // Constructors and destructor |
55 |
57 |
56 /** |
58 /** |
57 * C++ constructor. |
59 * C++ constructor. |
216 */ |
214 */ |
217 void UssdHandleReceivedEventL( |
215 void UssdHandleReceivedEventL( |
218 const TDes8& aMsgData, |
216 const TDes8& aMsgData, |
219 const RMobileUssdMessaging::TMobileUssdAttributesV1& |
217 const RMobileUssdMessaging::TMobileUssdAttributesV1& |
220 aMsgAttributes); |
218 aMsgAttributes); |
|
219 |
|
220 // RM-RIM 417-66528 |
|
221 /** Third stage handler for received messages meant for extension |
|
222 */ |
|
223 void PorcessReceivedMessageInExtesnionL(const TDes8& aMsgData, |
|
224 const RMobileUssdMessaging::TMobileUssdAttributesV1& |
|
225 aMsgAttributes); |
|
226 /** Third stage handler for received messages |
|
227 */ |
|
228 void ProcessReceivedMessageL(const TDes8& aMsgData, |
|
229 const RMobileUssdMessaging::TMobileUssdAttributesV1& |
|
230 aMsgAttributes); |
221 // Restart the reply timer |
231 // Restart the reply timer |
222 void RestartReplyTimerL(); |
232 void RestartReplyTimerL(); |
223 |
233 |
224 /** Is the reply timer up and running? */ |
234 /** Is the reply timer up and running? */ |
225 TBool NetworkWaitingForAnAnswer(); |
235 TBool NetworkWaitingForAnAnswer(); |
226 |
236 |
227 // Set timer and activate it if there are notifications available |
237 // Set timer and activate it if there are notifications available |
228 void SetActiveIfPendingNotificationsExist(); |
238 void SetActiveIfPendingNotificationsExist(); |
229 |
239 |
|
240 // RM-RIM 417-66528 |
|
241 // Create and Initialize the global message query |
|
242 void CreateGlobalMessageQueryL( |
|
243 const RMobileUssdMessaging::TMobileUssdAttributesV1& |
|
244 aMsgAttributes); |
230 // Launch the global message query (used from RunL) |
245 // Launch the global message query (used from RunL) |
231 void LaunchGlobalMessageQueryL(); |
246 void LaunchGlobalMessageQueryL(); |
232 |
247 |
233 // Send an MO ACK message if any such are pending |
248 // Send an MO ACK message if any such are pending |
234 void ProcessMoAcksL(); |
249 void ProcessMoAcksL(); |
305 /** |
320 /** |
306 * Updates Notify Message |
321 * Updates Notify Message |
307 * |
322 * |
308 * @since 3.1 |
323 * @since 3.1 |
309 */ |
324 */ |
310 void UpdateNotifyMessageL(); |
325 void UpdateNotifyMessage(); |
311 |
326 |
312 /** |
327 /** |
313 * Turn lights on |
328 * Turn lights on |
314 * |
329 * |
315 * @since 3.1 |
330 * @since 3.1 |
316 */ |
331 */ |
317 void TurnLightsOn(); |
332 void TurnLightsOn(); |
318 |
|
319 /** |
|
320 * Load default string by QT style localization |
|
321 * @param aText default string id defined by _LIT |
|
322 */ |
|
323 const TPtrC LoadDefaultString( const TDesC& aText ); |
|
324 |
333 |
325 private: // Data |
334 private: // Data |
326 |
335 |
327 // The file session reference. |
336 // The file session reference. |
328 RFs& iFsSession; |
337 RFs& iFsSession; |
329 |
338 |
330 // The resource manager reference. |
339 // The resource manager reference. |
331 CPhSrvResourceManager& iResourceManager; |
340 CPhSrvResourceManager& iResourceManager; |
350 |
359 |
351 // The buffer for received message. |
360 // The buffer for received message. |
352 TBuf< KPhCltUssdMax8BitCharacters > iReceivedMessage; |
361 TBuf< KPhCltUssdMax8BitCharacters > iReceivedMessage; |
353 |
362 |
354 // The message query for showing USSD operation queries. |
363 // The message query for showing USSD operation queries. |
355 CHbDeviceMessageBoxSymbian* iDeviceDialog; |
364 CAknGlobalMsgQuery* iGlobalMsgQuery; |
356 |
365 |
357 // Is editor emptied. |
366 // Is editor emptied. |
358 TBool iEmptyEditor; |
367 TBool iEmptyEditor; |
359 |
368 |
360 // Will the editor be started. |
369 // Will the editor be started. |
361 TBool iStartEditor; |
370 TBool iStartEditor; |
382 TBool iLaunchGMQ; |
391 TBool iLaunchGMQ; |
383 |
392 |
384 // Local Telephony variant read-only data. |
393 // Local Telephony variant read-only data. |
385 TInt iVariantReadOnlyValues; |
394 TInt iVariantReadOnlyValues; |
386 |
395 |
|
396 // The message query header text. |
|
397 HBufC* iMeQuHeaderText; |
|
398 |
387 // The buffer for received decoded message. |
399 // The buffer for received decoded message. |
388 TBuf< KPhCltUssdMax8BitCharacters > iDecodedMessage; |
400 TBuf< KPhCltUssdMax8BitCharacters > iDecodedMessage; |
389 |
401 |
390 // If ETrue, then the last received USSD message was EUssdMtNotify. |
402 // If ETrue, then the last received USSD message was EUssdMtNotify. |
391 TBool iNotifyMessage; |
403 TBool iNotifyMessage; |