telephonyserverplugins/common_tsy/commontsy/src/mmtsy/cmmvoicelinetsy.cpp
branchRCL_3
changeset 14 7ef16719d8cb
parent 0 3553901f7fa8
child 24 6638e7f4bd8f
child 42 3adadc800673
equal deleted inserted replaced
9:962e6306d9d2 14:7ef16719d8cb
   384             for ( TInt i = 0; i < iMmPhone->CallList()->GetNumberOfObjects(); 
   384             for ( TInt i = 0; i < iMmPhone->CallList()->GetNumberOfObjects(); 
   385                       i++ )
   385                       i++ )
   386                 {    
   386                 {    
   387                 mmCall = reinterpret_cast<CMmVoiceCallTsy*>(
   387                 mmCall = reinterpret_cast<CMmVoiceCallTsy*>(
   388                     iMmPhone->CallList()->GetMmCallByIndex(i) );
   388                     iMmPhone->CallList()->GetMmCallByIndex(i) );
   389                 if ( mmCall->ServiceRequested(
   389                 if ( ( ( mmCall->CallId() == 0 ) || ( mmCall->CallId() == -1 ))
       
   390                     && ( mmCall->ServiceRequested(
   390                         CMmCallTsy::EMultimodeCallDial ) 
   391                         CMmCallTsy::EMultimodeCallDial ) 
   391                     ||  mmCall->ServiceRequested(
   392                     ||  mmCall->ServiceRequested(
   392                         CMmCallTsy::EMultimodeMobileCallDialEmergencyCall )
   393                         CMmCallTsy::EMultimodeMobileCallDialEmergencyCall )
   393                     || ( mmCall->ServiceRequested(
   394                     || ( mmCall->ServiceRequested(
   394                         CMmCallTsy::EMultimodeCallDialISV ) ) 
   395                         CMmCallTsy::EMultimodeCallDialISV ) ) 
   395                     || ( mmCall->ServiceRequested(
   396                     || ( mmCall->ServiceRequested(
   396                         CMmCallTsy::EMultimodeCallDialNoFdnCheck ) ) )
   397                         CMmCallTsy::EMultimodeCallDialNoFdnCheck ) ) ) )
   397                     {
   398                     {
   398                     mmCall->SetCallId( callId );
   399                     mmCall->SetCallId( callId );
   399 TFLOGSTRING2("TSY: CMmVoiceLineTsy::CompleteNotifyDiallingStatus - mmCall SetCallId: %d", callId);                      
   400 TFLOGSTRING2("TSY: CMmVoiceLineTsy::CompleteNotifyDiallingStatus - mmCall SetCallId: %d", callId);                      
   400                     mmCall->CompleteNotifyMobileCallInfoChange( 
   401                     mmCall->CompleteNotifyMobileCallInfoChange( 
   401                                 aDataPackage );
   402                                 aDataPackage );
   452                 break;
   453                 break;
   453                 }
   454                 }
   454             }
   455             }
   455         }
   456         }
   456 
   457 
       
   458 	CMmCallList* callList = iMmPhone->CallList();
       
   459 	TInt numberOfObjectsInCallList = callList->GetNumberOfObjects();
       
   460     CMmVoiceCallTsy* mmCall = NULL;
       
   461 		
   457     //is TSY still waiting both hold and connected status indications
   462     //is TSY still waiting both hold and connected status indications
   458     if ( EWaitingHoldAndResumeOk == iSwapStatus )
   463     if ( EWaitingHoldAndResumeOk == iSwapStatus )
   459         {
   464         {
   460         //TSY is still waiting both hold and connected status indications
   465         //TSY is still waiting both hold and connected status indications
   461         if ( RMobileCall::EStatusHold == aCallStatus )
   466         if ( RMobileCall::EStatusHold == aCallStatus )
   475     else if ( ( EWaitingResumeOk == iSwapStatus &&
   480     else if ( ( EWaitingResumeOk == iSwapStatus &&
   476         RMobileCall::EStatusConnected == aCallStatus ) ||
   481         RMobileCall::EStatusConnected == aCallStatus ) ||
   477               ( EWaitingHoldOk == iSwapStatus &&
   482               ( EWaitingHoldOk == iSwapStatus &&
   478         RMobileCall::EStatusHold == aCallStatus ) )
   483         RMobileCall::EStatusHold == aCallStatus ) )
   479         {
   484         {
   480         CMmCallList* callList = iMmPhone->CallList();
       
   481         TInt numberOfObjectsInCallList = callList->GetNumberOfObjects();
       
   482         CMmVoiceCallTsy* mmCall = NULL;
       
   483         //find the call object from which the swap was requested.
   485         //find the call object from which the swap was requested.
   484         for ( TInt i = 0; i < numberOfObjectsInCallList; i++ )
   486         for ( TInt i = 0; i < numberOfObjectsInCallList; i++ )
   485             {
   487             {
   486             mmCall = reinterpret_cast<CMmVoiceCallTsy*>(
   488             mmCall = reinterpret_cast<CMmVoiceCallTsy*>(
   487                 callList->GetMmCallByIndex(i) );
   489                 callList->GetMmCallByIndex(i) );
   530 
   532 
   531             //return value indicating that Swap was completed.
   533             //return value indicating that Swap was completed.
   532             ret = ETrue;
   534             ret = ETrue;
   533             }
   535             }
   534         }
   536         }
       
   537 
       
   538     if ( numberOfObjectsInCallList==1 && !otherVoiceLine )
       
   539     	{
       
   540 
       
   541     	// Swapping a single call. 
       
   542         mmCall = reinterpret_cast<CMmVoiceCallTsy*>(
       
   543             callList->GetMmCallByIndex(0) );
       
   544         if ( mmCall->ServiceRequested( 
       
   545                 CMmCallTsy::EMultimodeMobileCallSwap ) )
       
   546             {
       
   547             // Complete swap request when the correct object has been found
       
   548             mmCall->CompleteSwap( KErrNone );
       
   549             }    	
       
   550     	ret = ETrue;
       
   551     	}
       
   552     
   535     return ret;
   553     return ret;
   536     }
   554     }
   537 
   555 
   538 // ---------------------------------------------------------------------------
   556 // ---------------------------------------------------------------------------
   539 // CMmVoiceLineTsy::SetSwapStatus
   557 // CMmVoiceLineTsy::SetSwapStatus