satengine/SatServer/Commands/SendUSSDCmd/src/CSendUssdHandler.cpp
branchRCL_3
changeset 9 71e7b994dff4
parent 7 a19c8664496d
child 11 586d88ba9aa1
equal deleted inserted replaced
8:ba42c4bd84dd 9:71e7b994dff4
     1 /*
     1 /*
     2 * Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies). 
     2 * Copyright (c) 2002-2007 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 #include    <CPhCltUssdSatClient.h>
    19 #include    <CPhCltUssdSatClient.h>
    20 #include	<CPhCltUssd.h>
    20 #include	<CPhCltUssd.h>
       
    21 #include    <exterror.h>
    21 
    22 
    22 #include    "MSatSystemState.h"
    23 #include    "MSatSystemState.h"
    23 #include    "MSatApi.h"
    24 #include    "MSatApi.h"
    24 #include    "MSatUtils.h"
    25 #include    "MSatUtils.h"
    25 #include    "MSatUiSession.h"
    26 #include    "MSatUiSession.h"
   686         iSendUssdRsp.iAdditionalInfo.Zero();
   687         iSendUssdRsp.iAdditionalInfo.Zero();
   687         }
   688         }
   688     else if ( TSatExtErrorUtils::IsExtendedError( aError ) ) // extended error
   689     else if ( TSatExtErrorUtils::IsExtendedError( aError ) ) // extended error
   689         {
   690         {
   690         TUint8 addInfo( 0 );
   691         TUint8 addInfo( 0 );
       
   692         // In subcase 2, SAT always gets KErrGsmCCCallRejected
       
   693         if ( KErrGsmCCCallRejected == aError )   
       
   694            {
       
   695            LOG( SIMPLE, 
       
   696            "SENDUSSD: CSendUssdHandler::HandleSendUssdResult permanent error" )	
       
   697            // ussd request is rejected by SIM
       
   698            iSendUssdRsp.iGeneralResult = RSat::KInteractionWithCCPermanentError;
       
   699            iSendUssdRsp.iInfoType = RSat::KMeProblem;
       
   700            addInfo = RSat::KActionNotAllowed;
       
   701            }   
   691         // Check and map network failure
   702         // Check and map network failure
   692         if ( TSatExtErrorUtils::IsNetworkError( aError ) )
   703         else if ( TSatExtErrorUtils::IsNetworkError( aError ) )
   693             {
   704             {
   694             LOG( SIMPLE, 
   705             LOG( SIMPLE, 
   695             "SENDUSSD: CSendUssdHandler::HandleSendUssdResult NetworkError" )
   706             "SENDUSSD: CSendUssdHandler::HandleSendUssdResult NetworkError" )
   696             // Network error, map and modify
   707             // Network error, map and modify
   697             addInfo = TSatExtErrorUtils::MapError( aError );
   708             addInfo = TSatExtErrorUtils::MapError( aError );
   746         KInteractionWithCCTemporaryError" )
   757         KInteractionWithCCTemporaryError" )
   747         iSendUssdRsp.iGeneralResult = RSat::KInteractionWithCCTemporaryError;
   758         iSendUssdRsp.iGeneralResult = RSat::KInteractionWithCCTemporaryError;
   748         iSendUssdRsp.iInfoType = RSat::KNoAdditionalInfo;
   759         iSendUssdRsp.iInfoType = RSat::KNoAdditionalInfo;
   749         iSendUssdRsp.iAdditionalInfo.SetLength( 0 );
   760         iSendUssdRsp.iAdditionalInfo.SetLength( 0 );
   750         iSendUssdRsp.iAdditionalInfo.Zero();
   761         iSendUssdRsp.iAdditionalInfo.Zero();
       
   762         }
       
   763     else if ( KErrSatControl == aError )
       
   764         {
       
   765         LOG( SIMPLE, 
       
   766         "SENDUSSD: CSendUssdHandler::HandleSendUssdResult \
       
   767         KModifiedByCallControl" )
       
   768         iSendUssdRsp.iGeneralResult = RSat::KModifiedByCallControl;
       
   769         iSendUssdRsp.iInfoType = RSat::KNoAdditionalInfo;
       
   770         iSendUssdRsp.iAdditionalInfo.SetLength( 0 );
       
   771         iSendUssdRsp.iAdditionalInfo.Zero(); 
   751         }
   772         }
   752     else if ( KErrNone == aError )   //  Success case
   773     else if ( KErrNone == aError )   //  Success case
   753         {
   774         {
   754         LOG( SIMPLE, 
   775         LOG( SIMPLE, 
   755         "SENDUSSD: CSendUssdHandler::HandleSendUssdResult success" )
   776         "SENDUSSD: CSendUssdHandler::HandleSendUssdResult success" )