phoneapp/phoneuistates/src/cphoneconferenceandwaitingandcallsetup.cpp
changeset 78 baacf668fe89
parent 76 cfea66083b62
equal deleted inserted replaced
76:cfea66083b62 78:baacf668fe89
    25 #include "tphonecmdparamcallheaderdata.h"
    25 #include "tphonecmdparamcallheaderdata.h"
    26 #include "phonestatedefinitionsgsm.h"
    26 #include "phonestatedefinitionsgsm.h"
    27 #include "phonelogger.h"
    27 #include "phonelogger.h"
    28 #include "tphonecmdparamboolean.h"
    28 #include "tphonecmdparamboolean.h"
    29 #include "tphonecmdparaminteger.h"
    29 #include "tphonecmdparaminteger.h"
    30 #include "tphonecmdparamcallstatedata.h"
       
    31 #include "cphonemainresourceresolver.h"
    30 #include "cphonemainresourceresolver.h"
    32 #include "phonerssbase.h"
    31 #include "phonerssbase.h"
    33 #include "tphonecmdparamglobalnote.h"
    32 #include "tphonecmdparamglobalnote.h"
    34 #include "phoneui.hrh"
    33 #include "phoneui.hrh"
       
    34 #include "phonecallutil.h"
    35 
    35 
    36 // ================= MEMBER FUNCTIONS =======================
    36 // ================= MEMBER FUNCTIONS =======================
    37 
    37 
    38 // C++ default constructor can NOT contain any code, that
    38 // C++ default constructor can NOT contain any code, that
    39 // might leave.
    39 // might leave.
   235         "CPhoneConferenceAndWaitingAndCallSetup::HandleConferenceIdleL");
   235         "CPhoneConferenceAndWaitingAndCallSetup::HandleConferenceIdleL");
   236     BeginUiUpdateLC();
   236     BeginUiUpdateLC();
   237     iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveConferenceBubble );
   237     iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveConferenceBubble );
   238     iNumberEntryManager->SetVisibilityIfNumberEntryUsedL(ETrue);
   238     iNumberEntryManager->SetVisibilityIfNumberEntryUsedL(ETrue);
   239 
   239 
   240     TPhoneCmdParamCallStateData callStateData;
   240     TInt callId = PhoneCallUtil::CallIdByState( EPEStateConnected );
   241     callStateData.SetCallState( EPEStateConnected );
   241     if( callId > KErrNotFound ) //  No need update cba's. 
   242     iViewCommandHandle->HandleCommandL( EPhoneViewGetCallIdByState,
       
   243         &callStateData );
       
   244  
       
   245     if( callStateData.CallId() > KErrNotFound ) //  No need update cba's. 
       
   246         {        
   242         {        
   247         UpdateUiCommands();
   243         UpdateUiCommands();
   248         iStateMachine->ChangeState( EPhoneStateSingleAndCallSetupAndWaiting );
   244         iStateMachine->ChangeState( EPhoneStateSingleAndCallSetupAndWaiting );
   249         }
   245         }
   250     else 
   246     else 
   251         {
   247         {
   252         callStateData.SetCallState( EPEStateHeld );
   248         callId = PhoneCallUtil::CallIdByState( EPEStateHeld );
   253         iViewCommandHandle->HandleCommandL( EPhoneViewGetCallIdByState,
       
   254             &callStateData );
       
   255         
       
   256         UpdateUiCommands();
   249         UpdateUiCommands();
   257         
   250         
   258         if( callStateData.CallId() > KErrNotFound )
   251         if( callId > KErrNotFound )
   259             {     
   252             {     
   260             iStateMachine->ChangeState( EPhoneStateSingleAndCallSetupAndWaiting );
   253             iStateMachine->ChangeState( EPhoneStateSingleAndCallSetupAndWaiting );
   261             }
   254             }
   262         else
   255         else
   263             {
   256             {
   304             // Don't do anything, wait for ConferenceIdle message
   297             // Don't do anything, wait for ConferenceIdle message
   305             } 
   298             } 
   306         else
   299         else
   307             {
   300             {
   308             BeginUiUpdateLC();
   301             BeginUiUpdateLC();
   309             TPhoneCmdParamCallStateData callStateData;
   302             TInt callId = PhoneCallUtil::CallIdByState( EPEStateRinging );
   310             callStateData.SetCallState( EPEStateRinging );
   303             if( callId > KErrNotFound )
   311             iViewCommandHandle->HandleCommandL( EPhoneViewGetCallIdByState,
       
   312                 &callStateData );
       
   313             if( callStateData.CallId() > KErrNotFound )
       
   314                 { 
   304                 { 
   315                 // Show the number entry if callsetup failed with number busy
   305                 // Show the number entry if callsetup failed with number busy
   316                 // etc reason.
   306                 // etc reason.
   317                 iNumberEntryManager->SetVisibilityIfNumberEntryUsedL(ETrue);
   307                 iNumberEntryManager->SetVisibilityIfNumberEntryUsedL(ETrue);
   318                 UpdateUiCommands();
   308                 UpdateUiCommands();