100 #include "cphonecontinueemergencycallcommand.h" |
100 #include "cphonecontinueemergencycallcommand.h" |
101 #include "cphonecallheadermanager.h" |
101 #include "cphonecallheadermanager.h" |
102 #include "cphonenumberentrymanager.h" |
102 #include "cphonenumberentrymanager.h" |
103 #include "tphonecmdparamsfidata.h" |
103 #include "tphonecmdparamsfidata.h" |
104 #include "mphonestorage.h" |
104 #include "mphonestorage.h" |
|
105 #include "phoneconstants.h" |
|
106 #include "cphoneclearblacklist.h" |
105 |
107 |
106 // ================= MEMBER FUNCTIONS ======================= |
108 // ================= MEMBER FUNCTIONS ======================= |
107 |
109 |
108 EXPORT_C CPhoneState::CPhoneState( |
110 EXPORT_C CPhoneState::CPhoneState( |
109 MPhoneStateMachine* aStateMachine, |
111 MPhoneStateMachine* aStateMachine, |
878 |
883 |
879 iViewCommandHandle->ExecuteCommandL( EPhoneViewStopRingTone ); |
884 iViewCommandHandle->ExecuteCommandL( EPhoneViewStopRingTone ); |
880 |
885 |
881 iViewCommandHandle->ExecuteCommandL( EPhoneViewUpdateBubble, aCallId, |
886 iViewCommandHandle->ExecuteCommandL( EPhoneViewUpdateBubble, aCallId, |
882 &callHeaderParam ); |
887 &callHeaderParam ); |
|
888 |
|
889 CPhoneClearBlacklist::Instance()->ClearBlackListOnNextKey(); |
883 } |
890 } |
884 |
891 |
885 // ----------------------------------------------------------- |
892 // ----------------------------------------------------------- |
886 // CPhoneState::IsCustomizedDialerVisibleL() |
893 // CPhoneState::IsCustomizedDialerVisibleL() |
887 // ----------------------------------------------------------- |
894 // ----------------------------------------------------------- |
1136 // Get the number entry contents, if it exists |
1143 // Get the number entry contents, if it exists |
1137 if ( IsNumberEntryUsedL() ) |
1144 if ( IsNumberEntryUsedL() ) |
1138 { |
1145 { |
1139 HBufC* phoneNumber = PhoneNumberFromEntryLC(); |
1146 HBufC* phoneNumber = PhoneNumberFromEntryLC(); |
1140 // Save the phone number |
1147 // Save the phone number |
1141 __PHONELOG1( EBasic, EPhoneControl, "SetPhoneNumber: %S ", phoneNumber->Des() ); |
1148 __PHONELOG1( EBasic, EPhoneControl, "SetPhoneNumber: %S ", phoneNumber ); |
1142 iStateMachine->PhoneEngineInfo()->SetPhoneNumber( *phoneNumber ); |
1149 iStateMachine->PhoneEngineInfo()->SetPhoneNumber( *phoneNumber ); |
1143 |
1150 |
1144 // Convert key code to western. |
1151 // Convert key code to western. |
1145 TBuf<1> buffer; // one character |
1152 TBuf<1> buffer; // one character |
1146 buffer.Append( aKeyEvent.iCode ); |
1153 buffer.Append( aKeyEvent.iCode ); |
2846 // ----------------------------------------------------------- |
2853 // ----------------------------------------------------------- |
2847 // |
2854 // |
2848 void CPhoneState::HandleShowImeiL() |
2855 void CPhoneState::HandleShowImeiL() |
2849 { |
2856 { |
2850 __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::HandleShowImeiL( ) "); |
2857 __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::HandleShowImeiL( ) "); |
2851 |
2858 |
2852 if ( IsOnScreenDialerSupported() ) |
|
2853 { |
|
2854 NumberEntryClearL(); |
|
2855 } |
|
2856 else |
|
2857 { |
|
2858 // Remove number entry from screen |
|
2859 iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveNumberEntry ); |
|
2860 } |
|
2861 |
|
2862 // Fetch IMEI |
2859 // Fetch IMEI |
2863 TBuf<RMobilePhone::KPhoneSerialNumberSize> serialNumber; |
2860 TBuf<RMobilePhone::KPhoneSerialNumberSize> serialNumber; |
2864 TPEPhoneIdentityParameters phoneIdentityParameters = iStateMachine-> |
2861 TPEPhoneIdentityParameters phoneIdentityParameters = |
2865 PhoneEngineInfo()->PhoneIdentityParameters(); |
2862 iStateMachine->PhoneEngineInfo()->PhoneIdentityParameters(); |
2866 serialNumber = phoneIdentityParameters.iSerialNumber; |
2863 serialNumber = phoneIdentityParameters.iSerialNumber; |
2867 |
2864 |
2868 // Add it to the resource string |
2865 HBufC* imeiNoteText = StringLoader::LoadLC( |
2869 HBufC* buf = StringLoader::LoadLC( |
|
2870 CPhoneMainResourceResolver::Instance()-> |
2866 CPhoneMainResourceResolver::Instance()-> |
2871 ResolveResourceID( |
2867 ResolveResourceID( |
2872 EPhonePhoneImeiString ), serialNumber ); |
2868 EPhonePhoneImeiString ), serialNumber ); |
2873 |
2869 |
2874 TPhoneCmdParamNote noteParam; |
2870 TPhoneCmdParamGlobalNote noteParam; |
2875 noteParam.SetType( EPhoneNoteCustom ); |
2871 noteParam.SetType( EAknGlobalInformationNote ); |
2876 noteParam.SetResourceId( CPhoneMainResourceResolver::Instance()-> |
2872 noteParam.SetTone( EAvkonSIDInformationTone ); |
2877 ResolveResourceID( EPhoneInformationWaitNote ) ); |
2873 noteParam.SetText( *imeiNoteText ); |
2878 noteParam.SetText( *buf ); |
2874 noteParam.SetTimeout( KPhoneNoteNoTimeout ); |
2879 |
2875 |
2880 // Display note |
2876 iViewCommandHandle->ExecuteCommandL( |
2881 iViewCommandHandle->ExecuteCommandL( EPhoneViewShowNote, ¬eParam ); |
2877 EPhoneViewShowGlobalNote, |
2882 |
2878 ¬eParam ); |
2883 CleanupStack::PopAndDestroy( buf ); |
2879 |
|
2880 CleanupStack::PopAndDestroy( imeiNoteText ); |
2884 } |
2881 } |
2885 |
2882 |
2886 // ----------------------------------------------------------- |
2883 // ----------------------------------------------------------- |
2887 // CPhoneState::HandleCallSecureStatusChangeL |
2884 // CPhoneState::HandleCallSecureStatusChangeL |
2888 // ----------------------------------------------------------- |
2885 // ----------------------------------------------------------- |
2916 // ----------------------------------------------------------- |
2913 // ----------------------------------------------------------- |
2917 // |
2914 // |
2918 void CPhoneState::HandleShowLifeTimerL() |
2915 void CPhoneState::HandleShowLifeTimerL() |
2919 { |
2916 { |
2920 __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::HandleShowLifeTimerL( ) "); |
2917 __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::HandleShowLifeTimerL( ) "); |
2921 if ( IsOnScreenDialerSupported() ) |
2918 |
2922 { |
|
2923 NumberEntryClearL(); |
|
2924 } |
|
2925 else |
|
2926 { |
|
2927 // Remove number entry from screen |
|
2928 iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveNumberEntry ); |
|
2929 } |
|
2930 |
|
2931 // Fetch LifeTime |
2919 // Fetch LifeTime |
2932 TPELifeTimeData lifeTimeData = iStateMachine-> |
2920 TPELifeTimeData lifeTimeData = |
2933 PhoneEngineInfo()->LifeTimerData(); |
2921 iStateMachine->PhoneEngineInfo()->LifeTimerData(); |
2934 |
2922 |
2935 TLocale locale; |
2923 TLocale locale; |
2936 TBuf<KTimerTextLength> lifetimerText; |
2924 TBuf<KTimerTextLength> lifetimerText; |
2937 lifetimerText.NumFixedWidth( |
2925 lifetimerText.NumFixedWidth( |
2938 lifeTimeData.iHours, |
2926 lifeTimeData.iHours, |
2939 EDecimal, |
2927 EDecimal, |
2940 KPhoneLifeTimerHoursLength ); |
2928 KPhoneLifeTimerHoursLength ); |
2941 |
2929 |
2942 lifetimerText.Append(locale.TimeSeparator( KTimerMinuteSeparator ) ); // minute seperator |
2930 lifetimerText.Append(locale.TimeSeparator( KTimerMinuteSeparator ) ); |
2943 |
2931 |
2944 TBuf<KPhoneLifeTimerMinutesLength> mins; |
2932 TBuf<KPhoneLifeTimerMinutesLength> mins; |
2945 mins.NumFixedWidth( |
2933 mins.NumFixedWidth( |
2946 lifeTimeData.iMinutes, |
2934 lifeTimeData.iMinutes, |
2947 EDecimal, |
2935 EDecimal, |
2948 KPhoneLifeTimerMinutesLength ); |
2936 KPhoneLifeTimerMinutesLength ); |
2949 |
2937 |
2950 lifetimerText.Append(mins); |
2938 lifetimerText.Append(mins); |
2951 |
2939 |
2952 // Add it to the resource string |
|
2953 HBufC* buf = StringLoader::LoadLC( |
2940 HBufC* buf = StringLoader::LoadLC( |
2954 CPhoneMainResourceResolver::Instance()-> |
2941 CPhoneMainResourceResolver::Instance()-> |
2955 ResolveResourceID( |
2942 ResolveResourceID( |
2956 EPhoneLifeTimeFormat ), lifetimerText ); |
2943 EPhoneLifeTimeFormat ), lifetimerText ); |
2957 TPhoneCmdParamNote noteParam; |
2944 |
2958 noteParam.SetType( EPhoneNoteCustom ); |
2945 TPhoneCmdParamGlobalNote noteParam; |
2959 noteParam.SetResourceId( CPhoneMainResourceResolver::Instance()-> |
2946 noteParam.SetType( EAknGlobalInformationNote ); |
2960 ResolveResourceID( EPhoneInformationWaitNote ) ); |
2947 noteParam.SetTone( EAvkonSIDInformationTone ); |
2961 noteParam.SetText( *buf ); |
2948 noteParam.SetText( *buf ); |
2962 |
2949 noteParam.SetTimeout( KPhoneNoteNoTimeout ); |
2963 // Display note |
2950 |
2964 iViewCommandHandle->ExecuteCommandL( EPhoneViewShowNote, ¬eParam ); |
2951 iViewCommandHandle->ExecuteCommandL( |
2965 |
2952 EPhoneViewShowGlobalNote, |
|
2953 ¬eParam ); |
|
2954 |
2966 CleanupStack::PopAndDestroy( buf ); |
2955 CleanupStack::PopAndDestroy( buf ); |
2967 } |
2956 } |
2968 |
2957 |
2969 // --------------------------------------------------------- |
2958 // --------------------------------------------------------- |
2970 // CPhoneState::IsVideoCall |
2959 // CPhoneState::IsVideoCall |