1 /* |
1 /* |
2 * Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). |
2 * Copyright (c) 2002-2010 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 |
28 #include <hbdevicemessageboxsymbian.h> |
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; |
|
39 class CPhSrvUssdSessionCancelWaiter; |
38 class CPhSrvUssdSessionCancelWaiter; |
40 class CPhSrvUssdNotifyNWRelease; |
39 class CPhSrvUssdNotifyNWRelease; |
41 // RM-RIM 417-66528 |
|
42 class CUssdExtensionInterface; |
|
43 |
40 |
44 // CLASS DECLARATION |
41 // CLASS DECLARATION |
45 |
42 |
46 /** |
43 /** |
47 * Handles all the Ussd sessions. |
44 * Handles all the Ussd sessions. |
49 * @since 1.0 |
46 * @since 1.0 |
50 */ |
47 */ |
51 class CPhSrvUssdManager : |
48 class CPhSrvUssdManager : |
52 public CActive, |
49 public CActive, |
53 public MPhSrvUssdNetworkObserver, |
50 public MPhSrvUssdNetworkObserver, |
54 public MPhSrvUssdReplyTimerObserver |
51 public MPhSrvUssdReplyTimerObserver, |
|
52 public MHbDeviceMessageBoxObserver |
55 { |
53 { |
56 public: // Constructors and destructor |
54 public: // Constructors and destructor |
57 |
55 |
58 /** |
56 /** |
59 * C++ constructor. |
57 * C++ constructor. |
214 */ |
216 */ |
215 void UssdHandleReceivedEventL( |
217 void UssdHandleReceivedEventL( |
216 const TDes8& aMsgData, |
218 const TDes8& aMsgData, |
217 const RMobileUssdMessaging::TMobileUssdAttributesV1& |
219 const RMobileUssdMessaging::TMobileUssdAttributesV1& |
218 aMsgAttributes); |
220 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); |
|
231 // Restart the reply timer |
221 // Restart the reply timer |
232 void RestartReplyTimerL(); |
222 void RestartReplyTimerL(); |
233 |
223 |
234 /** Is the reply timer up and running? */ |
224 /** Is the reply timer up and running? */ |
235 TBool NetworkWaitingForAnAnswer(); |
225 TBool NetworkWaitingForAnAnswer(); |
236 |
226 |
237 // Set timer and activate it if there are notifications available |
227 // Set timer and activate it if there are notifications available |
238 void SetActiveIfPendingNotificationsExist(); |
228 void SetActiveIfPendingNotificationsExist(); |
239 |
229 |
240 // RM-RIM 417-66528 |
|
241 // Create and Initialize the global message query |
|
242 void CreateGlobalMessageQueryL( |
|
243 const RMobileUssdMessaging::TMobileUssdAttributesV1& |
|
244 aMsgAttributes); |
|
245 // Launch the global message query (used from RunL) |
230 // Launch the global message query (used from RunL) |
246 void LaunchGlobalMessageQueryL(); |
231 void LaunchGlobalMessageQueryL(); |
247 |
232 |
248 // Send an MO ACK message if any such are pending |
233 // Send an MO ACK message if any such are pending |
249 void ProcessMoAcksL(); |
234 void ProcessMoAcksL(); |
320 /** |
305 /** |
321 * Updates Notify Message |
306 * Updates Notify Message |
322 * |
307 * |
323 * @since 3.1 |
308 * @since 3.1 |
324 */ |
309 */ |
325 void UpdateNotifyMessage(); |
310 void UpdateNotifyMessageL(); |
326 |
311 |
327 /** |
312 /** |
328 * Turn lights on |
313 * Turn lights on |
329 * |
314 * |
330 * @since 3.1 |
315 * @since 3.1 |
331 */ |
316 */ |
332 void TurnLightsOn(); |
317 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 ); |
333 |
324 |
334 private: // Data |
325 private: // Data |
335 |
326 |
336 // The file session reference. |
327 // The file session reference. |
337 RFs& iFsSession; |
328 RFs& iFsSession; |
338 |
329 |
339 // The resource manager reference. |
330 // The resource manager reference. |
340 CPhSrvResourceManager& iResourceManager; |
331 CPhSrvResourceManager& iResourceManager; |
359 |
350 |
360 // The buffer for received message. |
351 // The buffer for received message. |
361 TBuf< KPhCltUssdMax8BitCharacters > iReceivedMessage; |
352 TBuf< KPhCltUssdMax8BitCharacters > iReceivedMessage; |
362 |
353 |
363 // The message query for showing USSD operation queries. |
354 // The message query for showing USSD operation queries. |
364 CAknGlobalMsgQuery* iGlobalMsgQuery; |
355 CHbDeviceMessageBoxSymbian* iDeviceDialog; |
365 |
356 |
366 // Is editor emptied. |
357 // Is editor emptied. |
367 TBool iEmptyEditor; |
358 TBool iEmptyEditor; |
368 |
359 |
369 // Will the editor be started. |
360 // Will the editor be started. |
370 TBool iStartEditor; |
361 TBool iStartEditor; |
391 TBool iLaunchGMQ; |
382 TBool iLaunchGMQ; |
392 |
383 |
393 // Local Telephony variant read-only data. |
384 // Local Telephony variant read-only data. |
394 TInt iVariantReadOnlyValues; |
385 TInt iVariantReadOnlyValues; |
395 |
386 |
396 // The message query header text. |
|
397 HBufC* iMeQuHeaderText; |
|
398 |
|
399 // The buffer for received decoded message. |
387 // The buffer for received decoded message. |
400 TBuf< KPhCltUssdMax8BitCharacters > iDecodedMessage; |
388 TBuf< KPhCltUssdMax8BitCharacters > iDecodedMessage; |
401 |
389 |
402 // If ETrue, then the last received USSD message was EUssdMtNotify. |
390 // If ETrue, then the last received USSD message was EUssdMtNotify. |
403 TBool iNotifyMessage; |
391 TBool iNotifyMessage; |