diff -r 41a7f70b3818 -r 5266b1f337bd phoneengine/engineinfo/src/cpeengineinfoimpl.cpp --- a/phoneengine/engineinfo/src/cpeengineinfoimpl.cpp Tue Aug 31 15:14:29 2010 +0300 +++ b/phoneengine/engineinfo/src/cpeengineinfoimpl.cpp Wed Sep 01 12:30:10 2010 +0100 @@ -22,7 +22,7 @@ #include #include #include -#include +#include #include // ================= MEMBER FUNCTIONS ========================================== @@ -35,7 +35,6 @@ // CPEEngineInfoImpl::CPEEngineInfoImpl() : iCurrentCalls( KPEMaximumNumberOfCalls ) - ,iContactId( KErrNotFound ) { iCallCommandInfo.iPhoneNumber = KNullDesC; iCallCommandInfo.iCallId = 0; @@ -45,6 +44,12 @@ iCallCommandInfo.iDtmfString = KNullDesC; iCallCommandInfo.iCallType = EPECallTypeUninitialized; iCallCommandInfo.iServiceId = 0; + iCallCommandInfo.iIdRestrict = RMobileCall::EIdRestrictDefault; + iCallCommandInfo.iEmergencyNumber = KNullDesC; + iCallCommandInfo.iTransferToAddress = KNullDesC; + iCallCommandInfo.iForwardToAddressIndex = ECCPErrorNotFound; + iCallCommandInfo.iTransferDial = EFalse; + iBasicInfo.iAudioOutputPreference = EPSAudioPrivate; iBasicInfo.iALSLine = CCCECallParameters::ECCELineTypePrimary; iBasicInfo.iALSLineSupport = EFalse; @@ -57,6 +62,10 @@ iBasicInfo.iErrorInfo.iCallId = KPECallIdNotUsed; iBasicInfo.iProfileId = ECCPErrorNotFound; iBasicInfo.iProfileName = KNullDesC; + iBasicInfo.iPhoneIdentityParameters.iManufacturer = KNullDesC; + iBasicInfo.iPhoneIdentityParameters.iModel = KNullDesC; + iBasicInfo.iPhoneIdentityParameters.iRevision = KNullDesC; + iBasicInfo.iPhoneIdentityParameters.iSerialNumber = KNullDesC; iBasicInfo.iLastCallDuration = KPENumberInitValue; iBasicInfo.iVMBXNumbers.iVMBXL1 = KNullDesC; iBasicInfo.iVMBXNumbers.iVMBXL2 = KNullDesC; @@ -64,14 +73,9 @@ iBasicInfo.iTextToSpeech = EFalse; iBasicInfo.iPhoneNumberIsServiceCode = EFalse; iBasicInfo.iTwoDigitSupportStatus = EFalse; - + iBasicInfo.iLifeTimeData.iHours = 0; + iBasicInfo.iLifeTimeData.iMinutes = 0; iBasicInfo.iNetworkRegistrationStatus = ENWStatusRegistrationUnknown; - - iCallCommandInfo.iIdRestrict = RMobileCall::EIdRestrictDefault; - iCallCommandInfo.iEmergencyNumber = KNullDesC; - - iCallCommandInfo.iTransferToAddress = KNullDesC; - iCallCommandInfo.iForwardToAddressIndex = ECCPErrorNotFound; iBasicInfo.iActiveForward.iActiveType = RMobilePhone::ECFUnconditionalActive; iBasicInfo.iActiveForward.iServiceGroup = RMobilePhone::EServiceUnspecified; iBasicInfo.iBarringInfo.iGroupCount = KPENumberInitValue; @@ -93,10 +97,8 @@ iBasicInfo.iSecureSpecified = ETrue; iBasicInfo.iDataPortName = KNullDesC; iBasicInfo.iSwitchToOngoing = EFalse; + iBasicInfo.iCallBackAddress = KNullDesC; iConferenceCallInfo.iConferenceCallState = EPEStateConferenceIdle; - iBasicInfo.iOutgoingBarringActivated = EFalse; - //TODO remove after profile information is available - iBasicInfo.iRingingVolume = 10; } // ----------------------------------------------------------------------------- @@ -562,6 +564,17 @@ } // ----------------------------------------------------------------------------- +// CPEEngineInfoImpl::LifeTimerData +// Gets lifetimerdata from the TPEBasicInfo structure. +// (other items were commented in a header). +// ----------------------------------------------------------------------------- +// +const TPELifeTimeData& CPEEngineInfoImpl::LifeTimerData() const + { + return iBasicInfo.iLifeTimeData; + } + +// ----------------------------------------------------------------------------- // CPEEngineInfoImpl::LoggingIndicator // Get logging indicator from TPECallInfo. // (other items were commented in a header). @@ -612,6 +625,16 @@ } // ----------------------------------------------------------------------------- +// CPEEngineInfoImpl::PhoneIdentityParameters +// Gets the phone identity parameters from the TPEBasicInfo structure +// ----------------------------------------------------------------------------- +// +const TPEPhoneIdentityParameters& CPEEngineInfoImpl::PhoneIdentityParameters() const + { + return iBasicInfo.iPhoneIdentityParameters; + } + +// ----------------------------------------------------------------------------- // CPEEngineInfoImpl::PhoneNumber // Return the phone number from the TPECallCommandInfo structure. // ----------------------------------------------------------------------------- @@ -637,10 +660,74 @@ // ----------------------------------------------------------------------------- // const TPECallOrigin& CPEEngineInfoImpl::CallOriginCommand() const + { + return iCallCommandInfo.iCallOrigin; + } + +// ----------------------------------------------------------------------------- +// CPEEngineInfoImpl::SetTransferDial +// Sets flag indicating unattended transfer dial +// ----------------------------------------------------------------------------- +// +void CPEEngineInfoImpl::SetIsTransferDial( TBool aTransferDial ) { - return iCallCommandInfo.iCallOrigin; + iCallCommandInfo.iTransferDial = aTransferDial; + } + +// ----------------------------------------------------------------------------- +// CPEEngineInfoImpl::IsTransferDial +// Gets flag indicating unattended transfer dial +// ----------------------------------------------------------------------------- +// +TBool CPEEngineInfoImpl::IsTransferDial() const + { + return iCallCommandInfo.iTransferDial; + } + +// ----------------------------------------------------------------------------- +// CPEEngineInfoImpl::SetDoCallBackRequest +// Sets flag indicating if unattended transfer call back request is needed +// ----------------------------------------------------------------------------- +// +void CPEEngineInfoImpl::SetDoCallBackRequest( TBool aDoCallBack, TInt aCallId ) + { + __ASSERT_DEBUG( iCurrentCalls.Count() > aCallId, Panic( EPEPanicCallIndexOutOfRange ) ); + iCurrentCalls[ aCallId ]->SetDoCallBackRequest( aDoCallBack ); } - + +// ----------------------------------------------------------------------------- +// CPEEngineInfoImpl::DoCallBackRequest +// Gets flag indicating if unattended transfer call back request is needed +// ----------------------------------------------------------------------------- +// +TBool CPEEngineInfoImpl::DoCallBackRequest( TInt aCallId) const + { + __ASSERT_DEBUG( iCurrentCalls.Count() > aCallId, Panic( EPEPanicCallIndexOutOfRange ) ); + return iCurrentCalls[ aCallId ]->DoCallBackRequest(); + } + +// ----------------------------------------------------------------------------- +// CPEEngineInfoImpl::SetCallBackAddress +// Sets address used for calling back to transfer originator +// in case when transfer call has been failed +// ----------------------------------------------------------------------------- +// +void CPEEngineInfoImpl::SetCallBackAddress( const TDesC& aAddress ) + { + iBasicInfo.iCallBackAddress = aAddress; + } + +// ----------------------------------------------------------------------------- +// CPEEngineInfoImpl::CallBackAddress +// Gets address used for calling back to transfer originator +// in case when transfer call has been failed +// ----------------------------------------------------------------------------- +// +const TDesC& CPEEngineInfoImpl::CallBackAddress() const + { + return iBasicInfo.iCallBackAddress; + } + // CPEEngineInfoImpl::ProfileId // Gets the profile id from the TPEBasicInfo structure. // ----------------------------------------------------------------------------- @@ -1252,7 +1339,7 @@ { iBasicInfo.iLastCallDuration = aCallDuration; } - + // ----------------------------------------------------------------------------- // CPEEngineInfoImpl::SetDtmfPostFix // Sets dtmf postfix value to TPEBasicInfo-structure @@ -1313,6 +1400,18 @@ } // ----------------------------------------------------------------------------- +// CPEEngineInfoImpl::SetLifeTimerData +// Sets lifetimer data of the phone to TPELifeTimeData-structure +// ----------------------------------------------------------------------------- +// +void CPEEngineInfoImpl::SetLifeTimerData( + TCCPLifeTimeDataPckg& aPckg ) + { + iBasicInfo.iLifeTimeData.iHours = aPckg().iHours; + iBasicInfo.iLifeTimeData.iMinutes = aPckg().iMinutes; + } + +// ----------------------------------------------------------------------------- // CPEEngineInfoImpl::SetNetworkRegistrationStatus // Sets network registration status to TPEBasicInfo-structure // ----------------------------------------------------------------------------- @@ -1340,6 +1439,17 @@ } // ----------------------------------------------------------------------------- +// CPEEngineInfoImpl::SetPhoneIdentityParameters +// Sets phone number to TPECallCommandInfo-structure +// ----------------------------------------------------------------------------- +// +void CPEEngineInfoImpl::SetPhoneIdentityParameters( + const TPEPhoneIdentityParameters& aPhoneIdentityParameters ) + { + iBasicInfo.iPhoneIdentityParameters = aPhoneIdentityParameters; + } + +// ----------------------------------------------------------------------------- // CPEEngineInfoImpl::SetPhoneNumberIsServiceCode // Sets phone number parsing result // ----------------------------------------------------------------------------- @@ -1356,9 +1466,9 @@ // ----------------------------------------------------------------------------- // void CPEEngineInfoImpl::SetCallOriginCommand( const TPECallOrigin& aOrigin ) - { - iCallCommandInfo.iCallOrigin = aOrigin; - } + { + iCallCommandInfo.iCallOrigin = aOrigin; + } // ----------------------------------------------------------------------------- // CPEEngineInfoImpl::SetProfileId @@ -2570,74 +2680,4 @@ return stateExists; } -// ----------------------------------------------------------------------------- -// CPEEngineInfoImpl::SetContactId -// ----------------------------------------------------------------------------- -// -void CPEEngineInfoImpl::SetContactId2( const TInt aContactId ) -{ - TEFLOGSTRING2( KTAINT, - "PE CPEEngineInfo::SetContactId: aContactId: %d", aContactId ); - iContactId = aContactId; -} - -// ----------------------------------------------------------------------------- -// CPEEngineInfoImpl::ContactId -// ----------------------------------------------------------------------------- -// -TInt CPEEngineInfoImpl::ContactId2 () const - { - TEFLOGSTRING2( KTAINT, "ContactId: %d", iContactId ); - return iContactId; - } - -// ----------------------------------------------------------------------------- -// CPEEngineInfoImpl::SetProtocolError -// Sets the protocol spesific error code -// ----------------------------------------------------------------------------- -// -void CPEEngineInfoImpl::SetProtocolError( TInt aError, TInt aCallId ) - { - if ( 0<=aCallId && aCallIdSetProtocolError( aError ); - } - } - -// ----------------------------------------------------------------------------- -// CPEEngineInfoImpl::ProtocolError -// Returns the protocol spesific error code -// ----------------------------------------------------------------------------- -// -TInt CPEEngineInfoImpl::ProtocolError( TInt aCallId ) - { - TInt ret( KErrNotFound ); - - if ( 0<=aCallId && aCallIdProtocolError(); - } - - return ret; - } - -// ----------------------------------------------------------------------------- -// CPEEngineInfoImpl::IsOutgoingCallBarringActivated -// ----------------------------------------------------------------------------- -// -TBool CPEEngineInfoImpl::IsOutgoingCallBarringActivated() - { - return iBasicInfo.iOutgoingBarringActivated; - } - -// ----------------------------------------------------------------------------- -// CPEEngineInfoImpl::SetOutgoingCallBarringActivated -// ----------------------------------------------------------------------------- -// -void CPEEngineInfoImpl::SetOutgoingCallBarringActivated( - TBool aActivated ) - { - iBasicInfo.iOutgoingBarringActivated = aActivated; - } - // End of File