equal
deleted
inserted
replaced
29 #include "mfsmaileventobserver.h" |
29 #include "mfsmaileventobserver.h" |
30 #include "fsccontactactionmenudefines.h" |
30 #include "fsccontactactionmenudefines.h" |
31 //</cmail> |
31 //</cmail> |
32 #include "FSEmailBuildFlags.h" |
32 #include "FSEmailBuildFlags.h" |
33 |
33 |
|
34 #include <touchfeedback.h> |
|
35 #include <touchlogicalfeedback.h> |
|
36 |
34 // INTERNAL INCLUDES |
37 // INTERNAL INCLUDES |
35 #include "FreestyleEmailUiViewBase.h" |
38 #include "FreestyleEmailUiViewBase.h" |
36 #include "FreestyleEmailUiListVisualiser.h" |
39 #include "FreestyleEmailUiListVisualiser.h" |
37 #include "FreestyleEmailUiConstants.h" |
40 #include "FreestyleEmailUiConstants.h" |
38 #include "FreestyleEmailUiControlBarCallback.h" |
41 #include "FreestyleEmailUiControlBarCallback.h" |
39 #include "FreestyleEmailUiUtilities.h" |
42 #include "FreestyleEmailUiUtilities.h" |
40 #include "FreestyleEmailUiContactHandlerObserver.h" |
43 #include "FreestyleEmailUiContactHandlerObserver.h" |
|
44 #include "cmailboxstateext.h" |
41 |
45 |
42 // FORWARD DECLARATIONS |
46 // FORWARD DECLARATIONS |
43 class CAlfTextVisual; |
47 class CAlfTextVisual; |
44 class CAlfGridLayout; |
48 class CAlfGridLayout; |
45 class CFSEmailUiList; |
49 class CFSEmailUiList; |
76 class CFsTreePlainTwoLineItemData; |
80 class CFsTreePlainTwoLineItemData; |
77 class CFsTreePlainTwoLineItemVisualizer; |
81 class CFsTreePlainTwoLineItemVisualizer; |
78 class CEUiEmailListTouchManager; |
82 class CEUiEmailListTouchManager; |
79 class MFSMailIterator; |
83 class MFSMailIterator; |
80 class CAknStylusPopUpMenu; |
84 class CAknStylusPopUpMenu; |
|
85 template <class T> struct TDeleteTask; |
81 |
86 |
82 /** |
87 /** |
83 * CMailListModelUpdater |
88 * CMailListModelUpdater |
84 * |
89 * |
85 * Asynchronous mail list updater. |
90 * Asynchronous mail list updater. |
256 public MFsControlBarObserver, |
261 public MFsControlBarObserver, |
257 public MFSEmailUiFolderListCallback, |
262 public MFSEmailUiFolderListCallback, |
258 public MFSEmailUiSortListCallback, |
263 public MFSEmailUiSortListCallback, |
259 public MFsTreeListObserver, |
264 public MFsTreeListObserver, |
260 public MFSEmailUiContactHandlerObserver, |
265 public MFSEmailUiContactHandlerObserver, |
261 public CMailListModelUpdater::MObserver |
266 public CMailListModelUpdater::MObserver, |
|
267 public MEmailMailboxState |
262 // </cmail> |
268 // </cmail> |
263 { |
269 { |
264 friend class CMailListUpdater; |
270 friend class CMailListUpdater; |
265 public: |
271 public: |
266 static CFSEmailUiMailListVisualiser* NewL(CAlfEnv& aEnv, CFreestyleEmailUiAppUi* aAppUi, CAlfControlGroup& aMailListControlGroup); |
272 static CFSEmailUiMailListVisualiser* NewL(CAlfEnv& aEnv, CFreestyleEmailUiAppUi* aAppUi, CAlfControlGroup& aMailListControlGroup); |
370 void SortOrderChangedL( TFSMailSortField aSortField, |
376 void SortOrderChangedL( TFSMailSortField aSortField, |
371 TFSEmailUiCtrlBarResponse aResponse ); |
377 TFSEmailUiCtrlBarResponse aResponse ); |
372 TRect SortButtonRect(); |
378 TRect SortButtonRect(); |
373 |
379 |
374 // Update theme colors |
380 // Update theme colors |
375 void UpdateTheme(); |
381 void UpdateTheme(const TBool aSystemUpdate = ETrue); |
376 |
382 |
377 // Navigation functions, used mainly from viewer |
383 // Navigation functions, used mainly from viewer |
378 TBool IsNextMsgAvailable( TFSMailMsgId aCurrentMsgId, TFSMailMsgId& aFoundNextMsgId, TFSMailMsgId& aFoundNextMsgFolder ) const; |
384 TBool IsNextMsgAvailable( TFSMailMsgId aCurrentMsgId, TFSMailMsgId& aFoundNextMsgId, TFSMailMsgId& aFoundNextMsgFolder ) const; |
379 TBool IsPreviousMsgAvailable( TFSMailMsgId aCurrentMsgId, TFSMailMsgId& aFoundPreviousMsgId, TFSMailMsgId& aFoundPrevMsgFolder ) const; |
385 TBool IsPreviousMsgAvailable( TFSMailMsgId aCurrentMsgId, TFSMailMsgId& aFoundPreviousMsgId, TFSMailMsgId& aFoundPrevMsgFolder ) const; |
380 TInt MoveToNextMsgL( TFSMailMsgId aCurrentMsgId, TFSMailMsgId& aFoundNextMsgId ); |
386 TInt MoveToNextMsgL( TFSMailMsgId aCurrentMsgId, TFSMailMsgId& aFoundNextMsgId ); |
419 * changes or when user alters the system time. Redraws the list to ensure that |
425 * changes or when user alters the system time. Redraws the list to ensure that |
420 * time stamp texts in emails and nodes are up-to-date. |
426 * time stamp texts in emails and nodes are up-to-date. |
421 */ |
427 */ |
422 void NotifyDateChangedL(); |
428 void NotifyDateChangedL(); |
423 |
429 |
|
430 // Sets aActiveMailboxId and aActiveFolderId from iMailFolder if available |
|
431 TInt GetActiveFolderId(TFSMailMsgId& aActiveMailboxId, TFSMailMsgId& aActiveFolderId) const; |
|
432 |
|
433 // Creates CMailboxStateExtension with this class set as dataprovider |
|
434 void CreateExtensionL(); |
424 private: // from |
435 private: // from |
425 |
436 |
426 /** |
437 /** |
427 * @see CFsEmailUiViewBase::ChildDoActivateL |
438 * @see CFsEmailUiViewBase::ChildDoActivateL |
428 */ |
439 */ |
534 void MarkMessagesIfFoundL( const RArray<TFSMailMsgId>& aMessageIDs ); |
545 void MarkMessagesIfFoundL( const RArray<TFSMailMsgId>& aMessageIDs ); |
535 |
546 |
536 // Message deletion internal functions |
547 // Message deletion internal functions |
537 void DeleteFocusedMessageL(); |
548 void DeleteFocusedMessageL(); |
538 void DeleteMarkedMessagesL(); |
549 void DeleteMarkedMessagesL(); |
539 static TInt DoDeleteMarkedMessages( TAny* aSelfPtr ); |
550 void DeleteMessagesUnderNodeL( const TFsTreeItemId aNodeId ); |
|
551 void ConfirmAndStartDeleteTaskL( TDeleteTask<CFSEmailUiMailListVisualiser>* aTask ); |
|
552 TBool ConfirmDeleteL( const TInt aItemCount, const TFsTreeItemId aItemId ) const; |
|
553 static TInt DoExecuteDeleteTask( TAny* aSelfPtr ); |
|
554 void HandleDeleteTaskL( const RFsTreeItemIdList& aEntries ); |
|
555 void HandleDeleteTaskLeavingCodeL( const RFsTreeItemIdList& aEntries ); |
540 |
556 |
541 // Helper functions to access model data |
557 // Helper functions to access model data |
542 TFSMailMsgId MsgIdFromIndex( TInt aItemIdx ) const; |
558 TFSMailMsgId MsgIdFromIndex( TInt aItemIdx ) const; |
543 CFSMailMessage& MsgPtrFromListIdL( TFsTreeItemId aListId ); |
559 CFSMailMessage& MsgPtrFromListIdL( TFsTreeItemId aListId ); |
544 const CFSMailMessage& MsgPtrFromListIdL( TFsTreeItemId aListId ) const; |
560 const CFSMailMessage& MsgPtrFromListIdL( TFsTreeItemId aListId ) const; |
701 |
717 |
702 private: // data types |
718 private: // data types |
703 |
719 |
704 |
720 |
705 private: // Private objects |
721 private: // Private objects |
|
722 // Extension to support Ozone-plugin's check for active mailbox |
|
723 CMailboxStateExtension* iExtension; |
706 // Reference to Alf environment |
724 // Reference to Alf environment |
707 CAlfEnv& iEnv; |
725 CAlfEnv& iEnv; |
708 // Mail list updater timer |
726 // Mail list updater timer |
709 // Timer delays mail update to prevent unnesessary redraw events |
727 // Timer delays mail update to prevent unnesessary redraw events |
710 CMailListUpdater* iMailListUpdater; |
728 CMailListUpdater* iMailListUpdater; |
778 CAknStylusPopUpMenu* iStylusPopUpMenu; |
796 CAknStylusPopUpMenu* iStylusPopUpMenu; |
779 TBool iStylusPopUpMenuVisible; |
797 TBool iStylusPopUpMenuVisible; |
780 |
798 |
781 TBool iShowReplyAll; |
799 TBool iShowReplyAll; |
782 // Was focus visible in the ListView. |
800 // Was focus visible in the ListView. |
|
801 TDeleteTask<CFSEmailUiMailListVisualiser>* iDeleteTask; |
783 TBool iLastFocus; |
802 TBool iLastFocus; |
784 //used to prevent Call application execution (on keyup of call button) when call to contact required |
803 //used to prevent Call application execution (on keyup of call button) when call to contact required |
785 TBool iConsumeStdKeyYes_KeyUp; |
804 TBool iConsumeStdKeyYes_KeyUp; |
786 CMailListModelUpdater* iMailListModelUpdater; |
805 CMailListModelUpdater* iMailListModelUpdater; |
787 TBool iForceRefresh; |
806 TBool iForceRefresh; |
788 // true if message viewer/editor is open to disable background list updates |
807 // true if message viewer/editor is open to disable background list updates |
789 TBool iMailOpened; |
808 TBool iMailOpened; |
|
809 // tactile feed back -- not owned |
|
810 MTouchFeedback* iTouchFeedBack; |
790 }; |
811 }; |
791 |
812 |
792 |
813 |
793 // Definition of the mail updater timer. This timer is used for |
814 // Definition of the mail updater timer. This timer is used for |
794 // delayed drawing of the mail list to avoid viewsrv:11 panics. |
815 // delayed drawing of the mail list to avoid viewsrv:11 panics. |