phoneclientserver/phoneclient/Src/UssdWrapper/CPhCltUssdImp.cpp
branchRCL_3
changeset 20 987c9837762f
parent 19 7d48bed6ce0c
equal deleted inserted replaced
19:7d48bed6ce0c 20:987c9837762f
     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".
    16 */
    16 */
    17 
    17 
    18 
    18 
    19 
    19 
    20 // INCLUDE FILES
    20 // INCLUDE FILES
    21 #include "cphcltussdimp.h" 
    21 #include "CPhCltUssdImp.h"
    22 #include "cphcltussdrequesthandler.h" 
    22 #include "CPhCltUssdRequestHandler.h"
    23 #include "phcltclientserver.h" 
    23 #include "PhCltClientServer.h"
    24 #include <phclttypes.h> 
    24 #include <PhCltTypes.h>
    25 
    25 
    26 #include <etelmm.h>
    26 #include <etelmm.h>
    27 #include <f32file.h>
    27 #include <f32file.h>
    28 #include <charconv.h>
    28 #include <charconv.h>
    29 #include <gsmuelem.h>
    29 #include <gsmuelem.h>
    30 #include <coemain.h>  
    30 //
    31 //#include <phoneclient.rsg> 
    31 #include <coemain.h>
       
    32 #include <avkon.hrh>
       
    33 #include <avkon.rsg> 
       
    34 
       
    35 #include <PhoneClient.rsg>
    32 #include <exterror.h>
    36 #include <exterror.h>
    33 
    37 
    34 #include <gsmerror.h>
    38 #include <gsmerror.h>
    35 #include <etelsat.h>
    39 #include <etelsat.h>
    36 
    40 
    37 #include "mphcltussdnotecontrollercallback.h" 
    41 #include "MPhCltUssdNoteControllerCallBack.h"
    38 #include "cphcltussdnotecontroller.h" 
    42 #include "CPhCltUssdNoteController.h"
    39 #include "cphcltussdcommonconstant.h"
    43 
    40 #include "tflogger.h"
       
    41 // CONSTANTS
    44 // CONSTANTS
    42 
    45 
    43 const TUint8 KPhCltUssdDcsDefaultAlphabet = 0x0f; // 00001111
    46 const TUint8 KPhCltUssdDcsDefaultAlphabet = 0x0f; // 00001111
    44                        
    47                        
    45 const TUint8 KPhCltUssdDcsAlphabetDefaultPrecededLanguage = 0x10; // 00010000 
    48 const TUint8 KPhCltUssdDcsAlphabetDefaultPrecededLanguage = 0x10; // 00010000 
   328 // Two-phased constructor.
   331 // Two-phased constructor.
   329 // -----------------------------------------------------------------------------
   332 // -----------------------------------------------------------------------------
   330 //
   333 //
   331 CPhCltUssdImp* CPhCltUssdImp::NewL( TBool aShowNotes )
   334 CPhCltUssdImp* CPhCltUssdImp::NewL( TBool aShowNotes )
   332     {
   335     {
   333     TFLOGSTRING("CPhCltUssdImp: NewL call")
       
   334     CPhCltUssdImp* self = new( ELeave ) CPhCltUssdImp;
   336     CPhCltUssdImp* self = new( ELeave ) CPhCltUssdImp;
   335     CleanupStack::PushL( self );
   337     CleanupStack::PushL( self );
   336     self->ConstructL( aShowNotes );
   338     self->ConstructL( aShowNotes );
   337     CleanupStack::Pop(); // self
   339     CleanupStack::Pop(); // self
   338     TFLOGSTRING("CPhCltUssdImp: NewL exit")
       
   339     return self;
   340     return self;
   340     }
   341     }
   341 
   342 
   342 
   343 
   343 // -----------------------------------------------------------------------------
   344 // -----------------------------------------------------------------------------
   345 // Symbian 2nd phase constructor can leave.
   346 // Symbian 2nd phase constructor can leave.
   346 // -----------------------------------------------------------------------------
   347 // -----------------------------------------------------------------------------
   347 //
   348 //
   348 void CPhCltUssdImp::ConstructL( TBool aShowNotes )
   349 void CPhCltUssdImp::ConstructL( TBool aShowNotes )
   349     {
   350     {
   350     TFLOGSTRING("CPhCltUssdImp: ConstructL call")
       
   351     // The note controller is needed only if the notes are shown.
   351     // The note controller is needed only if the notes are shown.
   352     iNoteController = NULL;
   352     iNoteController = NULL;
   353     
   353     
   354     if ( aShowNotes )
   354     if ( aShowNotes )
   355         {
   355         {
   356         iNoteController = CPhCltUssdNoteController::NewL( 
   356         iNoteController = CPhCltUssdNoteController::NewL( 
   357             *this );
   357             *this, 
       
   358             CActive::EPriorityStandard );
   358         }
   359         }
   359 
   360 
   360     iDCS = KPhCltUssdDcsDefaultAlphabet;
   361     iDCS = KPhCltUssdDcsDefaultAlphabet;
   361     iWait = new( ELeave ) CActiveSchedulerWait;
   362     iWait = new( ELeave ) CActiveSchedulerWait;
   362 
   363 
   363     // The one that send the request forward.
   364     // The one that send the request forward.
   364     iRequestHandler = CPhCltUssdRequestHandler::NewL( 
   365     iRequestHandler = CPhCltUssdRequestHandler::NewL( 
   365         *this, 
   366         *this, 
   366         CActive::EPriorityStandard );
   367         CActive::EPriorityStandard );
   367     TFLOGSTRING("CPhCltUssdImp: ConstructL exit")
       
   368     }
   368     }
   369 
   369 
   370 
   370 
   371 // -----------------------------------------------------------------------------
   371 // -----------------------------------------------------------------------------
   372 // CPhCltUssdImp::CPhCltUssdImp
   372 // CPhCltUssdImp::CPhCltUssdImp
   374 // might leave.
   374 // might leave.
   375 // -----------------------------------------------------------------------------
   375 // -----------------------------------------------------------------------------
   376 //
   376 //
   377 CPhCltUssdImp::CPhCltUssdImp()
   377 CPhCltUssdImp::CPhCltUssdImp()
   378     {
   378     {
   379     TFLOGSTRING("CPhCltUssdImp: CPhCltUssdImp call_exit")
       
   380     } 
   379     } 
   381 
   380 
   382 
   381 
   383 // -----------------------------------------------------------------------------
   382 // -----------------------------------------------------------------------------
   384 // CPhCltUssdImp::~CPhCltUssdImp
   383 // CPhCltUssdImp::~CPhCltUssdImp
   385 // Destructor.
   384 // Destructor.
   386 // -----------------------------------------------------------------------------
   385 // -----------------------------------------------------------------------------
   387 //
   386 //
   388 CPhCltUssdImp::~CPhCltUssdImp()
   387 CPhCltUssdImp::~CPhCltUssdImp()
   389     {
   388     {
   390     TFLOGSTRING("CPhCltUssdImp: ~CPhCltUssdImp call") 
       
   391     if ( iWait )
   389     if ( iWait )
   392         {
   390         {
   393         if ( iWait->IsStarted() )
   391         if ( iWait->IsStarted() )
   394             {
   392             {
   395             iWait->AsyncStop();
   393             iWait->AsyncStop();
   400 
   398 
   401     delete iRequestHandler;
   399     delete iRequestHandler;
   402     iRequestHandler = NULL;
   400     iRequestHandler = NULL;
   403     
   401     
   404     delete iNoteController;
   402     delete iNoteController;
   405     iNoteController = NULL;
   403     iNoteController = NULL;      
   406     TFLOGSTRING("CPhCltUssdImp: ~CPhCltUssdImp exit") 
       
   407     }
   404     }
   408 
   405 
   409 
   406 
   410 // -----------------------------------------------------------------------------
   407 // -----------------------------------------------------------------------------
   411 // CPhCltUssdImp::HandleSendEventL
   408 // CPhCltUssdImp::HandleSendEventL
   414 // positive -> the Send is completed due received message.
   411 // positive -> the Send is completed due received message.
   415 // -----------------------------------------------------------------------------
   412 // -----------------------------------------------------------------------------
   416 //
   413 //
   417 void CPhCltUssdImp::HandleSendEventL( const TInt aError )
   414 void CPhCltUssdImp::HandleSendEventL( const TInt aError )
   418     {
   415     {
   419     iSendError = Min( aError , KErrNone );
   416     *iSendError = Min( aError , KErrNone );
   420     TFLOGSTRING2("CPhCltUssdImp: HandleSendEventL\
   417 
   421             aError = %d call", aError)
       
   422     // iNoteController is allocated only if notes are shown.
   418     // iNoteController is allocated only if notes are shown.
   423     if ( iNoteController )
   419     if ( iNoteController )
   424         {
   420         {
   425         // Send request is completed, now destroy the wait note
   421         // Send request is completed, now destroy the wait note
   426         iNoteController->DestroyGlobalWaitNote();
   422         iNoteController->DestroyGlobalWaitNote();
   430             {
   426             {
   431             switch ( aError )
   427             switch ( aError )
   432                 {
   428                 {
   433                 // All Ok.
   429                 // All Ok.
   434                 case KErrNone:
   430                 case KErrNone:
   435                     iNoteController->ShowGlobalInformationNoteL( EPhCltUssdDone );
   431                     iNoteController->ShowGlobalConfirmationNoteL( R_TEXT_DONE );
   436                     break;
   432                     break;
   437 
   433 
   438                 // Operation cancelled.
   434                 // Operation cancelled.
   439                 case KErrCancel:
   435                 case KErrCancel:
   440                     iNoteController->ShowGlobalInformationNoteL( EPhCltUssdUnconfirme );
   436                     iNoteController->ShowGlobalInformationNoteL( R_TEXT_UNCONFIRMED );
   441                     break;
   437                     break;
   442 
   438 
   443                 // Ongoing Ussd session or the string is barred due SS request
   439                 // Ongoing Ussd session or the string is barred due SS request
   444                 // or Fixed Dialling feature.
   440                 // or Fixed Dialling feature.
   445                 case KErrInUse:
   441                 case KErrInUse:
   446                 case KErrAccessDenied:
   442                 case KErrAccessDenied:
   447                 case KErrGsmSSCallBarred:
   443                 case KErrGsmSSCallBarred:
   448                     iNoteController->ShowGlobalInformationNoteL( EPhCltUssdNotallowed );
   444                     iNoteController->ShowGlobalInformationNoteL( R_TEXT_NOT_ALLOWED );
   449                     break;
   445                     break;
   450 
   446 
   451                 // No network coverage.
   447                 // No network coverage.
   452                 case KErrGsmSMSNoNetworkService:
   448                 case KErrGsmSMSNoNetworkService:
   453                     iNoteController->ShowGlobalInformationNoteL(EPhCltUssdNoservice );
   449                     iNoteController->ShowGlobalInformationNoteL( R_TEXT_NO_SERVICE );
   454                     break;
   450                     break;
   455 
   451 
   456                 // Offline mode.
   452                 // Offline mode.
   457                 case KErrGsmOfflineOpNotAllowed:
   453                 case KErrGsmOfflineOpNotAllowed:
   458                     iNoteController->ShowGlobalInformationNoteL( EPhCltUssdOffline );
   454                     iNoteController->ShowGlobalInformationNoteL( R_TEXT_OFFLINE );
   459                     break;
   455                     break;
   460                     
   456                     
   461                 case KErrSatControl:
   457                 case KErrSatControl:
   462                     break; 
   458                     break; 
   463 
   459 
   464                 // Unknown error.
   460                 // Unknown error.
   465                 default:
   461                 default:
   466                     iNoteController->ShowGlobalInformationNoteL( EPhCltUssdNotDone );
   462                     iNoteController->ShowGlobalInformationNoteL( R_TEXT_NOT_DONE );
   467                     break;
   463                     break;
   468                 }
   464                 }
   469             }
   465             }
   470         }
   466         }
   471 
   467 
   472     // Let the original active object (one that did the send request) run again.
   468     // Let the original active object (one that did the send request) run again.
   473     if ( iWait->IsStarted() )
   469     if ( iWait->IsStarted() )
   474         {
   470         {
   475         iWait->AsyncStop();
   471         iWait->AsyncStop();
   476         }
   472         }
   477     TFLOGSTRING("CPhCltUssdImp: HandleSendEventL exit")
       
   478     }
   473     }
   479 
   474 
   480 
   475 
   481 // -----------------------------------------------------------------------------
   476 // -----------------------------------------------------------------------------
   482 // CPhCltUssdImp::SendUssd
   477 // CPhCltUssdImp::SendUssd
   534 //
   529 //
   535 TInt CPhCltUssdImp::SendUssd( 
   530 TInt CPhCltUssdImp::SendUssd( 
   536     const TDesC8& aMsgData, 
   531     const TDesC8& aMsgData, 
   537     const TUint8 iSendDcs )
   532     const TUint8 iSendDcs )
   538     {
   533     {
   539     TFLOGSTRING("CPhCltUssdImp: SendUssd call")
       
   540     __ASSERT_ALWAYS( aMsgData.Length() <= KPhCltUssdMax7BitCharacterOctets,
   534     __ASSERT_ALWAYS( aMsgData.Length() <= KPhCltUssdMax7BitCharacterOctets,
   541         User::Invariant() );
   535         User::Invariant() );
   542 
   536 
   543     RMobileUssdMessaging::TMobileUssdAttributesV1 attribute;
   537 	RMobileUssdMessaging::TMobileUssdAttributesV1 attribute;
   544 
   538 
   545     attribute.iFlags = 
   539     attribute.iFlags = 
   546         RMobileUssdMessaging::KUssdDataFormat + 
   540         RMobileUssdMessaging::KUssdDataFormat + 
   547         RMobileUssdMessaging::KUssdMessageDcs;
   541         RMobileUssdMessaging::KUssdMessageDcs;
   548     if ( iDCS2  == KPhCltDcs7Bit )
   542     if ( iDCS2  == KPhCltDcs7Bit )
   553         {
   547         {
   554         attribute.iFormat = RMobileUssdMessaging::EFormatUnspecified;
   548         attribute.iFormat = RMobileUssdMessaging::EFormatUnspecified;
   555         }
   549         }
   556         
   550         
   557     if ( iSendDcs == KPhCltUssdDcsNotSet  ) // 0x00
   551     if ( iSendDcs == KPhCltUssdDcsNotSet  ) // 0x00
   558         {
   552 		{
   559         attribute.iDcs = KPhCltUssdDcsDefaultAlphabet;
   553 		attribute.iDcs = KPhCltUssdDcsDefaultAlphabet;
   560         }
   554  		}
   561     else
   555  	else
   562         {
   556  		{
   563         attribute.iDcs = iSendDcs;
   557  		attribute.iDcs = iSendDcs;
   564         } 
   558  		} 
   565     
   559     
   566     RMobileUssdMessaging::TMobileUssdAttributesV1Pckg 
   560     RMobileUssdMessaging::TMobileUssdAttributesV1Pckg 
   567         attributePckg( attribute );
   561         attributePckg( attribute );
   568 
   562 
   569 
   563 
   570     if ( iWait->IsStarted() )
   564     if ( iWait->IsStarted() )
   571         {
   565         {
   572         return KErrInUse;
   566         return KErrInUse;
   573         }
   567         }
   574 
   568 
   575     iSendError = KErrNone;
   569     TInt error = KErrNone;
   576     TFLOGSTRING("CPhCltUssdImp: SendUssd iRequestHandler")
   570     iSendError = &error;
   577     iRequestHandler->SendUssd( aMsgData , attributePckg );
   571   
       
   572   	iRequestHandler->SendUssd( aMsgData , attributePckg );
   578     // iNoteController is allocated only if notes are shown.
   573     // iNoteController is allocated only if notes are shown.
   579     TFLOGSTRING("CPhCltUssdImp: SendUssd ShowGlobalWaitNoteL")
       
   580     if ( iNoteController )
   574     if ( iNoteController )
   581         {
   575         {
   582         TRAP_IGNORE( iNoteController->ShowGlobalWaitNoteL(); 
   576         TRAP_IGNORE( iNoteController->ShowGlobalWaitNoteL( 
   583                     );
   577         	R_TEXT_SENDING, 
   584         }
   578             R_AVKON_SOFTKEYS_QUIT ) );
   585     TFLOGSTRING("CPhCltUssdImp: SendUssd iWait") 
   579         }
   586 
   580 
   587     // Set this active object to wait the completion of the send request.
   581     // Set this active object to wait the completion of the send request.
   588     iWait->Start();
   582     iWait->Start();
   589 
   583     
   590     TFLOGSTRING("CPhCltUssdImp: SendUssd exit") 
   584     // Need to check iWait handle here because the destructor may be called
   591     return iSendError;
   585     // while pending for completion of the send request.
       
   586     // coverity[check_after_deref]
       
   587     if( iWait )
       
   588         {
       
   589         iSendError = NULL;
       
   590         }
       
   591     
       
   592     return error;
   592     }
   593     }
   593 
   594 
   594 
   595 
   595 // -----------------------------------------------------------------------------
   596 // -----------------------------------------------------------------------------
   596 // CPhCltUssdImp::SendUssdCancel
   597 // CPhCltUssdImp::SendUssdCancel
   598 // Cancels the out-standing request.
   599 // Cancels the out-standing request.
   599 // -----------------------------------------------------------------------------
   600 // -----------------------------------------------------------------------------
   600 //
   601 //
   601 void CPhCltUssdImp::SendUssdCancel()
   602 void CPhCltUssdImp::SendUssdCancel()
   602     {
   603     {
   603     TFLOGSTRING("CPhCltUssdImp: SendUssdCancel call")
       
   604     iRequestHandler->SendUssdCancel();
   604     iRequestHandler->SendUssdCancel();
   605     TFLOGSTRING("CPhCltUssdImp: SendUssdCancel exit")
       
   606     }
   605     }
   607 
   606 
   608 
   607 
   609 // -----------------------------------------------------------------------------
   608 // -----------------------------------------------------------------------------
   610 // CPhCltUssdImp::StartUssdEditor
   609 // CPhCltUssdImp::StartUssdEditor
   623 // UI informs that it is been created
   622 // UI informs that it is been created
   624 // -----------------------------------------------------------------------------
   623 // -----------------------------------------------------------------------------
   625 //
   624 //
   626 TInt CPhCltUssdImp::AppStarting()
   625 TInt CPhCltUssdImp::AppStarting()
   627     {
   626     {
   628     TFLOGSTRING("CPhCltUssdImp: AppStarting call")
   627     return iRequestHandler->UssdClient().AppStarting();
   629     TInt res = iRequestHandler->UssdClient().AppStarting();
       
   630     TFLOGSTRING2("CPhCltUssdImp: AppStarting exit res = %d",res)
       
   631     return res;
       
   632     }
   628     }
   633     
   629     
   634 // -----------------------------------------------------------------------------
   630 // -----------------------------------------------------------------------------
   635 // CPhCltUssdImp::AppTerminating
   631 // CPhCltUssdImp::AppTerminating
   636 // 
   632 // 
   638 // -----------------------------------------------------------------------------
   634 // -----------------------------------------------------------------------------
   639 //    
   635 //    
   640 TInt CPhCltUssdImp::AppTerminating( 
   636 TInt CPhCltUssdImp::AppTerminating( 
   641       TPhCltUssdAppExitReason aExitReason )
   637       TPhCltUssdAppExitReason aExitReason )
   642     {
   638     {
   643     TFLOGSTRING("CPhCltUssdImp: AppTerminating call")
   639     return iRequestHandler->UssdClient().AppTerminating( aExitReason );
   644     TInt res = iRequestHandler->UssdClient().AppTerminating( aExitReason );
       
   645     TFLOGSTRING2("CPhCltUssdImp: AppTerminating exit res = %d",res)
       
   646     return res;
       
   647     }
   640     }
   648     
   641     
   649 // -----------------------------------------------------------------------------
   642 // -----------------------------------------------------------------------------
   650 // CPhCltUssdImp::AppToForeground
   643 // CPhCltUssdImp::AppToForeground
   651 // 
   644 // 
   652 // UI informs that it is brougth to foreground
   645 // UI informs that it is brougth to foreground
   653 // -----------------------------------------------------------------------------
   646 // -----------------------------------------------------------------------------
   654 //    
   647 //    
   655 TBool CPhCltUssdImp::AppToForeground()
   648 TBool CPhCltUssdImp::AppToForeground()
   656     {
   649     {
   657     TFLOGSTRING("CPhCltUssdImp: AppToForeground call")
   650     return iRequestHandler->UssdClient().AppToForeground();
   658     TBool res =  iRequestHandler->UssdClient().AppToForeground();
       
   659     TFLOGSTRING2("CPhCltUssdImp: AppToForeground exit res = %d",res)
       
   660     return res;
       
   661     }
   651     }
   662     
   652     
   663 // -----------------------------------------------------------------------------
   653 // -----------------------------------------------------------------------------
   664 // CPhCltUssdImp::AppToBackground
   654 // CPhCltUssdImp::AppToBackground
   665 // 
   655 // 
   666 // UI informs that it is gone background
   656 // UI informs that it is gone background
   667 // -----------------------------------------------------------------------------
   657 // -----------------------------------------------------------------------------
   668 //    
   658 //    
   669 TInt CPhCltUssdImp::AppToBackground()
   659 TInt CPhCltUssdImp::AppToBackground()
   670     {
   660     {
   671     TFLOGSTRING("CPhCltUssdImp: AppToBackground call")
   661     return iRequestHandler->UssdClient().AppToBackground();
   672     TInt res = iRequestHandler->UssdClient().AppToBackground();
       
   673     TFLOGSTRING2("CPhCltUssdImp: AppToBackground exit res = %d",res)
       
   674     return res;
       
   675     }
   662     }
   676 
   663 
   677 // -----------------------------------------------------------------------------
   664 // -----------------------------------------------------------------------------
   678 // CPhCltUssdImp::StartSAT
   665 // CPhCltUssdImp::StartSAT
   679 // 
   666 // 
   683 void  CPhCltUssdImp::StartSAT( 
   670 void  CPhCltUssdImp::StartSAT( 
   684             TRequestStatus& aStatus, 
   671             TRequestStatus& aStatus, 
   685             TDes& aReceiveMessage, 
   672             TDes& aReceiveMessage, 
   686             TPckg< TUint >& aShowNotesAndDcs )
   673             TPckg< TUint >& aShowNotesAndDcs )
   687     {
   674     {
   688     TFLOGSTRING("CPhCltUssdImp: StartSAT call")
       
   689     iRequestHandler->UssdClient().StartSAT( aStatus, aReceiveMessage, aShowNotesAndDcs );
   675     iRequestHandler->UssdClient().StartSAT( aStatus, aReceiveMessage, aShowNotesAndDcs );
   690     TFLOGSTRING("CPhCltUssdImp: StartSAT exit")
       
   691     }
   676     }
   692  
   677  
   693 // -----------------------------------------------------------------------------
   678 // -----------------------------------------------------------------------------
   694 // CPhCltUssdImp::StopSAT
   679 // CPhCltUssdImp::StopSAT
   695 // 
   680 // 
   696 // Cancels SAT session
   681 // Cancels SAT session
   697 // -----------------------------------------------------------------------------
   682 // -----------------------------------------------------------------------------
   698 //   
   683 //   
   699  void CPhCltUssdImp::StopSAT()
   684  void CPhCltUssdImp::StopSAT()
   700     {
   685     {
   701     TFLOGSTRING("CPhCltUssdImp: StopSAT call")
       
   702     iRequestHandler->UssdClient().StopSAT();
   686     iRequestHandler->UssdClient().StopSAT();
   703     TFLOGSTRING("CPhCltUssdImp: StopSAT exit")
   687     }
   704     }
   688 
   705 
   689 
   706 
   690 // -----------------------------------------------------------------------------
   707 // -----------------------------------------------------------------------------
   691 // CPhCltUssdImp::GlobalNoteDismissedL
   708 // CPhCltUssdImp::GlobalWaitNoteHidden
   692 //
   709 //
   693 // Dialog is cancelled by the right softkey.
   710 // Dialog is hidden by the cancel key.
   694 // -----------------------------------------------------------------------------
   711 // -----------------------------------------------------------------------------
   695 //
   712 //
   696 void CPhCltUssdImp::GlobalWaitNoteDismissedL( TInt aButtonId )
   713 void CPhCltUssdImp::GlobalWaitNoteHidden()
   697     {
   714     {
   698     if ( aButtonId == EAknSoftkeyClose || 
   715     TFLOGSTRING("CPhCltUssdImp: GlobalWaitNoteHidden call")
   699          aButtonId == EAknSoftkeyCancel ||
   716     TFLOGSTRING("CPhCltUssdImp: GlobalWaitNoteHidden exit")
   700          aButtonId == EAknSoftkeyQuit )
       
   701         {   
       
   702         SendUssdCancel();
       
   703         }
   717     }
   704     }
   718 
   705 
   719 
   706 
   720 // -----------------------------------------------------------------------------
   707 // -----------------------------------------------------------------------------
   721 // CPhCltUssdImp::EncodeL
   708 // CPhCltUssdImp::EncodeL
   723 // Converts a given Uniocde string into 7-bit buffer.
   710 // Converts a given Uniocde string into 7-bit buffer.
   724 // -----------------------------------------------------------------------------
   711 // -----------------------------------------------------------------------------
   725 //
   712 //
   726 void CPhCltUssdImp::EncodeL( const TDesC& aSrc, TDes8& aDes )
   713 void CPhCltUssdImp::EncodeL( const TDesC& aSrc, TDes8& aDes )
   727     {
   714     {
   728     TFLOGSTRING("CPhCltUssdImp: EncodeL call")
   715     //
   729     aDes.Zero();
   716      aDes.Zero();
   730     TSmsDataCodingScheme::TSmsAlphabet alphabet = 
   717     TSmsDataCodingScheme::TSmsAlphabet alphabet = 
   731         TSmsDataCodingScheme::ESmsAlphabet7Bit; // default
   718         TSmsDataCodingScheme::ESmsAlphabet7Bit; // default
   732         
   719         
   733     CCnvCharacterSetConverter* charConv = CCnvCharacterSetConverter::NewLC();
   720     CCnvCharacterSetConverter* charConv = CCnvCharacterSetConverter::NewLC();
   734     
   721     
   827             }
   814             }
   828         // If DCS not 8-bit or UCS2, then EPhCltDcsUnknown is returned.
   815         // If DCS not 8-bit or UCS2, then EPhCltDcsUnknown is returned.
   829         }
   816         }
   830     
   817     
   831     CleanupStack::PopAndDestroy(3); // fs, packer, charConv
   818     CleanupStack::PopAndDestroy(3); // fs, packer, charConv
   832     TFLOGSTRING("CPhCltUssdImp: EncodeL exit")
       
   833     }
   819     }
   834 
   820 
   835 // -----------------------------------------------------------------------------
   821 // -----------------------------------------------------------------------------
   836 // CPhCltUssdImp::SetDCS()
   822 // CPhCltUssdImp::SetDCS()
   837 //
   823 //