53 #include <MediatorDomainUIDs.h> |
53 #include <MediatorDomainUIDs.h> |
54 #include <videotelcontrolmediatorapi.h> |
54 #include <videotelcontrolmediatorapi.h> |
55 #include <textresolver.h> |
55 #include <textresolver.h> |
56 #include <phoneappvoipcommands.hrh> |
56 #include <phoneappvoipcommands.hrh> |
57 #include <hwrmdomainpskeys.h> |
57 #include <hwrmdomainpskeys.h> |
|
58 #include <hal.h> |
58 |
59 |
59 #include "phoneui.pan" |
60 #include "phoneui.pan" |
60 #include "cphonestate.h" |
61 #include "cphonestate.h" |
61 #include "mphonestatemachine.h" |
62 #include "mphonestatemachine.h" |
62 #include "mphoneviewcommandhandle.h" |
63 #include "mphoneviewcommandhandle.h" |
255 HandleShowImeiL(); |
256 HandleShowImeiL(); |
256 break; |
257 break; |
257 |
258 |
258 case MEngineMonitor::EPEMessageCallSecureStatusChanged: |
259 case MEngineMonitor::EPEMessageCallSecureStatusChanged: |
259 HandleCallSecureStatusChangeL( aCallId ); |
260 HandleCallSecureStatusChangeL( aCallId ); |
260 |
261 ForwardPEMessageToPhoneCustomizationL( aMessage, aCallId ); |
261 if ( iCustomization ) |
|
262 { |
|
263 iCustomization->HandlePhoneEngineMessageL( aMessage, |
|
264 aCallId ); |
|
265 } |
|
266 break; |
262 break; |
267 |
263 |
268 case MEngineMonitor::EPEMessageActivateWarrantyMode: |
264 case MEngineMonitor::EPEMessageActivateWarrantyMode: |
269 // Stop playing DTMF tone |
265 // Stop playing DTMF tone |
270 iStateMachine->SendPhoneEngineMessage( MPEPhoneModel::EPEMessageEndDTMF ); |
266 iStateMachine->SendPhoneEngineMessage( MPEPhoneModel::EPEMessageEndDTMF ); |
378 |
374 |
379 default: |
375 default: |
380 |
376 |
381 TBool handled( EFalse ); |
377 TBool handled( EFalse ); |
382 |
378 |
383 if ( iCustomization ) |
379 handled = ForwardPEMessageToPhoneCustomizationL( aMessage, aCallId ); |
384 { |
|
385 handled = iCustomization->HandlePhoneEngineMessageL( |
|
386 aMessage, aCallId ); |
|
387 } |
|
388 |
380 |
389 if ( EFalse == handled ) |
381 if ( EFalse == handled ) |
390 { |
382 { |
391 MPhoneMediatorMessage* mediatorMessage = CPhoneMediatorFactory::Instance()->MediatorMessage( aMessage, aCallId ); |
383 MPhoneMediatorMessage* mediatorMessage = CPhoneMediatorFactory::Instance()->MediatorMessage( aMessage, aCallId ); |
392 if( mediatorMessage ) |
384 if( mediatorMessage ) |
841 // (other items were commented in a header). |
833 // (other items were commented in a header). |
842 // ----------------------------------------------------------- |
834 // ----------------------------------------------------------- |
843 void CPhoneState::HandleChangedCallDurationL( TInt aCallId ) |
835 void CPhoneState::HandleChangedCallDurationL( TInt aCallId ) |
844 { |
836 { |
845 __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::HandleChangedCallDurationL() "); |
837 __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::HandleChangedCallDurationL() "); |
846 // Get the call duration |
838 |
847 TTime time( 0 ); |
839 TInt ret = KErrNone; |
848 TTimeIntervalSeconds timeInterval = |
840 TInt isDisplayOn; |
849 iStateMachine->PhoneEngineInfo()->CallDuration( aCallId ); |
841 |
850 time += timeInterval; |
842 ret = HAL::Get( HALData::EDisplayState, isDisplayOn ); |
851 |
843 |
852 // Read format string from AVKON resource |
844 // Update only if the display is on or if HAL::Get returns an error, |
853 TBuf<KPhoneMaxCharsInNote> timeDurationFormatString( KNullDesC ); |
845 // in which case display value cannot be trusted. |
854 LoadResource( timeDurationFormatString, EPhoneCallDurationFormatString ); |
846 if ( ret || isDisplayOn ) |
855 |
847 { |
856 // Format the time |
848 // Get the call duration |
857 TBuf<KPhoneMaxTimeDisplayTextLength> timeString( KNullDesC ); |
849 TTime time( 0 ); |
858 time.FormatL( timeString, timeDurationFormatString ); |
850 TTimeIntervalSeconds timeInterval = |
859 |
851 iStateMachine->PhoneEngineInfo()->CallDuration( aCallId ); |
860 // Localize time format |
852 time += timeInterval; |
861 AknTextUtils::LanguageSpecificNumberConversion( timeString ); |
853 |
862 |
854 // Read format string from AVKON resource |
863 // update the call header call duration |
855 TBuf<KPhoneMaxCharsInNote> timeDurationFormatString( KNullDesC ); |
864 iViewCommandHandle->ExecuteCommandL( |
856 LoadResource( timeDurationFormatString, EPhoneCallDurationFormatString ); |
865 EPhoneViewUpdateCallHeaderCallDuration, |
857 |
866 aCallId, |
858 // Format the time |
867 timeString ); |
859 TBuf<KPhoneMaxTimeDisplayTextLength> timeString( KNullDesC ); |
|
860 time.FormatL( timeString, timeDurationFormatString ); |
|
861 |
|
862 // Localize time format |
|
863 AknTextUtils::LanguageSpecificNumberConversion( timeString ); |
|
864 |
|
865 // update the call header call duration |
|
866 iViewCommandHandle->ExecuteCommandL( |
|
867 EPhoneViewUpdateCallHeaderCallDuration, |
|
868 aCallId, |
|
869 timeString ); |
|
870 } |
868 } |
871 } |
869 |
872 |
870 // ----------------------------------------------------------------------------- |
873 // ----------------------------------------------------------------------------- |
871 // CPhoneState::HandleRemoteBusyL |
874 // CPhoneState::HandleRemoteBusyL |
872 // ----------------------------------------------------------------------------- |
875 // ----------------------------------------------------------------------------- |
4722 { |
4725 { |
4723 if ( FeatureManager::FeatureSupported( KFeatureIdTouchCallHandling ) ) |
4726 if ( FeatureManager::FeatureSupported( KFeatureIdTouchCallHandling ) ) |
4724 { |
4727 { |
4725 TPhoneCmdParamInteger integerParam; |
4728 TPhoneCmdParamInteger integerParam; |
4726 integerParam.SetInteger( EPhoneInCallCmdActivateIhf ); |
4729 integerParam.SetInteger( EPhoneInCallCmdActivateIhf ); |
4727 TRAP_IGNORE( iViewCommandHandle->ExecuteCommandL( |
4730 iViewCommandHandle->ExecuteCommand( |
4728 EPhoneViewEnableToolbarButton, &integerParam )); |
4731 EPhoneViewEnableToolbarButton, &integerParam ); |
4729 } |
4732 } |
4730 } |
4733 } |
4731 |
4734 |
4732 // --------------------------------------------------------- |
4735 // --------------------------------------------------------- |
4733 // CPhoneState::HandleEasyDialingCommandsL |
4736 // CPhoneState::HandleEasyDialingCommandsL |
4776 default: |
4779 default: |
4777 break; |
4780 break; |
4778 } |
4781 } |
4779 } |
4782 } |
4780 |
4783 |
|
4784 // ----------------------------------------------------------- |
|
4785 // CPhoneState::ForwardPEMessageToPhoneCustomizationL |
|
4786 // Forward Phone Engine messages to Phone customization |
|
4787 // (other items were commented in a header). |
|
4788 // ----------------------------------------------------------- |
|
4789 // |
|
4790 EXPORT_C TBool CPhoneState::ForwardPEMessageToPhoneCustomizationL( |
|
4791 const TInt aMessage, |
|
4792 TInt aCallId ) |
|
4793 { |
|
4794 __LOGMETHODSTARTEND( EPhoneControl, "CPhoneState::ForwardPEMessageToPhoneCustomizationL() " ); |
|
4795 TBool handled = EFalse; |
|
4796 |
|
4797 if ( iCustomization ) |
|
4798 { |
|
4799 handled = iCustomization->HandlePhoneEngineMessageL( aMessage, aCallId ); |
|
4800 } |
|
4801 return handled; |
|
4802 } |
|
4803 |
4781 // End of File |
4804 // End of File |
4782 |
4805 |