--- a/phoneengine/callhandling/src/cpecallhandling.cpp Tue Aug 31 15:14:29 2010 +0300
+++ b/phoneengine/callhandling/src/cpecallhandling.cpp Wed Sep 01 12:30:10 2010 +0100
@@ -38,9 +38,10 @@
#include <PSVariables.h>
#include <ctsydomainpskeys.h>
#include <mccecall.h>
-#include <psetsaobserver.h>
+#include <PsetSAObserver.h>
#include <cccecallparameters.h>
#include <centralrepository.h>
+#include <telconfigcrkeys.h>
// EXTERNAL DATA STRUCTURES
// None
@@ -49,18 +50,6 @@
// None
// CONSTANTS
-/******************************************************************************
-* Telephony Configuration API
-* Keys under this category are used in defining telephony configuration.
-******************************************************************************/
-const TUid KCRUidTelConfiguration = {0x102828B8};
-
-/**
-* Amount of digits to be used in contact matching.
-* This allows a customer to variate the amount of digits to be matched.
-*/
-const TUint32 KTelMatchDigits = 0x00000001;
-
const TInt KPEMatchDefault = 7;
// MACROS
@@ -461,7 +450,7 @@
CCPCall::TCallType callType = connectedCall.Parameters().CallType();
if ( EPEStateConnected == call->GetCallState() )
- {
+ {
if ( callType == CCPCall::ECallTypePS )
{
TEFLOGSTRING( KTAMESINT,
@@ -477,6 +466,7 @@
iCallOpenParams->SetCallType( CCPCall::ECallTypeCSVoice );
iModel.DataStore()->SetServiceIdCommand( 1 );
iModel.DataStore()->SetCallType( EPECallTypeCSVoice, aCallId );
+
if ( UpdateColpNumber( aCallId, connectedCall ))
{
iModel.SendMessage( MEngineMonitor::EPEMessageColpNumberAvailable, aCallId );
@@ -685,6 +675,7 @@
{
// Dial request passed on successfully: forward new call id
aCallId = callData->GetCallId();
+ iModel.SendMessage( MEngineMonitor::EPEMessageInitiatedMoCall, aCallId );
}
}
}
@@ -847,10 +838,7 @@
else if ( CallIdCheck::IsConference( aCallId ) )
{
- if( iConferenceCall )
- {
- errorCode = iConferenceCall->HangUp();
- }
+ errorCode = ReleaseConference();
}
return errorCode;
}
@@ -869,12 +857,7 @@
RejectCall(); // Rejects ringing call if one exists.
- if ( iConferenceCall )
- {
- TEFLOGSTRING( KTAMESOUT,
- "CALL CPECallHandling::TerminateAllConnections: Hanging Up conference call" );
- iConferenceCall->HangUp();
- }
+ ReleaseConference(); // Release conference call if exists
// Hangup normal Voice Calls
for( TInt callId = 0; callId < KPEMaximumNumberOfVoiceCalls; callId++ )
@@ -897,6 +880,28 @@
}
// -----------------------------------------------------------------------------
+// CPECallHandling::UpdatePhoneIdentity
+// Method updates phone identity
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TInt CPECallHandling::UpdatePhoneIdentity(
+ MEngineMonitor::TPEMessagesFromPhoneEngine /*aMessage*/ )
+ {
+ TInt retValue( KErrNone );
+ CSInfo csinfo;
+ retValue = iConvergedCallEngine.GetCSInfo( csinfo );
+
+ TPEPhoneIdentityParameters phoneIdentityParameters;
+
+ phoneIdentityParameters.iSerialNumber = csinfo.iSerialNumber;
+
+ iModel.DataStore()->SetPhoneIdentityParameters( phoneIdentityParameters );
+
+ SendMessage( MEngineMonitor::EPEMessageShowIMEI );
+ return retValue;
+ }
+
+// -----------------------------------------------------------------------------
// CPECallHandling::IsCallInState
// returns ETrue if there is a call in given state; otherwise EFalse
// -----------------------------------------------------------------------------
@@ -1908,10 +1913,8 @@
SendMessage( MEngineMonitor::EPEMessageInitiatedEmergencyCall );
TEFLOGSTRING( KTAINT, "CALL CPECallHandling::DialEmergencyCall start emergency dialing" );
CPESingleCall* callData = iCallArrayOwner->GetCallObject( KPEEmergencyCallId );
- if ( callData )
- {
- callData->DialEmergency( aEmergencyNumber );
- }
+ // coverity[dereference]
+ callData->DialEmergency( aEmergencyNumber );
}
// -----------------------------------------------------------------------------
@@ -1957,7 +1960,16 @@
TEFLOGSTRING( KTAINT, "CALL CPECallHandling::CreateConferenceCallL end" );
}
-
+// -----------------------------------------------------------------------------
+// CPECallHandling::GetLifeTime
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TBool CPECallHandling::GetLifeTime( TDes8& aLifeTimeInfo )
+ {
+ TEFLOGSTRING( KTAINT, "CALL CPECallHandling::GetLifeTime" );
+ return iConvergedCallEngine.GetLifeTime( aLifeTimeInfo );
+ }
+
// -----------------------------------------------------------------------------
// CPECallHandling::UpdateSaSetting
// -----------------------------------------------------------------------------
@@ -2365,13 +2377,19 @@
else
{
CPESingleCall* callData = iCallArrayOwner->CallPointerByState( EPEStateHeld );
- // Check that no actice and held call, if waiting call gets idle
- CPESingleCall* connectedCallData = iCallArrayOwner->CallPointerByState( EPEStateConnected );
- if( callData && ( iModel.DataStore()->ResumeHeldCall( callData->GetCallId() ) )
- && !connectedCallData )
+ if ( callData )
{
- TEFLOGSTRING( KTAINT, "CALL CPECallHandling::HandleAutoResume single" );
- callData->Resume();
+ // Checks to be done in case waiting call gets idle state:
+ // Check that no active and held calls case
+ // Check that no dialling/connecting and held calls case
+ if ( iModel.DataStore()->ResumeHeldCall( callData->GetCallId() ) &&
+ !IsCallInState( EPEStateConnected ) &&
+ !IsCallInState( EPEStateConnecting ) &&
+ !IsCallInState( EPEStateDialing ) )
+ {
+ TEFLOGSTRING( KTAINT, "CALL CPECallHandling::HandleAutoResume single" );
+ callData->Resume();
+ }
}
}
}
@@ -2406,17 +2424,18 @@
if ( callType == CCPCall::ECallTypeCSVoice || callType == CCPCall::ECallTypeVideo )
{
const CCCECallParameters& params = static_cast<const CCCECallParameters&>( parameters );
-
- if ( params.Origin() == CCCECallParameters::ECCECallOriginSAT )
- {
- iModel.DataStore()->SetCallOrigin( EPECallOriginSAT, aCallId );
- iModel.DataStore()->SetRemoteName( params.AlphaId(), aCallId );
- iModel.DataStore()->SetRemotePhoneNumber( KNullDesC(), aCallId );
- }
+
+ // do not overwrite if it's client call, which CCE is not aware of
+ if ( iModel.DataStore()->CallOrigin( aCallId ) == EPECallOriginPhone )
+ {
+ if ( params.Origin() == CCCECallParameters::ECCECallOriginSAT )
+ {
+ iModel.DataStore()->SetCallOrigin( EPECallOriginSAT, aCallId );
+ }
+ }
}
}
-
// -----------------------------------------------------------------------------
// CPECallHandling::UpdateColpNumber
// -----------------------------------------------------------------------------
@@ -2464,6 +2483,21 @@
return updateDone;
}
-
+
+// -----------------------------------------------------------------------------
+// CPECallHandling::ReleaseConference
+// Release conference call
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TInt CPECallHandling::ReleaseConference()
+ {
+ TInt errorCode( ECCPErrorNotFound );
+
+ if ( iConferenceCall )
+ {
+ errorCode = iConferenceCall->HangUp();
+ }
+ return errorCode;
+ }
// End of File