--- a/satengine/SatServer/Engine/src/csatmultimodeapi.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/satengine/SatServer/Engine/src/csatmultimodeapi.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -226,6 +226,9 @@
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" )
}
@@ -309,7 +312,7 @@
// (other items were commented in a header).
// -----------------------------------------------------------------------------
//
-TBool CSatMultiModeApi::IsCallIncoming( )
+TBool CSatMultiModeApi::IsCallIncoming()
{
LOG( SIMPLE, "SATENGINE: CSatMultiModeApi::IsCallIncoming entering" )
TInt lines( 0 );
@@ -356,8 +359,77 @@
callIncoming )
return callIncoming;
}
+
// -----------------------------------------------------------------------------
-// CSatMultiModeApi::SetActiveAndWait
+// 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::TerminateAllCalls(TRequestStatus& aReqStatus)
+ {
+ LOG( SIMPLE, "SATENGINE: CSatMultiModeApi::TerminateAllCalls calling" )
+ // RMobilePhone::TerminateAllCalls don't work.
+ TName allCalls;
+ allCalls.Copy( KTerminateAllCalls );
+ iCustomPhone.TerminateCall( aReqStatus, allCalls );
+
+ 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
// -----------------------------------------------------------------------------
//
void CSatMultiModeApi::ConstructL()
@@ -369,7 +441,6 @@
#if !defined ( __WINSCW__ )
//On the emulator the load will leave. We can not use the functionaly
//on enmulator
- LoadMobileCallL();
LoadUssdMessagingL();
#endif
@@ -550,14 +621,24 @@
}
// -----------------------------------------------------------------------------
-// CSatMultiModeApi::LoadMobileCallL
+// CSatMultiModeApi::LoadMobileCall
// (other items were commented in a header).
// -----------------------------------------------------------------------------
//
-void CSatMultiModeApi::LoadMobileCallL()
+TInt CSatMultiModeApi::LoadMobileCall()
{
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
@@ -582,13 +663,11 @@
LOG2( NORMAL, "SATENGINE: CSatMultiModeApi::LoadMobileCallL \
iLine error: %i", error )
- User::LeaveIfError( error );
numberOfTries = 1;
loopSuccess = EFalse;
- error = KErrNone;
- while ( !loopSuccess && numberOfTries <= KLoopMaxTryouts )
+ while ( iLineOpened &&!loopSuccess && numberOfTries <= KLoopMaxTryouts )
{
error = iCall.OpenNewCall( iLine );
if ( KErrNone == error )
@@ -609,9 +688,8 @@
LOG2( NORMAL, "SATENGINE: CSatMultiModeApi::LoadMobileCallL \
iCall error: %i", error )
- User::LeaveIfError( error );
-
- LOG( SIMPLE, "SATENGINE: CSatMultiModeApi::LoadMobileCallL exiting" )
+ LOG( SIMPLE, "SATENGINE: CSatMultiModeApi::LoadMobileCallL exiting" )
+ return error;
}
// -----------------------------------------------------------------------------
@@ -651,7 +729,7 @@
User::LeaveIfError( error );
- LOG( SIMPLE, "SATENGINE: CSatMultiModeApi::LoadUssdMessagingL exiting" )
+ LOG( SIMPLE, "SATENGINE: CSatMultiModeApi::LoadUssdMessagingL exiting" )
}