equal
deleted
inserted
replaced
80 class CFsTreePlainTwoLineItemData; |
80 class CFsTreePlainTwoLineItemData; |
81 class CFsTreePlainTwoLineItemVisualizer; |
81 class CFsTreePlainTwoLineItemVisualizer; |
82 class CEUiEmailListTouchManager; |
82 class CEUiEmailListTouchManager; |
83 class MFSMailIterator; |
83 class MFSMailIterator; |
84 class CAknStylusPopUpMenu; |
84 class CAknStylusPopUpMenu; |
|
85 class CFSEmailUiGenericTimer; |
85 template <class T> struct TDeleteTask; |
86 template <class T> struct TDeleteTask; |
86 |
87 |
87 /** |
88 /** |
88 * CMailListModelUpdater |
89 * CMailListModelUpdater |
89 * |
90 * |
139 */ |
140 */ |
140 virtual void UpdateCancelled(const TBool aForceRefresh) = 0; |
141 virtual void UpdateCancelled(const TBool aForceRefresh) = 0; |
141 }; |
142 }; |
142 |
143 |
143 public: |
144 public: |
|
145 /** |
|
146 * |
|
147 */ |
|
148 static CMailListModelUpdater* NewL(); |
144 |
149 |
145 /** |
150 /** |
146 * Constructor |
151 * Constructor |
147 */ |
152 */ |
148 CMailListModelUpdater(); |
153 CMailListModelUpdater(); |
160 RArray<TFSMailSortCriteria>& Sorting(); |
165 RArray<TFSMailSortCriteria>& Sorting(); |
161 |
166 |
162 /** |
167 /** |
163 * Update model. |
168 * Update model. |
164 */ |
169 */ |
165 void UpdateModelL(MObserver& aObserver, MFSMailIterator* aIterator); |
170 void UpdateModelL(MObserver& aObserver, MFSMailIterator* aIterator, TInt aBlockSize); |
166 |
171 |
167 /** |
172 /** |
168 * Returns ETrue if updating. |
173 * Returns ETrue if updating. |
169 */ |
174 */ |
170 TBool IsUpdating() const; |
175 TBool IsUpdating() const; |
178 |
183 |
179 /** |
184 /** |
180 * @see CActive::DoCancel |
185 * @see CActive::DoCancel |
181 */ |
186 */ |
182 void DoCancel(); |
187 void DoCancel(); |
|
188 /** |
|
189 * @see CActive::RunError |
|
190 */ |
|
191 TInt RunError(TInt aError); |
183 |
192 |
184 private: |
193 private: |
185 |
194 |
186 /** |
195 /** |
187 * Signal self with given error code and set a new state. |
196 * Signal self with given error code and set a new state. |
205 |
214 |
206 /** |
215 /** |
207 * Reset to uninitialized state. |
216 * Reset to uninitialized state. |
208 */ |
217 */ |
209 void Reset(); |
218 void Reset(); |
|
219 private: |
|
220 void ConstructL(); |
210 |
221 |
211 private: |
222 private: |
212 |
223 |
213 RArray<TFSMailSortCriteria> iSorting; |
224 RArray<TFSMailSortCriteria> iSorting; |
214 TFSMailMsgId iId; |
225 TFSMailMsgId iId; |
216 TInt iItemsFetched; |
227 TInt iItemsFetched; |
217 MObserver* iObserver; |
228 MObserver* iObserver; |
218 MFSMailIterator* iIterator; |
229 MFSMailIterator* iIterator; |
219 TFsTreeItemId iParentId; |
230 TFsTreeItemId iParentId; |
220 TInt iBlockSize; |
231 TInt iBlockSize; |
|
232 RTimer iTimer; |
221 }; |
233 }; |
222 |
234 |
223 struct SMailListItem |
235 struct SMailListItem |
224 { |
236 { |
225 TFsTreeItemId iListItemId; |
237 TFsTreeItemId iListItemId; |
262 public MFSEmailUiFolderListCallback, |
274 public MFSEmailUiFolderListCallback, |
263 public MFSEmailUiSortListCallback, |
275 public MFSEmailUiSortListCallback, |
264 public MFsTreeListObserver, |
276 public MFsTreeListObserver, |
265 public MFSEmailUiContactHandlerObserver, |
277 public MFSEmailUiContactHandlerObserver, |
266 public CMailListModelUpdater::MObserver, |
278 public CMailListModelUpdater::MObserver, |
267 public MEmailMailboxState |
279 public MEmailMailboxState, |
|
280 public MFSEmailUiGenericTimerCallback |
268 // </cmail> |
281 // </cmail> |
269 { |
282 { |
270 friend class CMailListUpdater; |
283 friend class CMailListUpdater; |
271 private: |
284 private: |
272 |
285 |
447 void CreateExtensionL(); |
460 void CreateExtensionL(); |
448 |
461 |
449 // check from settings if manual or auto sync |
462 // check from settings if manual or auto sync |
450 TBool CheckAutoSyncSettingL(); |
463 TBool CheckAutoSyncSettingL(); |
451 |
464 |
|
465 public: // from MFSEmailUiGenericTimerCallback |
|
466 |
|
467 /** |
|
468 * From MFSEmailUiGenericTimerCallback. |
|
469 * Generic timer event callback. |
|
470 * Handles insertion of new mails into mail list. |
|
471 */ |
|
472 void TimerEventL( CFSEmailUiGenericTimer* aTriggeredTimer ); |
|
473 |
452 private: // from |
474 private: // from |
453 |
475 |
454 /** |
476 /** |
455 * @see CFsEmailUiViewBase::ChildDoActivateL |
477 * @see CFsEmailUiViewBase::ChildDoActivateL |
456 */ |
478 */ |
520 * @see CMailListModelUpdater::MObserver::UpdateCancelled |
542 * @see CMailListModelUpdater::MObserver::UpdateCancelled |
521 */ |
543 */ |
522 void UpdateCancelled(const TBool aForceRefresh); |
544 void UpdateCancelled(const TBool aForceRefresh); |
523 |
545 |
524 // Mail model update |
546 // Mail model update |
525 void UpdateMailListModelAsyncL(); |
547 void SortMailListModelAsyncL(); |
|
548 TBool UpdateMailListModelAsyncL(TInt aBlockSize); |
526 void UpdateMailListModelL(); |
549 void UpdateMailListModelL(); |
527 void CreateModelItemsL( RPointerArray<CFSMailMessage>& aMessages ); |
550 void CreateModelItemsL( RPointerArray<CFSMailMessage>& aMessages ); |
|
551 void DeleteSortWaitNote(); |
528 |
552 |
529 // Create title divider model item for the given message. Separator text depends on active sorting mode. |
553 // Create title divider model item for the given message. Separator text depends on active sorting mode. |
530 CFSEmailUiMailListModelItem* CreateSeparatorModelItemLC( CFSMailMessage& aMessage ) const; |
554 CFSEmailUiMailListModelItem* CreateSeparatorModelItemLC( CFSMailMessage& aMessage ) const; |
531 |
555 |
532 // Checks if the given messages belong under the same title divider. This depends on the currect sorting mode. |
556 // Checks if the given messages belong under the same title divider. This depends on the currect sorting mode. |
910 CAlfLayout* iMarkingModeTextParentLayout; |
934 CAlfLayout* iMarkingModeTextParentLayout; |
911 CAlfAnchorLayout* iMarkingModeTextContentLayout; |
935 CAlfAnchorLayout* iMarkingModeTextContentLayout; |
912 TPoint iMarkingModeTextPos; |
936 TPoint iMarkingModeTextPos; |
913 TSize iMarkingModeTextSize; |
937 TSize iMarkingModeTextSize; |
914 TRect iMarkingModeTextRect; |
938 TRect iMarkingModeTextRect; |
915 }; |
939 CAknWaitDialog* iSortWaitNote; |
|
940 // timer generates events for inserting new mails into mail list |
|
941 CFSEmailUiGenericTimer* iNewMailTimer; |
|
942 // array keeps IDs of new mails which should be added into mail list |
|
943 RArray<TFSMailMsgId> iNewMailIds; |
|
944 |
|
945 // skin text colors for the list items |
|
946 TRgb iFocusedTextColor; |
|
947 TRgb iNormalTextColor; |
|
948 TRgb iNodeTextColor; |
|
949 }; |
916 |
950 |
917 |
951 |
918 // Definition of the mail updater timer. This timer is used for |
952 // Definition of the mail updater timer. This timer is used for |
919 // delayed drawing of the mail list to avoid viewsrv:11 panics. |
953 // delayed drawing of the mail list to avoid viewsrv:11 panics. |
920 class CMailListUpdater : public CTimer |
954 class CMailListUpdater : public CTimer |