23 // INCLUDES |
23 // INCLUDES |
24 #include <w32std.h> |
24 #include <w32std.h> |
25 #include <remconcoreapitargetobserver.h> |
25 #include <remconcoreapitargetobserver.h> |
26 #include <MProfileEngine.h> |
26 #include <MProfileEngine.h> |
27 #include <bmbubblemanager.h> |
27 #include <bmbubblemanager.h> |
28 #include <eikenv.h> |
|
29 |
28 |
30 #include "mphonestate.h" |
29 #include "mphonestate.h" |
31 #include "mphoneviewcommandhandle.h" |
30 #include "mphoneviewcommandhandle.h" |
32 #include "cphonecbamanager.h" |
31 #include "cphonecbamanager.h" |
33 #include "tphonecmdparamtranseffect.h" |
|
34 #include "tphonetransitionhandler.h" |
|
35 |
32 |
36 // FORWARD DECLARATIONS |
33 // FORWARD DECLARATIONS |
37 class MPhoneState; |
34 class MPhoneState; |
38 class MPhoneStateMachine; |
35 class MPhoneStateMachine; |
39 class CPhoneCallHeaderManager; |
36 class CPhoneCallHeaderManager; |
40 class TPhoneTransitionHandler; |
|
41 class CPhoneTimer; |
37 class CPhoneTimer; |
42 class TPhoneCmdParamCallHeaderData; |
38 class TPhoneCmdParamCallHeaderData; |
43 class MPhoneCustomization; |
39 class MPhoneCustomization; |
44 class CPhoneNumberEntryManager; |
40 class CPhoneNumberEntryManager; |
|
41 |
|
42 enum TStateTransEffectType |
|
43 { |
|
44 ENoneType, |
|
45 ECallUiAppear, |
|
46 ECallUiDisappear, |
|
47 // These effect types can be used only when NE is opened/closed |
|
48 // when some other app than phone is visible on the foreground/ |
|
49 // background. |
|
50 // These cannot be used for internal transitions (=call ui<->dialer). |
|
51 ENumberEntryOpen, |
|
52 ENumberEntryClose, |
|
53 ENumberEntryCreate |
|
54 }; |
45 |
55 |
46 // CLASS DECLARATION |
56 // CLASS DECLARATION |
47 |
57 |
48 /** |
58 /** |
49 * An abstract class for an object implementing the state. |
59 * An abstract class for an object implementing the state. |
222 IMPORT_C virtual TBool HandleRemConCommandL( |
232 IMPORT_C virtual TBool HandleRemConCommandL( |
223 TRemConCoreApiOperationId aOperationId, |
233 TRemConCoreApiOperationId aOperationId, |
224 TRemConCoreApiButtonAction aButtonAct); |
234 TRemConCoreApiButtonAction aButtonAct); |
225 |
235 |
226 /** |
236 /** |
|
237 * Setter for divert indication showing in bubble. |
|
238 * @param aDivertIndication ETrue to show divert indication, |
|
239 * EFalse to not. Usually setting EFalse isn't necessary |
|
240 * as it's a default value in bubble creation. |
|
241 */ |
|
242 IMPORT_C virtual void SetDivertIndication( |
|
243 const TBool aDivertIndication ); |
|
244 |
|
245 /** |
227 * Handles Long hash key press |
246 * Handles Long hash key press |
228 */ |
247 */ |
229 IMPORT_C void HandleLongHashL(); |
248 IMPORT_C void HandleLongHashL(); |
|
249 |
|
250 /** |
|
251 * Informs view to start Transition effect if effect |
|
252 * type is feasible for current state. |
|
253 * @param aType a transition effect, default none |
|
254 * EndTransEffect() must be called when update is done. |
|
255 */ |
|
256 IMPORT_C void BeginTransEffectLC( TStateTransEffectType aType = ENoneType ); |
|
257 |
|
258 /** |
|
259 * Informs view to complete Transition effect |
|
260 */ |
|
261 IMPORT_C void EndTransEffect(); |
|
262 |
230 /** |
263 /** |
231 * Checks whether customized dialer view is active, |
264 * Checks whether customized dialer view is active, |
232 * @return ETrue if customized dialer is active |
265 * @return ETrue if customized dialer is active |
233 */ |
266 */ |
234 IMPORT_C TBool IsCustomizedDialerVisibleL() const; |
267 IMPORT_C TBool IsCustomizedDialerVisibleL() const; |
309 /** |
342 /** |
310 * At moment does nothing in CPhoneState, only causes function call |
343 * At moment does nothing in CPhoneState, only causes function call |
311 * to inherinting classes. |
344 * to inherinting classes. |
312 */ |
345 */ |
313 IMPORT_C virtual void DoStateSpecificCallSetUpDefinitionsL(); |
346 IMPORT_C virtual void DoStateSpecificCallSetUpDefinitionsL(); |
314 |
|
315 /** |
|
316 * Getter for CEikonEnv to avoid use of static system calls |
|
317 * @return CEikonEnv handle |
|
318 */ |
|
319 IMPORT_C CEikonEnv* EikonEnv() const; |
|
320 |
|
321 /** |
|
322 * Setter for CEikonEnv to avoid use of static system calls |
|
323 * @param CEikonEnv handle |
|
324 */ |
|
325 IMPORT_C virtual void SetEikonEnv( CEikonEnv* aEnv ); |
|
326 |
|
327 /** |
|
328 * Getter for TPhoneTransitionHandler instance. |
|
329 * @return TPhoneTransitionHandler handle |
|
330 */ |
|
331 IMPORT_C TPhoneTransitionHandler& TransitionHandlerL(); |
|
332 |
347 |
333 public: // NumberEntry functions. |
348 public: // NumberEntry functions. |
334 |
349 |
335 /** |
350 /** |
336 * Passes create number entry command forward if NE can be created. |
351 * Passes create number entry command forward if NE can be created. |
615 * Handles situation when hash key has been kept down long |
630 * Handles situation when hash key has been kept down long |
616 * (long keypress) and the hash character is the only character |
631 * (long keypress) and the hash character is the only character |
617 * in number entry. |
632 * in number entry. |
618 */ |
633 */ |
619 IMPORT_C virtual void OnlyHashInNumberEntryL(); |
634 IMPORT_C virtual void OnlyHashInNumberEntryL(); |
620 |
635 |
|
636 /** |
|
637 * Informs view that UI is being updated (call bubble or number editor). |
|
638 * EndUiUpdate() must be called when update is done. |
|
639 */ |
|
640 IMPORT_C void BeginUiUpdateLC(); |
|
641 |
|
642 /** |
|
643 * Informs view that UI update is completed. |
|
644 */ |
|
645 IMPORT_C void EndUiUpdate(); |
|
646 |
621 /* |
647 /* |
622 * Checks if necessary to show call termination note |
648 * Checks if necessary to show call termination note |
623 * |
649 * |
624 * @param aCallId call id |
650 * @param aCallId call id |
625 * @return true if note should be shown |
651 * @return true if note should be shown |
717 /** |
743 /** |
718 * Sets up all call setup to display. |
744 * Sets up all call setup to display. |
719 * @param aCallId - call id to set up |
745 * @param aCallId - call id to set up |
720 */ |
746 */ |
721 IMPORT_C void DisplayCallSetupL( TInt aCallId ); |
747 IMPORT_C void DisplayCallSetupL( TInt aCallId ); |
722 |
|
723 /** |
|
724 * Sets the flag wether the foreground application |
|
725 * needs to be brought foreground after the phone |
|
726 * goes idle |
|
727 */ |
|
728 IMPORT_C void SetNeedToReturnToForegroundAppStatusL( |
|
729 TBool aNeedToReturn ); |
|
730 |
748 |
731 protected: // NumberEntry functions. |
749 protected: // NumberEntry functions. |
732 |
750 |
733 /** |
751 /** |
734 * Set Number Entry visibility. |
752 * Set Number Entry visibility. |
787 * Informs phoneengine that phone number has been edited i.e. phonenumber parser is run |
805 * Informs phoneengine that phone number has been edited i.e. phonenumber parser is run |
788 */ |
806 */ |
789 IMPORT_C virtual void HandleNumberEntryEdited(); |
807 IMPORT_C virtual void HandleNumberEntryEdited(); |
790 |
808 |
791 /** |
809 /** |
792 * Returns ETrue if alphanumeric characters are supported. |
810 * Returns ETrue if alphanumeric characters are supported. |
793 * @param aKeyEvent Key event. |
811 * @param aKeyEvent Key event. |
794 * @return ETrue if alphanumeric chars are supported. |
812 * @return ETrue if alphanumeric chars are supported. |
795 */ |
813 */ |
796 IMPORT_C TBool IsAlphanumericSupportedAndCharInput( |
814 IMPORT_C TBool IsAlphanumericSupportedAndCharInput( |
797 const TKeyEvent& aKeyEvent ); |
815 const TKeyEvent& aKeyEvent ); |
798 |
816 |
799 /** |
817 /** |
800 * Handle state-specific behaviour when number entry is cleared |
818 * Handle state-specific behaviour when number entry is cleared |
801 */ |
819 */ |
802 IMPORT_C virtual void HandleNumberEntryClearedL(); |
820 IMPORT_C virtual void HandleNumberEntryClearedL(); |
803 |
821 |
804 /** |
822 /** |
805 * Internal number entry handling methods. |
823 * Internal number entry handling methods. |
806 */ |
824 */ |
807 void NumberEntryClearL(); |
825 void NumberEntryClearL(); |
808 |
826 |
809 |
827 /** |
810 /** |
828 * Dims silence touch button if call is not alerting. |
811 * Dims silence touch button if call is not alerting. |
829 * @param None |
812 * @param None |
830 */ |
813 */ |
831 IMPORT_C void UpdateSilenceButtonDimming(); |
814 IMPORT_C void UpdateSilenceButtonDimming(); |
832 |
815 |
833 /** |
816 /** |
834 * Sets toolbar dimming. |
817 * Sets toolbar dimming. |
835 * @param aDimmed ETrue if dimmed |
818 * @param aDimmed ETrue if dimmed |
836 */ |
819 */ |
837 IMPORT_C void SetToolbarDimming( TBool aDimmed ); |
820 IMPORT_C void SetToolbarDimming( TBool aDimmed ); |
838 |
821 |
839 /** |
822 /** |
840 * Sets toolbar loudspeaker button enabled. |
823 * Sets toolbar loudspeaker button enabled. |
841 */ |
824 */ |
842 IMPORT_C void SetToolbarButtonLoudspeakerEnabled(); |
825 IMPORT_C void SetToolbarButtonLoudspeakerEnabled(); |
843 |
826 |
844 /** |
827 /** |
845 * Sets toolbar handset button enabled. |
828 * Sets toolbar handset button enabled. |
846 */ |
829 */ |
847 IMPORT_C void SetToolbarButtonHandsetEnabled(); |
830 IMPORT_C void SetToolbarButtonHandsetEnabled(); |
848 |
831 |
849 /** |
832 /** |
850 * Enables global notifiers. |
833 * Sets Bluetooth handsfree button enabled. |
851 */ |
834 */ |
852 IMPORT_C void EnableGlobalNotifiersL(); |
835 IMPORT_C void SetToolbarButtonBTHFEnabled(); |
853 |
836 |
854 /** |
|
855 * Disables global notifiers. |
|
856 */ |
|
857 IMPORT_C void DisableGlobalNotifiersL(); |
|
858 |
|
859 /** |
|
860 * Enables Eikon notifiers. |
|
861 */ |
|
862 IMPORT_C void EnableEikonNotifiersL(); |
|
863 |
|
864 /** |
|
865 * Disables Eikon notifiers. |
|
866 */ |
|
867 IMPORT_C void DisableEikonNotifiersL(); |
|
868 |
837 protected: |
869 protected: |
838 |
870 |
839 /** |
871 /** |
840 * Returns updated remote information data. |
872 * Returns updated remote information data. |
841 * NOTE: This metohed is used when state receives |
873 * NOTE: This metohed is used when state receives |
998 */ |
1035 */ |
999 void CreateCallerInfoL( const TInt aCallId, |
1036 void CreateCallerInfoL( const TInt aCallId, |
1000 TPhoneCmdParamCallHeaderData* aCallHeaderData ); |
1037 TPhoneCmdParamCallHeaderData* aCallHeaderData ); |
1001 |
1038 |
1002 /** |
1039 /** |
|
1040 * TCleanupOperation to call EndUiUpdate(), if leave occurs |
|
1041 * after BeginUiUpdate(). |
|
1042 */ |
|
1043 static void UiUpdateCleanup(TAny* aThis ); |
|
1044 |
|
1045 /** |
|
1046 * TCleanupOperation to call EndTransEffect, if leave occurs |
|
1047 * after BeginTransEffect(). |
|
1048 */ |
|
1049 static void EffectCleanup(TAny* aThis ); |
|
1050 |
|
1051 /** |
1003 * Gets volume level from ui control. |
1052 * Gets volume level from ui control. |
1004 */ |
1053 */ |
1005 TInt GetVolumeLevel(); |
1054 TInt GetVolumeLevel(); |
1006 |
1055 |
1007 /** |
1056 /** |
1145 */ |
1194 */ |
1146 CPhoneTimer* iAlsLineChangeKeyPressTimer; |
1195 CPhoneTimer* iAlsLineChangeKeyPressTimer; |
1147 |
1196 |
1148 // Internal variable for EikonEnv to avoid |
1197 // Internal variable for EikonEnv to avoid |
1149 // use of static system calls |
1198 // use of static system calls |
1150 CEikonEnv* iEnv; // Not owned |
1199 CEikonEnv& iEnv; |
1151 |
1200 |
1152 // Call header manager. |
1201 // Call header manager. |
1153 CPhoneCallHeaderManager* iCallHeaderManager; |
1202 CPhoneCallHeaderManager* iCallHeaderManager; |
1154 |
|
1155 // Call header manager. |
|
1156 TPhoneTransitionHandler* iTransitionHandler; |
|
1157 |
1203 |
1158 // Number entry manager |
1204 // Number entry manager |
1159 CPhoneNumberEntryManager* iNumberEntryManager; |
1205 CPhoneNumberEntryManager* iNumberEntryManager; |
1160 |
1206 |
1161 // RingtoneSilenced flag. |
1207 // RingtoneSilenced flag. |