satengine/SatServer/Engine/src/csatmultimodeapi.cpp
branchRCL_3
changeset 20 987c9837762f
parent 19 7d48bed6ce0c
--- a/satengine/SatServer/Engine/src/csatmultimodeapi.cpp	Tue Aug 31 15:45:17 2010 +0300
+++ b/satengine/SatServer/Engine/src/csatmultimodeapi.cpp	Wed Sep 01 12:15:03 2010 +0100
@@ -218,17 +218,6 @@
     }
 
 // -----------------------------------------------------------------------------
-// CSatMultiModeApi::ContinueDTMFStringSending
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-//
-TInt CSatMultiModeApi::ContinueDTMFStringSending( TBool aContinue )
-    {
-    LOG( SIMPLE, "SATENGINE: CSatMultiModeApi::ContinueDTMFStringSending" )
-    return iPhone.ContinueDTMFStringSending( aContinue );
-    }
-
-// -----------------------------------------------------------------------------
 // CSatMultiModeApi::DialNoFdnCheck
 // (other items were commented in a header).
 // -----------------------------------------------------------------------------
@@ -237,9 +226,6 @@
         const TDesC8& aCallParams, const TDesC& aTelNumber)
     {
     LOG( SIMPLE, "SATENGINE: CSatMultiModeApi::DialNoFdnCheck calling" )
-    TInt err = LoadMobileCall();
-    LOG2( SIMPLE, "SATENGINE: CSatMultiModeApi::DialNoFdnCheck err %d", err )
-    
     iCall.DialNoFdnCheck( aStatus, aCallParams, aTelNumber );
     LOG( SIMPLE, "SATENGINE: CSatMultiModeApi::DialNoFdnCheck exiting" )
     }
@@ -308,7 +294,7 @@
 // (other items were commented in a header).
 // -----------------------------------------------------------------------------
 //
-TBool CSatMultiModeApi::IsCallIncoming()
+TBool CSatMultiModeApi::IsCallIncoming( )
     {
     LOG( SIMPLE, "SATENGINE: CSatMultiModeApi::IsCallIncoming entering" )
     TInt lines( 0 );
@@ -355,75 +341,8 @@
           callIncoming )
     return callIncoming;
     }
-
 // -----------------------------------------------------------------------------
-// CSatMultiModeApi::NotifyMobileCallStatusChange
-// -----------------------------------------------------------------------------
-//
-void CSatMultiModeApi::NotifyMobileCallStatusChange ( 
-        TRequestStatus& aReqStatus, RMobileCall::TMobileCallStatus& aStatus )
-    {
-    LOG( SIMPLE, "SATENGINE: CSatMultiModeApi::NotifyMobileCallStatusChange \
-             calling" )
-    iCall.NotifyMobileCallStatusChange( aReqStatus, aStatus );
-    LOG( SIMPLE, "SATENGINE: CSatMultiModeApi::NotifyMobileCallStatusChange \
-             exiting" )
-    }
-
-// -----------------------------------------------------------------------------
-// CSatMultiModeApi::NotifyCallStatusChangeCancel
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-//
-void CSatMultiModeApi::NotifyCallStatusChangeCancel()
-    {
-    LOG( SIMPLE, "SATENGINE: CSatMultiModeApi::DialCancel calling" )
-    iCall.NotifyStatusChangeCancel();
-    LOG( SIMPLE, "SATENGINE: CSatMultiModeApi::DialCancel exiting" )
-    }
-
-// -----------------------------------------------------------------------------
-// CSatMultiModeApi::NotifyMobileCallStatusChange
-// -----------------------------------------------------------------------------
-//
-void CSatMultiModeApi::TerminateActiveCalls(TRequestStatus& aReqStatus)
-    {
-    LOG( SIMPLE, "SATENGINE: CSatMultiModeApi::TerminateAllCalls calling" )
-
-    iPhone.TerminateActiveCalls( aReqStatus );
-    
-    LOG( SIMPLE, "SATENGINE: CSatMultiModeApi::TerminateAllCalls exiting" )
-    } 
-
-// -----------------------------------------------------------------------------
-// CSatMultiModeApi::GetMobileCallInfo
-// -----------------------------------------------------------------------------
-//
-TInt CSatMultiModeApi::GetMobileCallInfo(TDes8& aCallInfo)
-    {
-    LOG( SIMPLE, "SATENGINE: CSatMultiModeApi::GetMobileCallInfo calling" )
-    TInt ret = iCall.GetMobileCallInfo( aCallInfo );
-    LOG2( SIMPLE, "SATENGINE: CSatMultiModeApi::GetMobileCallInfo exiting %d",
-            ret )
-    return ret;
-    }
-       
-// -----------------------------------------------------------------------------
-// CSatMultiModeApi::GetMobileCallInfo
-// -----------------------------------------------------------------------------
-//
-void CSatMultiModeApi::DialEmergencyCall(TRequestStatus& aReqStatus, 
-        const TDesC& aNumber)
-    {
-    LOG( SIMPLE, "SATENGINE: CSatMultiModeApi::DialEmergencyCall calling" )
-    TInt err = LoadMobileCall();
-    LOG2( SIMPLE, "SATENGINE: CSatMultiModeApi::DialEmergencyCall err %d", err )
-    iCall.DialEmergencyCall( aReqStatus, aNumber );
-    LOG( SIMPLE, "SATENGINE: CSatMultiModeApi::DialEmergencyCall exiting" )
-    }
-
-// -----------------------------------------------------------------------------
-// CSatMultiModeApi::ConstructL
+// CSatMultiModeApi::SetActiveAndWait
 // -----------------------------------------------------------------------------
 //
 void CSatMultiModeApi::ConstructL()
@@ -435,6 +354,7 @@
 #if !defined ( __WINSCW__ )
     //On the emulator the load will leave. We can not use the functionaly
     //on enmulator
+    LoadMobileCallL();
     LoadUssdMessagingL();
 #endif
 
@@ -615,24 +535,14 @@
     }
 
 // -----------------------------------------------------------------------------
-// CSatMultiModeApi::LoadMobileCall
+// CSatMultiModeApi::LoadMobileCallL
 // (other items were commented in a header).
 // -----------------------------------------------------------------------------
 //
-TInt CSatMultiModeApi::LoadMobileCall()
+void CSatMultiModeApi::LoadMobileCallL()
     {
     LOG( SIMPLE, "SATENGINE: CSatMultiModeApi::LoadMobileCallL calling" )
 
-    if ( iCallOpened )
-        {
-        iCall.Close();
-        }
-    
-    if ( iLineOpened )
-        {
-        iLine.Close();
-        }
-    
     TInt numberOfTries( 1 );        // Indicates loop tryouts
     TBool loopSuccess( EFalse );    // Loop stopper, if this is ETrue
     TInt error = KErrNone;          // Error that is Leave'd
@@ -657,11 +567,13 @@
 
     LOG2( NORMAL, "SATENGINE: CSatMultiModeApi::LoadMobileCallL \
           iLine error: %i", error )
+    User::LeaveIfError( error );
     
     numberOfTries = 1;
     loopSuccess =  EFalse;
+    error = KErrNone;
 
-    while ( iLineOpened &&!loopSuccess && numberOfTries <= KLoopMaxTryouts )
+    while ( !loopSuccess && numberOfTries <= KLoopMaxTryouts )
         {
         error = iCall.OpenNewCall( iLine );
         if ( KErrNone == error )
@@ -682,8 +594,9 @@
     LOG2( NORMAL, "SATENGINE: CSatMultiModeApi::LoadMobileCallL \
           iCall error: %i", error )
 
-    LOG( SIMPLE, "SATENGINE: CSatMultiModeApi::LoadMobileCallL exiting" )
-    return error;
+    User::LeaveIfError( error );
+
+    LOG( SIMPLE, "SATENGINE: CSatMultiModeApi::LoadMobileCallL exiting" )   
     }
     
 // -----------------------------------------------------------------------------
@@ -723,7 +636,7 @@
           
     User::LeaveIfError( error );
 
-    LOG( SIMPLE, "SATENGINE: CSatMultiModeApi::LoadUssdMessagingL exiting" )
+    LOG( SIMPLE, "SATENGINE: CSatMultiModeApi::LoadUssdMessagingL exiting" )   
     }