diff -r c76a0b1755b9 -r 2be0b271d017 phoneengine/phonemodel/src/cpemessagehandler.cpp --- a/phoneengine/phonemodel/src/cpemessagehandler.cpp Fri Sep 17 08:29:19 2010 +0300 +++ b/phoneengine/phonemodel/src/cpemessagehandler.cpp Mon Oct 04 00:16:48 2010 +0300 @@ -2485,81 +2485,6 @@ } } -// ----------------------------------------------------------------------------- -// CPEMessageHandler::HandleSwitchToVideoOrVoice -// This method handle EPEMessageSwitchToVideoOrVoice message. If current call id -// is Data then call will be switched to Voice call and the other way around. -// Method set current phonenumber to dataStore and get call parameter and call -// hangUp to current call. -// When hangUp is completed (EPEMessageIdle was sent) sequence will be continue -// from ContinueSwitchToCall method. -// ----------------------------------------------------------------------------- -// -TInt CPEMessageHandler::HandleSwitchToVideoOrVoice( const TInt aCallId ) - { - // First get the current phone number and then end voice call - // or video call. - TInt err( ECCPErrorNone ); - - TEFLOGSTRING2( KTAINT, - "PE CPEMessageHandler::HandleSwitchToVideoOrVoice, aCallId : %d", aCallId ); - // if out of memory case then phonenumber is already datastore. - if( aCallId != KPECallIdNotUsed ) - { - if ( iDataStore.CallDirection( aCallId ) == RMobileCall::EMobileOriginated ) - { - iDataStore.SetSwitchToNumberCommand( iDataStore.WholeOutgoingPhoneNumber( aCallId ) ); - // Clear phonenumber to prevent using the wrong number in MO video call. - iDataStore.SetPhoneNumber( KNullDesC() ); - } - else - { - iDataStore.SetSwitchToNumberCommand( iDataStore.RemotePhoneNumber( aCallId ) ); - // Remote phone number must be stored as the phone number in case of low-memory situation where - // an MO voice call can be initiated after failing to answer an MT video call. - iDataStore.SetPhoneNumber( iDataStore.RemotePhoneNumber( aCallId ) ); - } - - err = HandleReleaseCall(); - } - - return err; - } - -// ----------------------------------------------------------------------------- -// CPEMessageHandler::ContinueSwitchToCall -// Metdod calls dial to multimedia call or voice call. -// ----------------------------------------------------------------------------- -// -TInt CPEMessageHandler::ContinueSwitchToCall( const TInt aCallId ) - { - TEFLOGSTRING2( KTAINT, - "PE CPEMessageHandler::ContinueSwitchToCall, aCallId : %d", aCallId ); - TInt callId; - TInt errorCode( ECCPErrorNone ); - - TPEPhoneNumber phoneNumber = iDataStore.SwitchToNumberCommand(); - TEFLOGSTRING2( KTAINT, - "PE CPEMessageHandler::ContinueSwitchToCall, phoneNumber : %S", - &phoneNumber ); - - // Check is current call voice or video - if ( CallIdCheck::IsVoice( aCallId ) ) - { - // Create new video call to same phonenumber - iDataStore.SetCallTypeCommand( EPECallTypeVideo ); - errorCode = iCallHandling.DialMultimedia( phoneNumber, callId ); - } - else if ( CallIdCheck::IsVideo( aCallId ) ) - { - // Create new voice call to same phonenumber - iDataStore.SetCallTypeCommand( EPECallTypeCSVoice ); - errorCode = iCallHandling.DialCall( phoneNumber, callId ); - } - TEFLOGSTRING2( KTAINT, - "PE CPEMessageHandler::ContinueSwitchToCall(), error : %d", errorCode ); - return errorCode; - } // ----------------------------------------------------------------------------- // CPEMessageHandler::RemovePreAndPostFix