phoneclientserver/phoneserver/Inc/Ussd/CPhSrvUssdManager.h
changeset 15 d7fc66ccd6fb
parent 13 e32024264ebb
child 39 cee7e9e0906c
equal deleted inserted replaced
13:e32024264ebb 15:d7fc66ccd6fb
     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".
    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 
    40 
    42 // CLASS DECLARATION
    41 // CLASS DECLARATION
    43 
    42 
    47 *  @since 1.0
    46 *  @since 1.0
    48 */
    47 */
    49 class CPhSrvUssdManager : 
    48 class CPhSrvUssdManager : 
    50     public CActive, 
    49     public CActive, 
    51     public MPhSrvUssdNetworkObserver, 
    50     public MPhSrvUssdNetworkObserver, 
    52     public MPhSrvUssdReplyTimerObserver
    51     public MPhSrvUssdReplyTimerObserver,
       
    52     public MHbDeviceMessageBoxObserver
    53     {
    53     {
    54     public:  // Constructors and destructor
    54     public:  // Constructors and destructor
    55 
    55 
    56         /**
    56         /**
    57         * C++ constructor.
    57         * C++ constructor.
   159         /**
   159         /**
   160         * @see MPhSrvUssdReplyTimerObserver
   160         * @see MPhSrvUssdReplyTimerObserver
   161         */
   161         */
   162         void UssdReplyTimerObserverHandleExpiredL( TInt aError );
   162         void UssdReplyTimerObserverHandleExpiredL( TInt aError );
   163         
   163         
       
   164         /**
       
   165         * @see MHbDeviceMessageBoxObserver
       
   166         */        
       
   167         void MessageBoxClosed(const CHbDeviceMessageBoxSymbian* aMessageBox,
       
   168             CHbDeviceMessageBoxSymbian::TButtonId aButton);
       
   169         
   164         /*
   170         /*
   165         * @see CActive
   171         * @see CActive
   166         */
   172         */
   167         void RunL();
   173         void RunL();
   168         
   174         
   173         
   179         
   174         /*
   180         /*
   175         * @see CActive
   181         * @see CActive
   176         */
   182         */
   177         TInt RunError( TInt aError );
   183         TInt RunError( TInt aError );
   178  
       
   179 
       
   180 
   184 
   181     private: // New functions
   185     private: // New functions
   182         
   186         
   183         CPhSrvUssdSendHandler& SendHandlerL();
   187         CPhSrvUssdSendHandler& SendHandlerL();
   184 
   188 
   301         /**
   305         /**
   302         * Updates Notify Message
   306         * Updates Notify Message
   303         * 
   307         * 
   304         * @since 3.1
   308         * @since 3.1
   305         */
   309         */
   306         void UpdateNotifyMessage();
   310         void UpdateNotifyMessageL();
   307         
   311         
   308         /**
   312         /**
   309         * Turn lights on
   313         * Turn lights on
   310         * 
   314         * 
   311         * @since 3.1
   315         * @since 3.1
   312         */
   316         */
   313         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 );
   314 
   324 
   315     private:     // Data
   325     private:     // Data
   316 
   326         
   317         // The file session reference.
   327         // The file session reference.
   318         RFs& iFsSession;
   328         RFs& iFsSession;
   319         
   329         
   320         // The resource manager reference.
   330         // The resource manager reference.
   321         CPhSrvResourceManager& iResourceManager;
   331         CPhSrvResourceManager& iResourceManager;
   340         
   350         
   341         // The buffer for received message.
   351         // The buffer for received message.
   342         TBuf< KPhCltUssdMax8BitCharacters > iReceivedMessage;
   352         TBuf< KPhCltUssdMax8BitCharacters > iReceivedMessage;
   343         
   353         
   344         // The message query for showing USSD operation queries.
   354         // The message query for showing USSD operation queries.
   345         CAknGlobalMsgQuery* iGlobalMsgQuery;
   355         CHbDeviceMessageBoxSymbian* iDeviceDialog;
   346         
   356        
   347         // Is editor emptied.
   357         // Is editor emptied.
   348         TBool iEmptyEditor;
   358         TBool iEmptyEditor;
   349         
   359         
   350         // Will the editor be started.
   360         // Will the editor be started.
   351         TBool iStartEditor;
   361         TBool iStartEditor;
   372         TBool iLaunchGMQ;
   382         TBool iLaunchGMQ;
   373 
   383 
   374         // Local Telephony variant read-only data.
   384         // Local Telephony variant read-only data.
   375         TInt iVariantReadOnlyValues;
   385         TInt iVariantReadOnlyValues;
   376 
   386 
   377         // The message query header text.
       
   378         HBufC* iMeQuHeaderText;
       
   379 
       
   380         // The buffer for received decoded message.
   387         // The buffer for received decoded message.
   381         TBuf< KPhCltUssdMax8BitCharacters > iDecodedMessage;
   388         TBuf< KPhCltUssdMax8BitCharacters > iDecodedMessage;
   382 
   389 
   383         // If ETrue, then the last received USSD message was EUssdMtNotify.
   390         // If ETrue, then the last received USSD message was EUssdMtNotify.
   384         TBool iNotifyMessage;
   391         TBool iNotifyMessage;
   416         // Number of MO ACK messages pending to be sent. Normally max 2.
   423         // Number of MO ACK messages pending to be sent. Normally max 2.
   417         TInt iAcksToBeSent;
   424         TInt iAcksToBeSent;
   418         
   425         
   419         // An asynchronous callback for sending MO ACK messages
   426         // An asynchronous callback for sending MO ACK messages
   420         CAsyncCallBack* iMoAckCallback;
   427         CAsyncCallBack* iMoAckCallback;
       
   428         
       
   429         TBool iTextResolver;
       
   430         
       
   431         HBufC* iTextBuffer;
       
   432 
   421     };
   433     };
   422     
   434     
   423 #endif // CPHSRVUSSDMANAGER_H
   435 #endif // CPHSRVUSSDMANAGER_H
   424 
   436 
   425 
   437