phoneapp/phoneuicontrol/src/cphonebtaadisconnecthandler.cpp
changeset 78 baacf668fe89
parent 37 ba76fc04e6c2
equal deleted inserted replaced
76:cfea66083b62 78:baacf668fe89
    32 #include    "phonerssbase.h"
    32 #include    "phonerssbase.h"
    33 #include    "tphonecmdparamquery.h"
    33 #include    "tphonecmdparamquery.h"
    34 #include    "tphonecmdparamcallstatedata.h"
    34 #include    "tphonecmdparamcallstatedata.h"
    35 #include    "telinternalsingletonuids.h"
    35 #include    "telinternalsingletonuids.h"
    36 #include    "cphonestatehandle.h"
    36 #include    "cphonestatehandle.h"
       
    37 #include    "phonecallutil.h"
    37 
    38 
    38 // CONSTANTS
    39 // CONSTANTS
    39 
    40 
    40 // ============================ MEMBER FUNCTIONS ===============================
    41 // ============================ MEMBER FUNCTIONS ===============================
    41 
    42 
   157     __LOGMETHODSTARTEND(EPhoneControl, "CPhoneBtaaDisconnectHandler::HandleConnectionLostL()"); 
   158     __LOGMETHODSTARTEND(EPhoneControl, "CPhoneBtaaDisconnectHandler::HandleConnectionLostL()"); 
   158     iVideoCallStatus = EFalse;
   159     iVideoCallStatus = EFalse;
   159            
   160            
   160     if ( FeatureManager::FeatureSupported( KFeatureIdCsVideoTelephony ) )
   161     if ( FeatureManager::FeatureSupported( KFeatureIdCsVideoTelephony ) )
   161         {
   162         {
   162         // Fetch active call's id from view
   163         // Fetch active call's id
   163         TPhoneCmdParamCallStateData callStateData;
   164         TInt call = PhoneCallUtil::CallIdByState( EPEStateConnected );
   164         callStateData.SetCallState( EPEStateConnected );
       
   165         iViewCommandHandle->HandleCommandL( 
       
   166             EPhoneViewGetCallIdByState, &callStateData );
       
   167         TInt call = callStateData.CallId();
       
   168         if ( call != KErrNotFound &&
   165         if ( call != KErrNotFound &&
   169             iStateMachine->PhoneEngineInfo()->CallType( call ) == EPECallTypeVideo )
   166             iStateMachine->PhoneEngineInfo()->CallType( call ) == EPECallTypeVideo )
   170             {
   167             {
   171             iVideoCallStatus = ETrue;
   168             iVideoCallStatus = ETrue;
   172             }
   169             }
   249     {
   246     {
   250     __LOGMETHODSTARTEND(EPhoneControl,"CPhoneBtaaDisconnectHandler::TerminateAllCallsL()");
   247     __LOGMETHODSTARTEND(EPhoneControl,"CPhoneBtaaDisconnectHandler::TerminateAllCallsL()");
   251     
   248     
   252     if( iVideoCallStatus )
   249     if( iVideoCallStatus )
   253         {
   250         {
   254         // Fetch active call's id from view
   251         // Fetch active call's id
   255         TPhoneCmdParamCallStateData callStateData;
   252         TInt callId = PhoneCallUtil::CallIdByState( EPEStateConnected );    
   256         callStateData.SetCallState( EPEStateConnected );
   253         if ( callId != KErrNotFound )
   257         iViewCommandHandle->HandleCommandL(
   254             {
   258             EPhoneViewGetCallIdByState, &callStateData );
   255             iStateMachine->SetCallId( callId );
   259             
       
   260         if ( callStateData.CallId() != KErrNotFound )
       
   261             {
       
   262             iStateMachine->SetCallId( callStateData.CallId() );
       
   263             iStateMachine->SendPhoneEngineMessage( 
   256             iStateMachine->SendPhoneEngineMessage( 
   264                 MPEPhoneModel::EPEMessageRelease );        
   257                 MPEPhoneModel::EPEMessageRelease );        
   265             }
   258             }
   266         else
   259         else
   267             {
   260             {