phoneapp/phoneuistates/src/cphoneerrormessageshandler.cpp
changeset 0 5f000ab63145
child 10 ba54057fe027
equal deleted inserted replaced
-1:000000000000 0:5f000ab63145
       
     1 /*
       
     2 * Copyright (c) 2006-2008 Nokia Corporation and/or its subsidiary(-ies). 
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description: Implementation of CPhoneErrorMessagesHandler class.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 // INCLUDES
       
    20 #include <mpeengineinfo.h>
       
    21 #include <telephonydomainpskeys.h>
       
    22 #include <UikonInternalPSKeys.h>
       
    23 #include <ccpdefs.h>
       
    24 
       
    25 #include "phoneui.pan"
       
    26 #include "phonerssbase.h"
       
    27 #include "cphoneerrormessageshandler.h"
       
    28 #include "cphonemainerrormessageshandler.h"
       
    29 #include "phonelogger.h"
       
    30 #include "cphonestatehandle.h"
       
    31 #include "mphoneviewcommandhandle.h"
       
    32 #include "cphonepubsubproxy.h"
       
    33 #include "tphonecmdparamboolean.h"
       
    34 #include "tphonecmdparamglobalnote.h"
       
    35 #include "tphonecmdparamnote.h"
       
    36 #include "cphonemainresourceresolver.h"
       
    37 
       
    38 
       
    39 // ================= MEMBER FUNCTIONS =======================
       
    40 
       
    41 // C++ default constructor can NOT contain any code, that
       
    42 // might leave.
       
    43 //
       
    44 EXPORT_C CPhoneErrorMessagesHandler::CPhoneErrorMessagesHandler(
       
    45     MPhoneViewCommandHandle* aViewCommandHandle,
       
    46     MPhoneStateMachine* aStateMachine ) :
       
    47     iViewCommandHandle( aViewCommandHandle),
       
    48     iStateMachine (aStateMachine )
       
    49     {
       
    50     }
       
    51 
       
    52 // -----------------------------------------------------------
       
    53 // CPhoneErrorMessagesHandler::~CPhoneErrorMessagesHandler()
       
    54 // Destructor
       
    55 // (other items were commented in a header).
       
    56 // -----------------------------------------------------------
       
    57 
       
    58 EXPORT_C CPhoneErrorMessagesHandler::~CPhoneErrorMessagesHandler()
       
    59     {
       
    60     }
       
    61 
       
    62 // -----------------------------------------------------------------------------
       
    63 // ConstructL
       
    64 // Symbian 2nd phase constructor can leave.
       
    65 // -----------------------------------------------------------------------------
       
    66 //
       
    67 void CPhoneErrorMessagesHandler::ConstructL()
       
    68     {    
       
    69     CPhoneMainErrorMessagesHandler::Instance()->RegisterErrorMessagesHandler( this );
       
    70     }
       
    71 
       
    72 // -----------------------------------------------------------
       
    73 // CPhoneVoIPErrorMessagesHandler::NewL()
       
    74 // Constructor
       
    75 // (other items were commented in a header).
       
    76 // -----------------------------------------------------------
       
    77 //
       
    78 CPhoneErrorMessagesHandler* CPhoneErrorMessagesHandler::NewL( 
       
    79                     MPhoneViewCommandHandle* aViewCommandHandle,
       
    80                     MPhoneStateMachine* aStateMachine )
       
    81     {
       
    82     CPhoneErrorMessagesHandler* self = 
       
    83         new( ELeave ) CPhoneErrorMessagesHandler( 
       
    84                     aViewCommandHandle,
       
    85                     aStateMachine );
       
    86     CleanupStack::PushL( self );    
       
    87     self->ConstructL();
       
    88     CleanupStack::Pop( self );    
       
    89     return self;
       
    90     }
       
    91 
       
    92 // ---------------------------------------------------------
       
    93 // CPhoneErrorMessagesHandler::SendGlobalInfoNoteL
       
    94 // ---------------------------------------------------------
       
    95 //
       
    96 EXPORT_C void CPhoneErrorMessagesHandler::SendGlobalInfoNoteL( TInt aResourceId )
       
    97     {
       
    98     __LOGMETHODSTARTEND( EPhoneControl, 
       
    99         "CPhoneErrorMessagesHandler::SendGlobalInfoNoteL()" );
       
   100 
       
   101     __ASSERT_DEBUG( aResourceId, Panic( EPhoneCtrlParameterNotInitialized ) );
       
   102     if ( CPhonePubSubProxy::Instance()->Value( 
       
   103             KPSUidUikon, KUikGlobalNotesAllowed ) == 1 )
       
   104         {
       
   105         // Re-enable global notes
       
   106         TPhoneCmdParamBoolean globalNotifierParam;
       
   107         globalNotifierParam.SetBoolean( EFalse );
       
   108         iViewCommandHandle->ExecuteCommandL( EPhoneViewSetGlobalNotifiersDisabled,    &globalNotifierParam );
       
   109             
       
   110         TPhoneCmdParamGlobalNote globalNoteParam;
       
   111       
       
   112         globalNoteParam.SetType( EAknGlobalInformationNote );
       
   113         globalNoteParam.SetTextResourceId( 
       
   114             CPhoneMainResourceResolver::Instance()->
       
   115             ResolveResourceID( aResourceId ) );
       
   116         globalNoteParam.SetTone( EAvkonSIDInformationTone );
       
   117 
       
   118         iViewCommandHandle->ExecuteCommandL( 
       
   119             EPhoneViewShowGlobalNote, &globalNoteParam );    
       
   120         }
       
   121   
       
   122     }
       
   123  
       
   124 // ---------------------------------------------------------
       
   125 //  CPhoneErrorMessagesHandler::SendGlobalErrorNoteL
       
   126 // ---------------------------------------------------------
       
   127 //
       
   128 EXPORT_C void CPhoneErrorMessagesHandler::SendGlobalErrorNoteL( TInt aResourceId )
       
   129     {
       
   130     __LOGMETHODSTARTEND( EPhoneControl, 
       
   131         "CPhoneErrorMessagesHandler::SendGlobalErrorNoteL()" );
       
   132     __ASSERT_DEBUG( aResourceId, Panic( EPhoneCtrlParameterNotInitialized ) );
       
   133 
       
   134     if ( CPhonePubSubProxy::Instance()->Value( 
       
   135             KPSUidUikon, KUikGlobalNotesAllowed ) == 1 )
       
   136         {
       
   137         // Re-enable global notes
       
   138         TPhoneCmdParamBoolean globalNotifierParam;
       
   139         globalNotifierParam.SetBoolean( EFalse );
       
   140         iViewCommandHandle->ExecuteCommandL( 
       
   141              EPhoneViewSetGlobalNotifiersDisabled,
       
   142             &globalNotifierParam );
       
   143             
       
   144         TPhoneCmdParamGlobalNote globalNoteParam;
       
   145         globalNoteParam.SetType( EAknGlobalErrorNote );
       
   146         globalNoteParam.SetTextResourceId( 
       
   147             CPhoneMainResourceResolver::Instance()->
       
   148             ResolveResourceID( aResourceId ) );
       
   149         globalNoteParam.SetTone( CAknNoteDialog::EErrorTone );
       
   150 
       
   151         iViewCommandHandle->ExecuteCommandL(  
       
   152             EPhoneViewShowGlobalNote, &globalNoteParam );
       
   153         }
       
   154   
       
   155     }
       
   156 
       
   157 // ---------------------------------------------------------
       
   158 //  CPhoneErrorMessagesHandler::SendGlobalWarningNoteL
       
   159 // ---------------------------------------------------------
       
   160 //
       
   161 EXPORT_C void CPhoneErrorMessagesHandler::SendGlobalWarningNoteL( TInt aResourceId )
       
   162     {
       
   163     __LOGMETHODSTARTEND(EPhoneControl, "CPhoneErrorMessagesHandler::SendGlobalWarningNoteL( ) ");
       
   164     __ASSERT_DEBUG( aResourceId, Panic( EPhoneCtrlParameterNotInitialized ) );
       
   165 
       
   166     if ( CPhonePubSubProxy::Instance()->Value( 
       
   167             KPSUidUikon, KUikGlobalNotesAllowed ) == 1 || 
       
   168             SimState() == EPESimReadable )
       
   169         {    
       
   170         // Re-enable global notes
       
   171         TPhoneCmdParamBoolean globalNotifierParam;
       
   172         globalNotifierParam.SetBoolean( EFalse );
       
   173         iViewCommandHandle->ExecuteCommandL(  
       
   174             EPhoneViewSetGlobalNotifiersDisabled,
       
   175             &globalNotifierParam );
       
   176             
       
   177         TPhoneCmdParamGlobalNote globalNoteParam;
       
   178         globalNoteParam.SetType( EAknGlobalWarningNote );
       
   179         globalNoteParam.SetTextResourceId( 
       
   180             CPhoneMainResourceResolver::Instance()->
       
   181             ResolveResourceID( aResourceId ) );
       
   182         globalNoteParam.SetTone( EAvkonSIDWarningTone );
       
   183 
       
   184         iViewCommandHandle->ExecuteCommandL( 
       
   185             EPhoneViewShowGlobalNote, &globalNoteParam );
       
   186         }
       
   187     }
       
   188 
       
   189 // ---------------------------------------------------------
       
   190 // CPhoneErrorMessagesHandler::SimState()
       
   191 // ---------------------------------------------------------
       
   192 //
       
   193 TPESimState CPhoneErrorMessagesHandler::SimState() const
       
   194     {
       
   195     __LOGMETHODSTARTEND(EPhoneControl, "CPhoneErrorMessagesHandler::SimState()");
       
   196     __ASSERT_DEBUG( iStateMachine->PhoneEngineInfo(),
       
   197         Panic( EPhoneCtrlInvariant ) );
       
   198     return iStateMachine->PhoneEngineInfo()->SimState();
       
   199     }
       
   200             
       
   201 // -----------------------------------------------------------
       
   202 // CPhoneErrorMessagesHandler::ShowErrorSpecificNoteL
       
   203 // -----------------------------------------------------------
       
   204 //
       
   205 EXPORT_C void CPhoneErrorMessagesHandler::ShowErrorSpecificNoteL( const TPEErrorInfo& aErrorInfo )
       
   206     {
       
   207     __LOGMETHODSTARTEND(EPhoneControl, "CPhoneErrorMessagesHandler::ShowErrorSpecificNoteL()");
       
   208     
       
   209     __PHONELOG1( EBasic, EPhoneControl,
       
   210             "PhoneUIControl: CPhoneErrorMessagesHandler::ShowErrorSpecificNoteL - aErrorInfo.iErrorCode =%d ",
       
   211             aErrorInfo.iErrorCode);
       
   212 
       
   213     switch( aErrorInfo.iErrorCode )
       
   214         {
       
   215         case ECCPErrorRejected:
       
   216         case ECCPRequestFailure:
       
   217             SendGlobalErrorNoteL( EPhoneNoteTextRequestRejected );    
       
   218             break;
       
   219             
       
   220         case ECCPErrorInvalidPhoneNumber:
       
   221             SendGlobalErrorNoteL( EPhoneInvalidPhoneNumber );
       
   222             break;
       
   223 
       
   224         case ECCPErrorInvalidURI:
       
   225             if( IsVideoCall( aErrorInfo.iCallId ) )
       
   226                 {
       
   227                 SendGlobalInfoNoteL( EPhoneInvalidPhoneNumber );
       
   228                 }
       
   229             else
       
   230                 {
       
   231                 SendGlobalErrorNoteL( EPhoneInvalidPhoneNumber );
       
   232                 }
       
   233             break;
       
   234 
       
   235         case ECCPErrorServiceSettingError:
       
   236             if( IsVideoCall( aErrorInfo.iCallId ) )
       
   237                 {
       
   238                 SendGlobalInfoNoteL( EPhoneNotePhoneOutOf3GCoverage );
       
   239                 }
       
   240             else
       
   241                 {
       
   242                 SendGlobalInfoNoteL( EPhoneNoteTextCheckNetworkservices );
       
   243                 }
       
   244             break;
       
   245 
       
   246         case ECCPErrorNotAllowedInOfflineMode:
       
   247         case ECCPErrorAuthenticationFailed:
       
   248             SendGlobalWarningNoteL( EPhoneEmergencyCallsOnly );
       
   249             break;
       
   250 
       
   251         case ECCPErrorNotReady:     
       
   252         case ECCPErrorGeneral:
       
   253         case ECCPErrorNotAllowed:
       
   254         case ECCPErrorNotFound:
       
   255         case ECCPErrorTimedOut:
       
   256         case ECCPErrorAccessDenied:        
       
   257             SendGlobalWarningNoteL( EPhoneNoteTextNotAllowed );                    
       
   258             break;
       
   259             
       
   260         case ECCPErrorAlreadyInUse:
       
   261             SendGlobalErrorNoteL( EPhoneNoteTextCallNotAllowed );                    
       
   262             break;
       
   263 
       
   264         case ECCPErrorInvalidFDN:
       
   265             SendGlobalWarningNoteL( EPhoneNoteTextCallNotAllowedFDN );                    
       
   266             break;
       
   267             
       
   268         case ECCPErrorNotReached:
       
   269             if( IsVideoCall( aErrorInfo.iCallId ) )
       
   270                 {
       
   271                 SendGlobalInfoNoteL( EPhoneNumberNotInUse );
       
   272                 }
       
   273             else
       
   274                 {
       
   275                 SendGlobalWarningNoteL( EPhoneNumberNotInUse );    
       
   276                 }
       
   277                 
       
   278             break;
       
   279 
       
   280         case ECCPErrorUnacceptableChannel:
       
   281         case ECCPErrorCCDestinationOutOfOrder:
       
   282         case ECCPErrorAccessInformationDiscarded:
       
   283         case ECCPErrorQualityOfServiceNotAvailable:        
       
   284         case ECCPErrorInvalidCallReferenceValue:
       
   285         case ECCPErrorCCInvalidTransitNetworkSelection:        
       
   286         case ECCPErrorConnectionError:        
       
   287         case ECCPErrorCCIncompatibleMessageInCallState:        
       
   288             if( IsVideoCall( aErrorInfo.iCallId ) &&
       
   289                 iStateMachine->PhoneEngineInfo()->ProfileId() != EProfileOffLineId )
       
   290                 {
       
   291                 SendGlobalInfoNoteL( EPhoneNoteVideoCallNotPossible );
       
   292                 }
       
   293             else
       
   294                 {
       
   295                 SendGlobalWarningNoteL( EPhoneErrorInConnection );
       
   296                 }
       
   297             break;
       
   298             
       
   299         case ECCPErrorCCResourceNotAvailable:
       
   300             SendGlobalWarningNoteL( EPhoneErrorInConnection );
       
   301             break;
       
   302                         
       
   303         case ECCPErrorNumberBarred:
       
   304             SendGlobalWarningNoteL( EPhoneNumberBarred );
       
   305             break;
       
   306             
       
   307         case ECCPErrorCCUserAlertingNoAnswer:
       
   308             if( IsVideoCall( aErrorInfo.iCallId ) )
       
   309                 {
       
   310                 SendGlobalInfoNoteL( EPhoneNoAnswer );
       
   311                 }
       
   312             else
       
   313                 {
       
   314                 SendGlobalWarningNoteL( EPhoneNoAnswer );   
       
   315                 }           
       
   316             break;
       
   317             
       
   318         case KErrPhoneEngineNoWcdmaNetwork:  // Videotel special case. Refactoring PE/CSPlugin needed
       
   319         case ECCPErrorVideoCallNotSupportedByNetwork:
       
   320             SendGlobalInfoNoteL( EPhoneInformationNoNetworkSupportForVideoCallNote );
       
   321             break;
       
   322                 
       
   323         case KErrPhoneEngineVideoCallNotAllowedDuringRestore: // Videotel special case. Refactoring PE/CSPlugin needed
       
   324         case ECCPErrorVideoCallNotAllowedDuringRestore:
       
   325             SendGlobalInfoNoteL( EPhoneInformationVideoCallNotAllowedDuringRestoreNote );
       
   326             break;
       
   327  
       
   328         case KErrPhoneEngineVideoCallSetupFailed: // Videotel special case. Refactoring PE/CSPlugin needed
       
   329         case ECCPErrorVideoCallSetupFailed:
       
   330             SendGlobalInfoNoteL( EPhoneNoteVideoCallSetupFailed );
       
   331             break;
       
   332 
       
   333         case ECCPErrorNetworkBusy:
       
   334             SendGlobalWarningNoteL( EPhoneNetworkBusy );
       
   335             break;
       
   336             
       
   337         case ECCPErrorNoService:
       
   338             SendGlobalWarningNoteL( EPhoneNoteNoService );   
       
   339             break;
       
   340             
       
   341         case ECCPErrorBusy:
       
   342             SendGlobalWarningNoteL( EPhoneNumberBusy );   
       
   343             break;
       
   344             
       
   345         case ECCPErrorUserNotInCug:
       
   346             if( IsVideoCall( aErrorInfo.iCallId ) )
       
   347                 {
       
   348                 SendGlobalInfoNoteL( EPhoneNumberNotInCUG );
       
   349                 }
       
   350              else
       
   351                 {
       
   352                 SendGlobalWarningNoteL( EPhoneNumberNotInCUG );   
       
   353                 }
       
   354             break;
       
   355             
       
   356         case ECCPErrorCCNoRouteToDestination:
       
   357             if( IsVideoCall( aErrorInfo.iCallId ) )
       
   358                 {
       
   359                 SendGlobalInfoNoteL( EPhoneNotePhoneOutOf3GCoverage );
       
   360                 }
       
   361              break;
       
   362             
       
   363         case ECCPErrorCCNormalCallClearing:
       
   364             if( IsVideoCall( aErrorInfo.iCallId ) )
       
   365                 {
       
   366                 SendGlobalInfoNoteL( EPhoneNoteCallInfoCauseValue16 );
       
   367                 }
       
   368             break;
       
   369                     
       
   370         case ECCPErrorCCUserNotResponding:
       
   371             if( IsVideoCall( aErrorInfo.iCallId ) )
       
   372                 {
       
   373                 SendGlobalInfoNoteL( EPhoneNoteCallInfoCauseValue18 ); 
       
   374                 }
       
   375             else
       
   376                 {
       
   377                 SendGlobalWarningNoteL( EPhoneNoAnswer );
       
   378                 }
       
   379             break;
       
   380             
       
   381         case ECCPErrorCCCallRejected:
       
   382             if( IsVideoCall( aErrorInfo.iCallId ) )
       
   383                 {
       
   384                 SendGlobalInfoNoteL( EPhoneNoteCalledNumberHasBarredIncomingCalls );
       
   385                 }
       
   386             break;
       
   387             
       
   388         case ECCPErrorMovedPermanently:
       
   389             if( IsVideoCall( aErrorInfo.iCallId ) )
       
   390                 {
       
   391                 SendGlobalInfoNoteL( EPhoneNoteCallInfoCauseValue22 );
       
   392                 }
       
   393             break;
       
   394             
       
   395         case ECCPErrorNoAnswerForVideo:
       
   396             if( IsVideoCall( aErrorInfo.iCallId ) )
       
   397                 {
       
   398                 SendGlobalInfoNoteL( EPhoneNotePhoneOutOf3GCoverage );   
       
   399                 }
       
   400             else
       
   401                 {
       
   402                 SendGlobalWarningNoteL( EPhoneNoAnswer );
       
   403                 }
       
   404             break;
       
   405             
       
   406         case ECCPErrorCCNoChannelAvailable:
       
   407             if( IsVideoCall( aErrorInfo.iCallId ) )
       
   408                 {
       
   409                 SendGlobalInfoNoteL( EPhoneNoteCallInfoCauseValue34 ); 
       
   410                 }
       
   411             else
       
   412                 {
       
   413                 SendGlobalWarningNoteL( EPhoneNetworkBusy );
       
   414                 }
       
   415             break;
       
   416             
       
   417         case ECCPErrorNetworkOutOfOrder:
       
   418             if( IsVideoCall( aErrorInfo.iCallId ) )
       
   419                 {
       
   420                 SendGlobalInfoNoteL( EPhoneNoteCallInfoCauseValue38 );
       
   421                 }
       
   422             break;
       
   423             
       
   424         case ECCPErrorCCRequestedFacilityNotSubscribed:
       
   425             if( IsVideoCall( aErrorInfo.iCallId ) )
       
   426                 {
       
   427                 SendGlobalInfoNoteL( EPhoneNoteVideoCallOnlyPossibleUnder3GCoverage );
       
   428                 }
       
   429             else
       
   430                 {
       
   431                 SendGlobalWarningNoteL( EPhoneNoteTextNotAllowed );
       
   432                 }
       
   433             break;
       
   434 
       
   435         case ECCPErrorCCIncomingCallsBarredInCug:
       
   436             if( IsVideoCall( aErrorInfo.iCallId ) )
       
   437                 {
       
   438                 SendGlobalInfoNoteL( EPhoneNoteCallInfoCauseValue55 );
       
   439                 }
       
   440             break;
       
   441             
       
   442         case ECCPErrorCCIncompatibleDestination:
       
   443         case ECCPErrorCCBearerCapabilityNotAuthorised:
       
   444             if( IsVideoCall( aErrorInfo.iCallId ) )
       
   445                 {
       
   446                 SendGlobalInfoNoteL( EPhoneNoteUnableToMakeVideoCallNotSupportedByOtherPhone );
       
   447                 }
       
   448             break;
       
   449         
       
   450         case ECCPErrorCCBearerCapabilityNotCurrentlyAvailable:
       
   451             if( IsVideoCall( aErrorInfo.iCallId ) )
       
   452                 {
       
   453                 SendGlobalInfoNoteL( EPhoneNoteCallInfoCauseValue58 );
       
   454                 }
       
   455             break;
       
   456             
       
   457         case ECCPErrorBadRequest:
       
   458             if( IsVideoCall( aErrorInfo.iCallId ) )
       
   459                 {
       
   460                 SendGlobalInfoNoteL( EPhoneNoteUnableToMakeVideoCallNotSupportedByOtherPhone );
       
   461                 }
       
   462             else
       
   463                 {
       
   464                 SendGlobalWarningNoteL( EPhoneErrorInConnection );
       
   465                 } 
       
   466             break;
       
   467             
       
   468         case ECCPErrorCCUnspecifiedInterworkingError:
       
   469             if( IsVideoCall( aErrorInfo.iCallId ) )
       
   470                 {
       
   471                 SendGlobalInfoNoteL( EPhoneNoteCallInfoCauseValue127 );
       
   472                 }
       
   473             break;
       
   474             
       
   475         case ECCPErrorCCPreemption:        
       
   476         case ECCPErrorCCResponseToStatusEnquiry:        
       
   477         case ECCPErrorCCInvalidMandatoryInformation:        
       
   478         case ECCPErrorCCNonExistentMessageType:        
       
   479         case ECCPErrorCCIncompatibleMessageInProtocolState:        
       
   480         case ECCPErrorCCNonExistentInformationElement:
       
   481             if( IsVideoCall( aErrorInfo.iCallId ) )
       
   482                 {
       
   483                 SendGlobalInfoNoteL( EPhoneNoteCallInfoNotSupported );
       
   484                 }
       
   485             else
       
   486                 {
       
   487                 SendGlobalWarningNoteL( EPhoneErrorInConnection );
       
   488                 }     
       
   489             break;
       
   490 
       
   491         case ECCPErrorCCRecoveryOnTimerExpiry:        
       
   492             if( IsVideoCall( aErrorInfo.iCallId ) )
       
   493                 {
       
   494                 SendGlobalInfoNoteL( EPhoneNoteCallInfoNotSupported );                
       
   495                 }
       
   496             break;
       
   497             
       
   498         case ECCPErrorCCFacilityRejected:
       
   499             if( IsVideoCall( aErrorInfo.iCallId ) )
       
   500                 {
       
   501                 SendGlobalInfoNoteL( EPhoneNoteCallInfoNotSupported );
       
   502                 }
       
   503             else
       
   504                 {
       
   505                 SendGlobalErrorNoteL( EPhoneNoteTextRequestRejected );
       
   506                 }
       
   507             break;
       
   508             
       
   509         case ECCPTransferFailed:
       
   510             SendGlobalErrorNoteL( EPhoneNoteTextRequestRejected );
       
   511             break;
       
   512  
       
   513         case ECCPErrorCCServiceNotAvailable:
       
   514         case ECCPErrorCCBearerServiceNotImplemented:
       
   515         case ECCPErrorCCOnlyRestrictedDigitalInformationBCAvailable:
       
   516         case ECCPErrorCCServiceNotImplemented:
       
   517             if( IsVideoCall( aErrorInfo.iCallId ) )
       
   518                 {
       
   519                 SendGlobalInfoNoteL( EPhoneNoteCallInfoServiceNotAvailable );
       
   520                 }
       
   521             break;
       
   522             
       
   523         case ECCPErrorCUGOutgoingCallsBarred:
       
   524             SendGlobalInfoNoteL( EPhoneOutgoingCallsBarredWithinCUG );
       
   525             break;
       
   526         
       
   527         case ECCPErrorCUGNotSelected:
       
   528             SendGlobalInfoNoteL( EPhoneNoCUGSelected );
       
   529             break;
       
   530         
       
   531         case ECCPErrorCUGIndexUnknown:
       
   532             SendGlobalInfoNoteL( EPhoneUnknownCUGIndex );
       
   533             break;
       
   534         
       
   535         case ECCPErrorCUGIndexIncompatible:
       
   536             SendGlobalInfoNoteL( EPhoneCUGIndexIncompatible );
       
   537             break;
       
   538         
       
   539         case ECCPErrorCUGCallsFailure:
       
   540             SendGlobalInfoNoteL( EPhoneCUGCallsFailure );
       
   541             break;
       
   542         
       
   543         case ECCPErrorCLIRNotSubscribed:
       
   544             SendGlobalInfoNoteL( EPhoneCLIRNotSubscribed );
       
   545             break;
       
   546             
       
   547         case ECCPErrorCCBSPossible:
       
   548         case ECCPErrorCCBSNotPossible:
       
   549         case ECCPErrorSatControl:
       
   550             break;
       
   551                 
       
   552         default:
       
   553             __PHONELOG1(
       
   554                 EOnlyFatal, 
       
   555                 EPhoneControl,
       
   556                 "PHONEUI_ERROR: CPhoneErrorMessagesHandler::HandleErrorL - Error received (err=%d)",
       
   557                 aErrorInfo.iErrorCode);
       
   558             break;
       
   559         } 
       
   560     }    
       
   561 
       
   562 // -----------------------------------------------------------
       
   563 // CPhoneErrorMessagesHandler::IsVideoCall
       
   564 // -----------------------------------------------------------
       
   565 //
       
   566 TBool CPhoneErrorMessagesHandler::IsVideoCall( const TInt aCallId ) const
       
   567     {
       
   568     __LOGMETHODSTARTEND( EPhoneControl, "CPhoneErrorMessagesHandler::IsVideoCall() ");
       
   569 
       
   570     if( aCallId == KErrNotFound )
       
   571         {
       
   572         // Illegal call id, check call type command
       
   573         return ( iStateMachine->PhoneEngineInfo()->CallTypeCommand()
       
   574             == EPECallTypeVideo );  
       
   575         }
       
   576         
       
   577     return ( iStateMachine->PhoneEngineInfo()
       
   578         ->CallType( aCallId )== EPECallTypeVideo );
       
   579     }
       
   580     
       
   581 // End of File