28 #include <eikenv.h> |
28 #include <eikenv.h> |
29 |
29 |
30 #include "mphonestate.h" |
30 #include "mphonestate.h" |
31 #include "mphoneviewcommandhandle.h" |
31 #include "mphoneviewcommandhandle.h" |
32 #include "cphonecbamanager.h" |
32 #include "cphonecbamanager.h" |
|
33 #include "tphonecmdparamtranseffect.h" |
|
34 #include "tphonetransitionhandler.h" |
33 |
35 |
34 // FORWARD DECLARATIONS |
36 // FORWARD DECLARATIONS |
35 class MPhoneState; |
37 class MPhoneState; |
36 class MPhoneStateMachine; |
38 class MPhoneStateMachine; |
37 class CPhoneCallHeaderManager; |
39 class CPhoneCallHeaderManager; |
|
40 class TPhoneTransitionHandler; |
38 class CPhoneTimer; |
41 class CPhoneTimer; |
39 class TPhoneCmdParamCallHeaderData; |
42 class TPhoneCmdParamCallHeaderData; |
40 class MPhoneCustomization; |
43 class MPhoneCustomization; |
41 class CPhoneNumberEntryManager; |
44 class CPhoneNumberEntryManager; |
42 |
|
43 enum TStateTransEffectType |
|
44 { |
|
45 ENoneType, |
|
46 ECallUiAppear, |
|
47 ECallUiDisappear, |
|
48 // These effect types can be used only when NE is opened/closed |
|
49 // when some other app than phone is visible on the foreground/ |
|
50 // background. |
|
51 // These cannot be used for internal transitions (=call ui<->dialer). |
|
52 ENumberEntryOpen, |
|
53 ENumberEntryClose, |
|
54 ENumberEntryCreate |
|
55 }; |
|
56 |
45 |
57 // CLASS DECLARATION |
46 // CLASS DECLARATION |
58 |
47 |
59 /** |
48 /** |
60 * An abstract class for an object implementing the state. |
49 * An abstract class for an object implementing the state. |
236 |
225 |
237 /** |
226 /** |
238 * Handles Long hash key press |
227 * Handles Long hash key press |
239 */ |
228 */ |
240 IMPORT_C void HandleLongHashL(); |
229 IMPORT_C void HandleLongHashL(); |
241 |
|
242 /** |
|
243 * Informs view to start Transition effect if effect |
|
244 * type is feasible for current state. |
|
245 * @param aType a transition effect, default none |
|
246 * EndTransEffect() must be called when update is done. |
|
247 */ |
|
248 IMPORT_C void BeginTransEffectLC( TStateTransEffectType aType = ENoneType ); |
|
249 |
|
250 /** |
|
251 * Informs view to complete Transition effect |
|
252 */ |
|
253 IMPORT_C void EndTransEffect(); |
|
254 |
|
255 /** |
230 /** |
256 * Checks whether customized dialer view is active, |
231 * Checks whether customized dialer view is active, |
257 * @return ETrue if customized dialer is active |
232 * @return ETrue if customized dialer is active |
258 */ |
233 */ |
259 IMPORT_C TBool IsCustomizedDialerVisibleL() const; |
234 IMPORT_C TBool IsCustomizedDialerVisibleL() const; |
346 /** |
321 /** |
347 * Setter for CEikonEnv to avoid use of static system calls |
322 * Setter for CEikonEnv to avoid use of static system calls |
348 * @param CEikonEnv handle |
323 * @param CEikonEnv handle |
349 */ |
324 */ |
350 IMPORT_C virtual void SetEikonEnv( CEikonEnv* aEnv ); |
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(); |
351 |
332 |
352 public: // NumberEntry functions. |
333 public: // NumberEntry functions. |
353 |
334 |
354 /** |
335 /** |
355 * Passes create number entry command forward if NE can be created. |
336 * Passes create number entry command forward if NE can be created. |
634 * Handles situation when hash key has been kept down long |
615 * Handles situation when hash key has been kept down long |
635 * (long keypress) and the hash character is the only character |
616 * (long keypress) and the hash character is the only character |
636 * in number entry. |
617 * in number entry. |
637 */ |
618 */ |
638 IMPORT_C virtual void OnlyHashInNumberEntryL(); |
619 IMPORT_C virtual void OnlyHashInNumberEntryL(); |
639 |
620 |
640 /** |
|
641 * Informs view that UI is being updated (call bubble or number editor). |
|
642 * EndUiUpdate() must be called when update is done. |
|
643 */ |
|
644 IMPORT_C void BeginUiUpdateLC(); |
|
645 |
|
646 /** |
|
647 * Informs view that UI update is completed. |
|
648 */ |
|
649 IMPORT_C void EndUiUpdate(); |
|
650 |
|
651 /* |
621 /* |
652 * Checks if necessary to show call termination note |
622 * Checks if necessary to show call termination note |
653 * |
623 * |
654 * @param aCallId call id |
624 * @param aCallId call id |
655 * @return true if note should be shown |
625 * @return true if note should be shown |
1028 */ |
998 */ |
1029 void CreateCallerInfoL( const TInt aCallId, |
999 void CreateCallerInfoL( const TInt aCallId, |
1030 TPhoneCmdParamCallHeaderData* aCallHeaderData ); |
1000 TPhoneCmdParamCallHeaderData* aCallHeaderData ); |
1031 |
1001 |
1032 /** |
1002 /** |
1033 * TCleanupOperation to call EndUiUpdate(), if leave occurs |
|
1034 * after BeginUiUpdate(). |
|
1035 */ |
|
1036 static void UiUpdateCleanup(TAny* aThis ); |
|
1037 |
|
1038 /** |
|
1039 * TCleanupOperation to call EndTransEffect, if leave occurs |
|
1040 * after BeginTransEffect(). |
|
1041 */ |
|
1042 static void EffectCleanup(TAny* aThis ); |
|
1043 |
|
1044 /** |
|
1045 * Gets volume level from ui control. |
1003 * Gets volume level from ui control. |
1046 */ |
1004 */ |
1047 TInt GetVolumeLevel(); |
1005 TInt GetVolumeLevel(); |
1048 |
1006 |
1049 /** |
1007 /** |
1092 /* |
1050 /* |
1093 * Checks if keyevent is from dtmf key and sends it to phone-engine |
1051 * Checks if keyevent is from dtmf key and sends it to phone-engine |
1094 */ |
1052 */ |
1095 void SendDtmfKeyEventL( const TKeyEvent& aKeyEvent, |
1053 void SendDtmfKeyEventL( const TKeyEvent& aKeyEvent, |
1096 TEventCode aEventCode ); |
1054 TEventCode aEventCode ); |
1097 |
1055 |
1098 /* |
1056 /* |
1099 * Creates call header manager if needed. |
1057 * Creates call header manager if needed. |
1100 */ |
1058 */ |
1101 CPhoneCallHeaderManager* CallheaderManagerL(); |
1059 CPhoneCallHeaderManager* CallheaderManagerL(); |
1102 |
1060 |
1191 // use of static system calls |
1149 // use of static system calls |
1192 CEikonEnv* iEnv; // Not owned |
1150 CEikonEnv* iEnv; // Not owned |
1193 |
1151 |
1194 // Call header manager. |
1152 // Call header manager. |
1195 CPhoneCallHeaderManager* iCallHeaderManager; |
1153 CPhoneCallHeaderManager* iCallHeaderManager; |
|
1154 |
|
1155 // Call header manager. |
|
1156 TPhoneTransitionHandler* iTransitionHandler; |
1196 |
1157 |
1197 // Number entry manager |
1158 // Number entry manager |
1198 CPhoneNumberEntryManager* iNumberEntryManager; |
1159 CPhoneNumberEntryManager* iNumberEntryManager; |
1199 |
1160 |
1200 // RingtoneSilenced flag. |
1161 // RingtoneSilenced flag. |