phoneapp/phoneuicontrol/src/cphonecbamanager.cpp
branchRCL_3
changeset 3 8871b09be73b
parent 1 838b0a10d15b
child 4 24062c24fe38
equal deleted inserted replaced
2:c84cf270c54f 3:8871b09be73b
   137             {
   137             {
   138             resourceId = EPhoneEmptyBackCBA;
   138             resourceId = EPhoneEmptyBackCBA;
   139             }
   139             }
   140         else
   140         else
   141             {
   141             {
   142             TBool dtmfEditorVisible = iViewCommandHandle.HandleCommandL(
   142             resourceId = GetNumberEntryCbaIdL();
   143                     EPhoneViewIsDTMFEditorVisible ) ==
       
   144                     EPhoneViewResponseSuccess;
       
   145             TPhoneCmdParamInteger activeCallCount;
       
   146             iViewCommandHandle.ExecuteCommandL(
       
   147                     EPhoneViewGetCountOfActiveCalls, &activeCallCount );
       
   148             
       
   149             TPhoneCmdParamCallStateData callStateData;
       
   150 		    callStateData.SetCallState( EPEStateRinging );
       
   151             iViewCommandHandle.HandleCommandL(
       
   152                     EPhoneViewGetCallIdByState, &callStateData );
       
   153 		    
       
   154             TInt incomingCall = callStateData.CallId();
       
   155 
       
   156             if( dtmfEditorVisible )
       
   157             	{
       
   158                 resourceId = EPhoneDtmfDialerCBA;
       
   159                 }                    
       
   160             else if( activeCallCount.Integer() == ENoActiveCalls )
       
   161                 {
       
   162                 resourceId = EPhoneNumberAcqCBA;
       
   163                 }
       
   164             else if ( activeCallCount.Integer() > ENoActiveCalls &&  
       
   165             		  incomingCall > KErrNotFound )
       
   166 				{
       
   167 				resourceId = EPhoneCallHandlingCallWaitingCBA;
       
   168 				}
       
   169             else
       
   170                 {
       
   171                 resourceId = EPhoneInCallNumberAcqCBA;
       
   172                 }
       
   173             }
   143             }
   174         }
   144         }
   175 
   145 
   176     // Check if Audio is muted
   146     // Check if Audio is muted
   177     else if ( iStateMachine.PhoneEngineInfo()->AudioMute() &&
   147     else if ( iStateMachine.PhoneEngineInfo()->AudioMute() &&
   341 
   311 
   342     __PHONELOG1( EBasic, EPhoneControl,
   312     __PHONELOG1( EBasic, EPhoneControl,
   343             "CPhoneCbaManager::SetCbaL : %d",aResource );
   313             "CPhoneCbaManager::SetCbaL : %d",aResource );
   344 
   314 
   345     TPhoneCmdParamInteger integerParam;
   315     TPhoneCmdParamInteger integerParam;
   346     integerParam.SetInteger(
   316     
   347         CPhoneMainResourceResolver::Instance()->ResolveResourceID(
   317     if ( EPhoneEasyDialingCba == aResource )
   348         aResource ) );
   318         {
       
   319         iViewCommandHandle.ExecuteCommandL( EPhoneViewGetEasyDialingCbaId, &integerParam );
       
   320         }
       
   321     else
       
   322         {
       
   323         integerParam.SetInteger(
       
   324             CPhoneMainResourceResolver::Instance()->ResolveResourceID(
       
   325             aResource ) );
       
   326         }
       
   327 
   349     iViewCommandHandle.ExecuteCommandL( EPhoneViewUpdateCba,
   328     iViewCommandHandle.ExecuteCommandL( EPhoneViewUpdateCba,
   350         &integerParam );
   329         &integerParam );
   351     }
   330     }
   352 
   331 
   353 // -----------------------------------------------------------
   332 // -----------------------------------------------------------
   485     SetRingtoneSilencedStatus( EFalse );
   464     SetRingtoneSilencedStatus( EFalse );
   486 
   465 
   487     return ret;
   466     return ret;
   488     }
   467     }
   489 
   468 
       
   469 // -----------------------------------------------------------
       
   470 // CPhoneCbaManager::GetNumberEntryCbaIdL
       
   471 // -----------------------------------------------------------
       
   472 //
       
   473 TInt CPhoneCbaManager::GetNumberEntryCbaIdL()
       
   474     {
       
   475     TInt ret( EPhoneNumberAcqCBA );
       
   476     
       
   477     if ( iState->IsDialingExtensionInFocusL() )
       
   478         {
       
   479         ret = EPhoneEasyDialingCba;
       
   480         }
       
   481     else
       
   482         {
       
   483         TBool dtmfEditorVisible = iViewCommandHandle.HandleCommandL(
       
   484                 EPhoneViewIsDTMFEditorVisible ) ==
       
   485                 EPhoneViewResponseSuccess;
       
   486         TPhoneCmdParamInteger activeCallCount;
       
   487         iViewCommandHandle.ExecuteCommandL(
       
   488                 EPhoneViewGetCountOfActiveCalls, &activeCallCount );
       
   489 
       
   490         TPhoneCmdParamCallStateData callStateData;
       
   491         callStateData.SetCallState( EPEStateRinging );
       
   492         iViewCommandHandle.HandleCommandL(
       
   493                 EPhoneViewGetCallIdByState, &callStateData );
       
   494 
       
   495         TInt incomingCall = callStateData.CallId();
       
   496 
       
   497         if( dtmfEditorVisible )
       
   498             {
       
   499             ret = EPhoneDtmfDialerCBA;
       
   500             }                    
       
   501         else if( activeCallCount.Integer() == ENoActiveCalls )
       
   502             {
       
   503             ret = EPhoneNumberAcqCBA;
       
   504             }
       
   505         else if ( activeCallCount.Integer() > ENoActiveCalls &&  
       
   506                 incomingCall > KErrNotFound )
       
   507             {
       
   508             ret = EPhoneCallHandlingCallWaitingCBA;
       
   509             }
       
   510         else
       
   511             {
       
   512             ret = EPhoneInCallNumberAcqCBA;
       
   513             }
       
   514         }
       
   515     
       
   516     return ret;
       
   517     }
       
   518 
   490 // ======== LOCAL FUNCTIONS ========
   519 // ======== LOCAL FUNCTIONS ========
   491 
   520 
   492 
   521