|
1 /* |
|
2 * Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * Defines the CMceUi class |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 |
|
21 #ifndef MCEUI_H |
|
22 #define MCEUI_H |
|
23 |
|
24 // INCLUDES |
|
25 #include <aknViewAppUi.h> // CAknViewAppUi |
|
26 #include <MuiuMsvSingleOpWatcher.h> |
|
27 #include "MtmRegistryObserver.h" // MMtmUiDataRegistryObserver |
|
28 #include <MsgArrays.h> // CUidNameArray |
|
29 #include <gulicon.h> // CGulIcon |
|
30 |
|
31 #include "MceUtils.h" // MMceAccountManager |
|
32 #include "MsgFunctionInfo.h" |
|
33 |
|
34 #include "MceIds.h" |
|
35 #include "MceLogText.h" |
|
36 #include <AknTabObserver.h> // MAknTabObserver |
|
37 #include <rconnmon.h> |
|
38 #include "MceMailAccountItem.h" |
|
39 #include <mcesettingsaccountmanager.h> // in MceSettings.dll |
|
40 #include <bldvariant.hrh> |
|
41 #include "MceEmailNotifHandler.h" |
|
42 #include <AknQueryDialog.h> |
|
43 #include <mmsclient.h> |
|
44 |
|
45 // DATA TYPES |
|
46 enum |
|
47 { |
|
48 EMceMainViewActive = 0x01, |
|
49 EMceMessageViewActive = 0x02, |
|
50 EMceDeliveryReportsViewActive = 0x04 |
|
51 }; |
|
52 enum |
|
53 { |
|
54 EMceUiFlagsFinishedConstruction = 0x01, |
|
55 EMceUiFlagsServerReady = 0x02, |
|
56 EMceUiFlagsTabsActive = 0x04, |
|
57 EMceUiFlagsWantToExit = 0x08, |
|
58 EMceUiFlagsExitAfterDisconnect = 0x10, |
|
59 EMceUiFlagsDoNotExitAfterNextOperationComplete = 0x20, |
|
60 EMceUiFlagsMainViewActivated = 0x40, |
|
61 EMceUiFlagsMediaUnavailable = 0x80, |
|
62 EMceUiFlagsSupressViewUpdate = 0x100, |
|
63 EMceUiFlagsMainViewAiwCreated = 0x200, |
|
64 EMceUiFlagsMessageViewAiwCreated = 0x400, |
|
65 EMceUiFlagsSettingsDialogOpen = 0x800, |
|
66 EMceUiFlagsExitOnMsvMediaAvailableEvent = 0x1000, |
|
67 EMceUiFlagsContainerAddedToStack = 0x2000, |
|
68 |
|
69 }; |
|
70 #define KMsvMyFoldersEntryIdValue 0x1008 |
|
71 const TMsvId KMsvMyFoldersEntryId=KMsvMyFoldersEntryIdValue; |
|
72 |
|
73 typedef CArrayFixFlat<TMceMailAccountItem> CMceMailAccountItemArray; |
|
74 |
|
75 // FORWARD DECLARATIONS |
|
76 class CMsvSession; |
|
77 class CMtmStore; |
|
78 class CMtmUiDataRegistry; |
|
79 class CMceMessageListView; |
|
80 class CMceMainViewListView; |
|
81 class CMceSessionHolder; |
|
82 class CMceBitmapResolver; |
|
83 class CMceConnectMailboxTimer; |
|
84 class CMceLogEngine; |
|
85 class CMessageIterator; |
|
86 class CAknNavigationControlContainer; |
|
87 class CAknNavigationDecorator; |
|
88 class CMceIdleMtmLoader; |
|
89 class CAknLocalScreenClearer; |
|
90 class CErrorUI; |
|
91 class CAknTitlePane; |
|
92 class CSendingServiceInfo; |
|
93 class CMceDeliveryReportView; |
|
94 class CImumInternalApi; |
|
95 class CMceIAUpdateUtils; |
|
96 class CMmsCodecClient; |
|
97 // CLASS DECLARATION |
|
98 |
|
99 /** |
|
100 * Mce's UI class. |
|
101 */ |
|
102 class CMceUi : |
|
103 public CAknViewAppUi, |
|
104 public MMsvSessionObserver, |
|
105 public MMtmUiDataRegistryObserver, |
|
106 public MMsvSingleOpWatcher, |
|
107 public MMceSettingsAccountManager, |
|
108 public MAknTabObserver, |
|
109 public MConnectionMonitorObserver, |
|
110 public MCoeForegroundObserver // CR : 401-1806 |
|
111 { |
|
112 public: // Constructors and destructor |
|
113 |
|
114 /** |
|
115 * C++ default constructor. |
|
116 */ |
|
117 CMceUi(); |
|
118 |
|
119 /** |
|
120 * Destructor. |
|
121 */ |
|
122 virtual ~CMceUi(); |
|
123 |
|
124 public: |
|
125 |
|
126 /** |
|
127 * Opens message folder and activates message view |
|
128 * @param aFolderId id of the folder to be opened |
|
129 */ |
|
130 void OpenFolderViewL( TMsvId aFolderId ); |
|
131 |
|
132 /** |
|
133 * Opens remote mailbox and activates message view |
|
134 * @param aFolderId id of the folder to be opened |
|
135 */ |
|
136 void OpenRemoteMailboxViewL( TMsvId aFolderId ); |
|
137 |
|
138 /** |
|
139 * Cancels ConnectMailboxTimer. |
|
140 */ |
|
141 void CancelMailboxTimer(); |
|
142 |
|
143 /** |
|
144 * Calls corresponding mtm to edit entry |
|
145 * @param aEntry: entry to be edited. |
|
146 */ |
|
147 void EditMTMEntryL( const TMsvEntry& aEntry ); |
|
148 |
|
149 /** |
|
150 * Used to launch unieditor |
|
151 */ |
|
152 void LaunchUniEditorL(); |
|
153 |
|
154 |
|
155 /** |
|
156 * Opens connection to account |
|
157 * @param aAccount account id to be connected. |
|
158 */ |
|
159 void GoOnlineL( TMsvId aAccount ); |
|
160 |
|
161 /** |
|
162 * Opens connection to account with confirmation query. |
|
163 * @param aAccount account id to be connected. |
|
164 */ |
|
165 void GoOnlineWithQueryL( TMsvId aAccount ); |
|
166 |
|
167 /** |
|
168 * Closes connection to mailbox. |
|
169 * @param aAccount account id to be disconnected. |
|
170 */ |
|
171 void GoOfflineL( TMsvId aAccount ); |
|
172 |
|
173 /** |
|
174 * Connects or disconnects |
|
175 * @param aServiceId id of the account to be connected |
|
176 * or disconnected. |
|
177 * @param aConnect ETrue if connected, EFalse if disconnected. |
|
178 */ |
|
179 void ChangeServiceConnectionStateL(TMsvId aServiceId, TBool aConnect); |
|
180 |
|
181 /** |
|
182 * Fills TMsvEntry structure of the message. |
|
183 * @param aId id of the message. |
|
184 * @param aEntry structure to be filled. |
|
185 */ |
|
186 TMsvId GetEntryL(TMsvId aId, TMsvEntry& aEntry) const; |
|
187 |
|
188 /** |
|
189 * Closes connection if only one online. If more than one connection on |
|
190 * displayes query to disconnect. |
|
191 */ |
|
192 void CloseConnectionWithListQueryL(); |
|
193 |
|
194 /** |
|
195 * Returns pointer to log engine. |
|
196 */ |
|
197 CMceLogEngine* LogEngine(); |
|
198 |
|
199 /** |
|
200 * Launches help application |
|
201 */ |
|
202 void LaunchHelpL(); |
|
203 |
|
204 /** |
|
205 * Checks if command is currently available |
|
206 * @param aCommand command id |
|
207 * @param aEntryToCheck current entry selected |
|
208 * @return 0 if available. != 0 otherwise |
|
209 */ |
|
210 TInt CheckCommandAvailableL( TInt aCommand, TMsvEntry& aEntryToCheck ); |
|
211 |
|
212 /** |
|
213 * Checks if command is currently available |
|
214 * @param aCommand command id |
|
215 * @param aEntriesToCheck currently selected entries |
|
216 * @return 0 if available. != 0 otherwise |
|
217 */ |
|
218 TInt CheckCommandAvailableL( TInt aCommand, CMsvEntrySelection* aEntriesToCheck ); |
|
219 |
|
220 /** |
|
221 * Called when UI receives HandleSessionEventL( EMsvServerReady, .... ) |
|
222 * from msgs. |
|
223 * Creates needed messaging related objects, collects info of the |
|
224 * installed MTMs, creates icon array and finally activates main view. |
|
225 */ |
|
226 void HandleServerStartupL(); |
|
227 |
|
228 /** |
|
229 * Displayes tabs (creates tabs if not already created). |
|
230 * Should be called when opening folder. |
|
231 * @param: aOpenedId: id of the folder to be opened (used to set active tab) |
|
232 * @param: aOpeningDeliveryReports: ETrue when opening delivery reports view and aOpenedId is ignored. |
|
233 * EFalse if opening folder from msgs. |
|
234 */ |
|
235 void ShowTabsL( TMsvId aOpenedId, TBool aOpeningDeliveryReports = EFalse ); |
|
236 |
|
237 /** |
|
238 * Removes tabs. |
|
239 */ |
|
240 void RemoveTabs(); |
|
241 |
|
242 /** |
|
243 * Should be called by view's DoActivate to inform mceui what view is active. |
|
244 * Sets view flag. |
|
245 * @param aActiveView: EMceMainViewActive or EMceMessageViewActive, etc |
|
246 */ |
|
247 void SetMceViewActive( TUint aActiveView ); |
|
248 |
|
249 /** |
|
250 * Query function to query is certain view active |
|
251 * For example MceViewActive( EMceMainViewActive ). |
|
252 * @param aActiveView: EMceMainViewActive or EMceMessageViewActive, etc |
|
253 * @return ETrue if view is active, EFalse otherwise |
|
254 */ |
|
255 TBool MceViewActive( TInt aActiveView ) const; |
|
256 |
|
257 /** |
|
258 * Sends entry via BT or IR. |
|
259 * @param aId: id of the message to be sent |
|
260 * @param aMtm: mtm to be used to send |
|
261 */ |
|
262 void SendViaL( TMsvId aId, TUid aMtm ); |
|
263 |
|
264 /** |
|
265 * Returns ETrue if mce is performing editor opening operation |
|
266 */ |
|
267 TBool IsEditorOpen( ) const; |
|
268 |
|
269 /** |
|
270 * Gets status pane of the mce application |
|
271 * @return pointer to status pane (to the object of CAknTitlePane) |
|
272 */ |
|
273 CAknTitlePane* TitlePaneL() const; |
|
274 |
|
275 /** |
|
276 * Activates timer for mailbox connection query |
|
277 * @param aEntryId: folder to be opened |
|
278 */ |
|
279 void ActivateConnectionQueryTimerL( TMsvId aEntryId ); |
|
280 |
|
281 /** |
|
282 * Clears EMceUiFlagsExitAfterDisconnect flag |
|
283 * |
|
284 */ |
|
285 void ClearExitAfterDisconnectFlag(); |
|
286 |
|
287 void SetViewUpdateSuppressionFlag( TBool aValue, CMsvOperation* aOp ); |
|
288 TBool ViewUpdateSuppressionFlag(); |
|
289 |
|
290 /** |
|
291 * Sets EMceUiFlagsDoNotExitAfterNextOperationComplete flag |
|
292 * |
|
293 */ |
|
294 void SetDontExitOnNextOperationComplete(); |
|
295 |
|
296 /** |
|
297 * Clears EMceUiFlagsDoNotExitAfterNextOperationComplete flag |
|
298 * |
|
299 */ |
|
300 void ClearDontExitOnNextOperationComplete(); |
|
301 |
|
302 /** |
|
303 * Call back function, clears EMceUiFlagsDoNotExitAfterNextOperationComplete flag |
|
304 * |
|
305 */ |
|
306 static TInt ClearDontExitOnNextOperationComplete( TAny* aAny ); |
|
307 |
|
308 /** |
|
309 * Checks if SyncML mail synchronizing going on |
|
310 * Returns ETrue, if synchronizing is going on |
|
311 */ |
|
312 TBool IsSyncronizingL( const TMsvEntry& entry ); |
|
313 |
|
314 /** |
|
315 * Checks when last always online connection succeeded |
|
316 * @param aAccount: service id |
|
317 * Returns EFalse, if last connection failed |
|
318 */ |
|
319 TBool AlwaysOnlineLastConnectionL( const TMsvId aAccount ); |
|
320 |
|
321 /** |
|
322 * Checks if always online feature is supported |
|
323 * Returns ETrue, if always online is supported |
|
324 */ |
|
325 TBool AlwaysOnline( ); |
|
326 |
|
327 /** |
|
328 * Checks if remote mailbox connection was made in mce |
|
329 * @param aServiceId: service id |
|
330 * Returns ETrue, if connection was made in Mce |
|
331 */ |
|
332 TBool ServiceIdFound( const TMsvId& aServiceId ); |
|
333 |
|
334 /** |
|
335 * If connection is made in mce, adds operation id/service in iMailAccountItemArray |
|
336 * @param aOp: operation id |
|
337 * @param aServiceId: service id |
|
338 */ |
|
339 void AddOperationIdL( const TMsvOp& aOp, const TMsvId& aServiceId ); |
|
340 |
|
341 /** |
|
342 * Removes operation id from iMailAccountItemArray |
|
343 * @param TMsvId: operation id |
|
344 * @param aServiceId: service id |
|
345 */ |
|
346 void RemoveOperationId( const TMsvId& aOpId, const TMsvId& aServiceId ); |
|
347 |
|
348 /** |
|
349 * Shows a query in mce startup, |
|
350 * if message store was automatically changed to phone from MMC |
|
351 * @param aShowQuery: if ETrue, query can be shown |
|
352 */ |
|
353 void ToPhoneMemoryQueryL( TBool aShowQuery ); |
|
354 |
|
355 /** |
|
356 * Sets EMceUiFlagsMainViewActivated flag |
|
357 * |
|
358 */ |
|
359 void SetMainViewActivatedFlag( ); |
|
360 |
|
361 /** |
|
362 * Removes folder tabs. |
|
363 */ |
|
364 void RemoveFolderTabs(); |
|
365 |
|
366 /** |
|
367 * Shows folder tabs. |
|
368 * @param aDepth: folder path depth |
|
369 */ |
|
370 void ShowFolderTabsL( const TInt aDepth ); |
|
371 |
|
372 /** |
|
373 * Adds mtm specific functions to the menu for multiselection |
|
374 * @param aMenuPane |
|
375 * @param aMenucommandId id of the command after mtm specific functions are added |
|
376 */ |
|
377 void AddMultiselectionMTMFunctionsL( CEikMenuPane& aMenuPane, TInt aMenuCommandId ); |
|
378 |
|
379 /** |
|
380 * Check mtm specific tecnology uid |
|
381 * @param aTechnologyType |
|
382 * @param aMtmType |
|
383 * Returns ETrue, if tecnologyUid match with mtm. |
|
384 */ |
|
385 TBool CheckTechnologyTypeFromMtm( const TUid aTechnologyType, TUid aMtmType ); |
|
386 |
|
387 /** |
|
388 * Checks if the message is set to be deleted from server |
|
389 * Returns ETrue, if the message is set to be deleted from server, EFalse otherwise |
|
390 */ |
|
391 TBool IsMailSetToBeDeletedFromServerL( TMsvId aItemId ); |
|
392 |
|
393 /** |
|
394 * Defines item to be anchored when entries are deleted or moved from entry list. |
|
395 */ |
|
396 void DefineAnchorIdL( const CMsvEntrySelection* aSelection ); |
|
397 |
|
398 /** |
|
399 * Return itemId that should be focused after deleting or moving some entries. |
|
400 */ |
|
401 TMsvId AnchoredItem(); |
|
402 |
|
403 /** |
|
404 * Set anchorId. |
|
405 * @param aAnchorId itemId that should be focused after deleting or moving some entries. |
|
406 */ |
|
407 void SetAnchorId( TMsvId aAnchorId ); |
|
408 |
|
409 public: // Functions from base classes |
|
410 /** |
|
411 * From CEikAppUi |
|
412 */ |
|
413 void HandleCommandL( TInt aCommand ); |
|
414 |
|
415 /** |
|
416 * From CEikAppUi |
|
417 */ |
|
418 void DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane ); |
|
419 |
|
420 /** |
|
421 * From MMsvSessionObserver |
|
422 */ |
|
423 virtual void HandleSessionEventL( |
|
424 TMsvSessionEvent aEvent, |
|
425 TAny* aArg1, |
|
426 TAny* aArg2, |
|
427 TAny* aArg3); |
|
428 |
|
429 /** |
|
430 * From CAknViewAppUi |
|
431 */ |
|
432 void ActivateLocalViewL( TUid aViewId ); |
|
433 |
|
434 /** |
|
435 * From MMceAccountManager |
|
436 */ |
|
437 TBool CreateNewAccountL( |
|
438 TUid aMessageType, |
|
439 TMsvId aOldServiceId ); |
|
440 |
|
441 /** |
|
442 * From MMceAccountManager |
|
443 */ |
|
444 void EditAccountL( TMsvId aId ); |
|
445 |
|
446 /** |
|
447 * From MMceAccountManager |
|
448 */ |
|
449 CUidNameArray* MtmAccountsL( TUid aType ); |
|
450 |
|
451 /** |
|
452 * From MMceAccountManager |
|
453 */ |
|
454 TBool CanCreateNewAccountL(TUid aMtm); |
|
455 |
|
456 /** |
|
457 * From MMceAccountManager |
|
458 */ |
|
459 void DeleteAccountL(TMsvId aId); |
|
460 |
|
461 /** |
|
462 * From MMceAccountManager |
|
463 */ |
|
464 CMsvSession& Session(); |
|
465 |
|
466 /** |
|
467 * From MMceAccountManager |
|
468 */ |
|
469 TBool IsPresent( TUid aMtm ) const; |
|
470 |
|
471 /** |
|
472 * From MMceAccountManager |
|
473 */ |
|
474 THumanReadableName MtmName( TUid aType ) const; |
|
475 |
|
476 /** |
|
477 * From MMceAccountManager |
|
478 */ |
|
479 void SetChangeMessageStore( TBool aChangeEnded ); |
|
480 |
|
481 /** |
|
482 * From MMtmUiDataRegistryObserver |
|
483 */ |
|
484 virtual CBaseMtmUiData* GetMtmUiDataL( TUid aEntryType ); |
|
485 |
|
486 /** |
|
487 * From MMsvSingleOpWatcher |
|
488 */ |
|
489 virtual void OpCompleted( |
|
490 CMsvSingleOpWatcher& aOpWatcher, |
|
491 TInt aCompletionCode ); |
|
492 |
|
493 /** |
|
494 * From MAknTabObserver |
|
495 */ |
|
496 void TabChangedL( TInt aIndex ); |
|
497 |
|
498 /** |
|
499 * From CEikAppUi |
|
500 */ |
|
501 void HandleResourceChangeL( TInt aType ); |
|
502 |
|
503 /** |
|
504 * From MConnectionMonitorObserver |
|
505 */ |
|
506 void EventL( const CConnMonEventBase &aConnMonEvent ); |
|
507 |
|
508 /** |
|
509 * From MCoeForegroundObserver |
|
510 */ |
|
511 void HandleGainingForeground(); // CR : 401-1806 |
|
512 |
|
513 /** |
|
514 * From MCoeForegroundObserver |
|
515 */ |
|
516 void HandleLosingForeground(); // CR : 401-1806 |
|
517 |
|
518 /** |
|
519 * MMS.Content.Upload |
|
520 */ |
|
521 void DoUploadL( TInt aCommand ); |
|
522 |
|
523 /** |
|
524 * MMS.Content.Upload query |
|
525 */ |
|
526 void ShowUploadQueryL( ); |
|
527 |
|
528 /** |
|
529 * MMS.Content.Upload query |
|
530 */ |
|
531 TInt NumUploadServices(); |
|
532 |
|
533 void HandleNotif(); |
|
534 |
|
535 void HandleNotif(const TMsvId& aMailbox); |
|
536 /** |
|
537 * Checks if the SIM access profile is connected or not. |
|
538 */ |
|
539 void CheckSIMAccessProfileL(); |
|
540 |
|
541 /** |
|
542 * Closes the open editors/viewers |
|
543 */ |
|
544 void CloseEditorApp(); |
|
545 |
|
546 /** |
|
547 * Checks if there has been a change in the screen resolution |
|
548 */ |
|
549 TBool ResourceChangeCalled(); |
|
550 |
|
551 /** |
|
552 * Resets the flag indicating that there has been a change in |
|
553 * the screen resolution |
|
554 */ |
|
555 void ResetResourceChange(); |
|
556 |
|
557 /** |
|
558 * Checks if the SyncML mailbox is being created |
|
559 */ |
|
560 TBool MailboxCreationOn(); |
|
561 |
|
562 private: |
|
563 |
|
564 /** |
|
565 * From CCoeAppUi |
|
566 * Observes left / right arrow keys to change active tab. |
|
567 */ |
|
568 TKeyResponse HandleKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType); |
|
569 |
|
570 /** |
|
571 * Symbian OS constructor. |
|
572 */ |
|
573 void ConstructL(); |
|
574 |
|
575 /** |
|
576 * User requested to create new folder under local. |
|
577 * Data query is displayed and folder created. |
|
578 */ |
|
579 void CreateNewFolderL(); |
|
580 |
|
581 /** |
|
582 * User requested to rename new folder under local. |
|
583 * Data query is displayed and folder renamed. |
|
584 */ |
|
585 void RenameFolderL(); |
|
586 |
|
587 /** |
|
588 * Displays query for foldername and also possible "Duplicate folder" error note. |
|
589 * @param aResourceId resource for the folder name query |
|
590 * @param aFolderName buffer for the folder name. If renaming then should include old name |
|
591 * @param aFolderId id of the folder if renaming. |
|
592 */ |
|
593 TBool FolderNameQueryL( |
|
594 const TInt aResourceId, |
|
595 TDes& aFolderName, |
|
596 const TMsvId aFolderId = KMsvNullIndexEntryIdValue ) const; |
|
597 |
|
598 /** |
|
599 * Calls UpdateMessageTypesArrayL |
|
600 */ |
|
601 void HandleMTMChangeL(); |
|
602 |
|
603 /** |
|
604 * Adds mtm specific functions to the menu |
|
605 * @param aMenuPane |
|
606 * @param aMenucommandId id of the command after mtm specific functions are added |
|
607 */ |
|
608 void AddMTMFunctionsL(CEikMenuPane& aMenuPane, TInt aMenuCommandId); |
|
609 |
|
610 /** |
|
611 * Gets the default service for mtm. |
|
612 * @param aMtm |
|
613 * @param aService will be filled to default account's id. |
|
614 */ |
|
615 TBool GetDefaultServiceL( TInt aMtm, TMsvId& aService, TUid& aMtmUid ); |
|
616 void GetDefaultServiceL( TInt aMtm, TMsvId& aService ); |
|
617 |
|
618 /** |
|
619 * Creates new message of type aMessageType. |
|
620 * @param aMessageType type of the message to be created. |
|
621 */ |
|
622 void CreateNewMessageL( TInt aMessageType ); |
|
623 |
|
624 /** |
|
625 * Launches settings dialog. |
|
626 */ |
|
627 void SettingsDialogL(); |
|
628 |
|
629 /** |
|
630 * Creates new entry |
|
631 * @param aParentId |
|
632 */ |
|
633 void CreateAndEditNewEntryL( TMsvId aParentId, TMsvEntry& aNewEntry ); |
|
634 |
|
635 /** |
|
636 * Creates new entry |
|
637 * @param aEntryType |
|
638 * @param aMtm |
|
639 * @param aParentId |
|
640 * @param aServiceId |
|
641 */ |
|
642 void CreateAndEditNewEntryL( |
|
643 TInt aEntryType, |
|
644 TUid aMtm, |
|
645 TMsvId aParentId, |
|
646 TMsvId aServiceId ); |
|
647 |
|
648 /** |
|
649 * Called by OpCompleted. |
|
650 * @param aOperation |
|
651 * @param aCompletionCode |
|
652 */ |
|
653 void DoOperationCompletedL( |
|
654 CMsvOperation* aOperation, |
|
655 TInt aCompletionCode ); |
|
656 |
|
657 /** |
|
658 * User requested to delete items. |
|
659 * Launches query and if accepted deletes items. |
|
660 */ |
|
661 void HandleDeleteL(); |
|
662 |
|
663 /** |
|
664 * User requested to undelete items. |
|
665 */ |
|
666 void HandleUndeleteL(); |
|
667 |
|
668 /** |
|
669 * User requested to move or copy message items. |
|
670 * Launches folder selection query and if accepted moves items. |
|
671 * @param aCopy: set ETrue if copying instead of moving. |
|
672 */ |
|
673 void MoveOrCopyEntriesL( TBool aCopy = EFalse ); |
|
674 |
|
675 /** |
|
676 * Sends selection immediately. |
|
677 * @param aSel Array of items to be sent. |
|
678 */ |
|
679 void SendSelectionL(CMsvEntrySelection* aSel); |
|
680 |
|
681 /** |
|
682 * Tries to send currently selected item immediately. |
|
683 */ |
|
684 void SendNowL(); |
|
685 |
|
686 /** |
|
687 * Cancels sending |
|
688 */ |
|
689 void CancelSendingL(); |
|
690 |
|
691 /** |
|
692 * Fetch new messages. |
|
693 */ |
|
694 void FetchNewL(); |
|
695 |
|
696 /** |
|
697 * Fetch selected messages. |
|
698 */ |
|
699 void FetchSelectedL(); |
|
700 |
|
701 /** |
|
702 * Fetch all the messages. |
|
703 */ |
|
704 void FetchAllL(); |
|
705 |
|
706 /** |
|
707 * @param aFunctionId |
|
708 */ |
|
709 void DoAsyncFunctionOnCurrentContextL(TInt aFunctionId); |
|
710 |
|
711 /** |
|
712 * @param aFunctionId |
|
713 * @param aSelection |
|
714 */ |
|
715 void DoAsyncFunctionOnCurrentContextL( |
|
716 TInt aFunctionId, CMsvEntrySelection& aSelection); |
|
717 |
|
718 /** |
|
719 * @param aFunctionId |
|
720 * @param aContext |
|
721 */ |
|
722 void DoAsyncFunctionL(TInt aFunctionId, const TMsvEntry& aContext); |
|
723 |
|
724 /** |
|
725 * @param aFunctionId |
|
726 * @param aSelection |
|
727 * @param aContext |
|
728 */ |
|
729 void DoAsyncFunctionL( |
|
730 TInt aFunctionId, |
|
731 CMsvEntrySelection& aSelection, |
|
732 const TMsvEntry& aContext ); |
|
733 |
|
734 /** |
|
735 * Checks if any connections are on. If there are connections on then |
|
736 * displays query to User to disconnect. Disconnects if user selects yes. |
|
737 */ |
|
738 void CloseConnectionsBeforeExitL(); |
|
739 |
|
740 /** |
|
741 * Returns array of the connected accounts. |
|
742 * Places array to the clean up stack. Calling function must delete the array. |
|
743 */ |
|
744 CMsvEntrySelection* ConnectedServicesLC(); |
|
745 |
|
746 /** |
|
747 * Fills TMsvEntry structure of the currently selected entry. |
|
748 * @param aEntry structure to be filled. |
|
749 * @param aOpenedFolder ETrue if opened folder info wanted |
|
750 * EFalse if currently selected (entry under 'cursor') |
|
751 * wanted. |
|
752 */ |
|
753 TBool GetCurrentEntryL(TMsvEntry& aEntry, TBool aOpenedFolder = EFalse) const; |
|
754 |
|
755 /** |
|
756 * Checks if mtm function is currently available |
|
757 * @param aFunction |
|
758 * @param aEntryToCheck |
|
759 */ |
|
760 TInt CheckMTMFunctionL( const TMsgFunctionInfo& aFunction, TMsvEntry& aEntryToCheck ); |
|
761 |
|
762 /** |
|
763 * Perform mtm function. |
|
764 * @param aFunction function to be executed. |
|
765 * @return none |
|
766 */ |
|
767 void HandleMTMFunctionL(const TMsgFunctionInfo& aFunction); |
|
768 |
|
769 /** |
|
770 * Opens next or previous message. |
|
771 */ |
|
772 void HandleOpenNextPreviousL( TBool aOpenNext = ETrue ); |
|
773 |
|
774 /** |
|
775 * Starts USSD editor application |
|
776 */ |
|
777 void LaunchServiceCommandEditorL() const; |
|
778 |
|
779 /** |
|
780 * Starts CBS application |
|
781 */ |
|
782 void LaunchCBSApplicationL(); |
|
783 |
|
784 /** |
|
785 * Performs 'Move back to Drafts' operation |
|
786 */ |
|
787 void MoveFromOutboxToDraftsL(); |
|
788 |
|
789 /** |
|
790 * Creates tabs. Should be called when opening folder. |
|
791 */ |
|
792 void CreateTabsL(); |
|
793 |
|
794 /** |
|
795 * Calls and traps ShowTabsL, ignores errors. |
|
796 * Used in CreateNewMessageL as TCleanupItem. |
|
797 * @param aAny: pointer to object of CMceUi. |
|
798 */ |
|
799 static void ShowTabs( TAny* aAny ); |
|
800 |
|
801 /** |
|
802 * Checks remote mailbox states and updates remote mailbox icons if connected |
|
803 * or not |
|
804 */ |
|
805 void CheckRemoteMailboxTabIconsL(); |
|
806 |
|
807 /** |
|
808 * Forces mtm loader to finish loading. |
|
809 */ |
|
810 void ForceMtmLoaderFinish(); |
|
811 |
|
812 /** |
|
813 * Closes connection to mailbox synchronously. Used when trying to exit application |
|
814 * when connected to one or more mailboxes. |
|
815 * @param aAccount account id to be disconnected. |
|
816 */ |
|
817 void GoOfflineSynchronouslyL( TMsvId aAccount ); |
|
818 |
|
819 /** |
|
820 * Resets iEditorOperation if leave occurs. |
|
821 * @param aAny: pointer to object of CMceUi. |
|
822 */ |
|
823 static void ResetEditorOperation( TAny* aAny ); |
|
824 |
|
825 /** |
|
826 * Check if free disk space goes under critical level, and leaves if it does |
|
827 */ |
|
828 void LeaveIfDiskSpaceUnderCriticalLevelL( TInt aBytesToWrite = 0 ); |
|
829 |
|
830 /** |
|
831 * Cancels RequestFreeDiskSpace if leave happens |
|
832 * on DeleteAccountL |
|
833 * @param aAny: pointer to object |
|
834 */ |
|
835 static void CancelFreeDiskSpaceRequest( TAny* aAny ); |
|
836 |
|
837 /** |
|
838 * returns ETrue if sms or mms message entry is connected or in sending state |
|
839 * @param aEntryId: id of the entry to be checked. |
|
840 */ |
|
841 TBool IsMessageSendingL( TMsvId aEntryId ) const; |
|
842 |
|
843 /** |
|
844 * Replies to sender/all |
|
845 * @param aReplyCommand: reply to sender or reply to all |
|
846 */ |
|
847 void ReplyL(TInt aReplyCommand); |
|
848 |
|
849 /** |
|
850 * Marks selected mail to read |
|
851 */ |
|
852 void MarkAsReadL( TBool aRead = ETrue ); |
|
853 |
|
854 /** |
|
855 * If mtm type is SyncMl, updates new message -dialog. |
|
856 * @param aSelection: entry selection |
|
857 * @param aEvent: event type |
|
858 */ |
|
859 void SyncMlNewMessageItemL( const CMsvEntrySelection* aSelection, TInt aEvent ); |
|
860 |
|
861 /** |
|
862 * Performs 'Move back to Drafts' operation to SyncMl outbox entry |
|
863 */ |
|
864 void SyncMlMoveFromOutboxToDraftsL( ); |
|
865 |
|
866 /** |
|
867 * Returns ETrue if always online is supported |
|
868 */ |
|
869 TBool AlwaysOnlineL( ); |
|
870 |
|
871 /** |
|
872 * Handles MMS notification delete |
|
873 * @param aParameter: parameter value |
|
874 */ |
|
875 void HandleMMSNotificationsDeleteL( TDes8& aParameter ); |
|
876 |
|
877 /** |
|
878 * Separates MMS notifications from selection |
|
879 * @param aSelection: pointer to selected entries |
|
880 */ |
|
881 void CheckMMSNotificationsL( CMsvEntrySelection* aSelection ); |
|
882 |
|
883 /** |
|
884 * Opens remote mailbox settings |
|
885 */ |
|
886 void OpenMailboxSettingsL( ); |
|
887 |
|
888 /** |
|
889 * Marks selected SyncML mail to read |
|
890 */ |
|
891 void SyncMlMarkAsReadL( ); |
|
892 |
|
893 /** |
|
894 * Checks if MMS notification delete failed |
|
895 */ |
|
896 void CheckMMSNotifDelFailedL(); |
|
897 |
|
898 /** |
|
899 * Checks CSP Cell Broadcast bit from SIM |
|
900 */ |
|
901 TBool CheckCspBitL() const; |
|
902 /** |
|
903 * Checks if csp is supported |
|
904 */ |
|
905 TBool CspBitsL( ); |
|
906 |
|
907 /** |
|
908 * Updates the application icon in the context pane |
|
909 */ |
|
910 void LoadContextIconL(); |
|
911 |
|
912 /** |
|
913 * Releases other that built-in mtm ui data objects. |
|
914 * So that it could be possible to install new version of some mtm |
|
915 * from inbox. |
|
916 */ |
|
917 void ReleaseMtmUiData(); |
|
918 |
|
919 /** |
|
920 * Shows the information note, when mail messages cannot be copied or moved. |
|
921 */ |
|
922 void InformationNoteCannotMoveCopyEMailL(); |
|
923 |
|
924 /** |
|
925 * Removes mail messages from the selection |
|
926 */ |
|
927 TBool RemoveEmailMessagesFromSelection( CMsvEntrySelection *aSelection ); |
|
928 |
|
929 /** |
|
930 * Forwards message to receiver |
|
931 * @param aForwardCommand: Forwards message to receiver |
|
932 * Since 3.2 |
|
933 */ |
|
934 void ForwardL(TInt aForwardCommand); |
|
935 |
|
936 /** |
|
937 * Changes local zoom level. |
|
938 * @param aZoomLevel: new local zoom value |
|
939 * @return Returns previous local zoom value |
|
940 * @since 3.2 |
|
941 */ |
|
942 TAknUiZoom ZoomLevelChangedL( TAknUiZoom aZoomLevel ); |
|
943 |
|
944 /** |
|
945 * Reads zoom level value from |
|
946 * Central Repository: KCRUidMuiuSettings, key: KMuiuZoomValue |
|
947 * @return Local zoom level saved in cenrep. |
|
948 * @since 3.2 |
|
949 */ |
|
950 TAknUiZoom ReadZoomLevelL(); |
|
951 |
|
952 /** |
|
953 * Saves zoom level value to |
|
954 * Central Repository: KCRUidMuiuSettings, key: KMuiuZoomValue |
|
955 * @param aZoomLevel: new local zoom value |
|
956 * @since 3.2 |
|
957 */ |
|
958 void WriteZoomLevelL( TAknUiZoom aZoomLevel ); |
|
959 |
|
960 /** |
|
961 * Called from HandleCommandL, changes zoom level and saves it to cen rep. |
|
962 * @param aCommand: command id (EMceCmdZoomValueAutomatic - EMceCmdZoomValueLarge) |
|
963 * @since 3.2 |
|
964 */ |
|
965 void HandleZoomLevelChangeL( TInt aCommand ); |
|
966 |
|
967 /** |
|
968 * Sets correct sub menu item selected when zoom submenu opened. |
|
969 * @param aMenuPane: menupane from DynInitMenuPaneL |
|
970 * @since 3.2 |
|
971 */ |
|
972 void HandleZoomSubMenu( CEikMenuPane* aMenuPane ); |
|
973 |
|
974 #ifdef RD_READ_MESSAGE_DELETION |
|
975 /** |
|
976 * CMceUi::HandleNewMsgToInboxL( removeNewFlag, selection, &flagChanged ); |
|
977 * Remove New Flag from selected message(s) if there is any |
|
978 * From 4.0 |
|
979 */ |
|
980 void HandleNewMsgToInboxL( TBool removeNewFlag, |
|
981 CMsvEntrySelection* aSelection ); |
|
982 #endif //RD_READ_MESSAGE_DELETION |
|
983 |
|
984 /** |
|
985 * TBool NewComingEmailL( TMsvId aFolderId ) |
|
986 * Check if there is new email in the folder |
|
987 * Returns ETrue if There is new email in the folder, otherwise returns EFalse |
|
988 * @para: Id of folder entry |
|
989 * Since 3.2 |
|
990 */ |
|
991 TBool HasNewEmailL( TMsvId aFolderId ); |
|
992 |
|
993 /** |
|
994 * Set disk space for move or copy messages |
|
995 * Since 3.1 |
|
996 **/ |
|
997 void SetDiskSpaceForMoveOrCopyL( ); |
|
998 |
|
999 /* |
|
1000 * Used for Fixed toolbar to get email type to launch email editor |
|
1001 */ |
|
1002 TInt GetToBeCreatedEmailType(); |
|
1003 |
|
1004 /** |
|
1005 * Checks if 'real' exit or just hiding needs to be done when performing user's exit command. |
|
1006 * @since S60 5.0 |
|
1007 */ |
|
1008 void HideOrExit(); |
|
1009 |
|
1010 /** |
|
1011 * Resets mce main view and then hides application from the ui. |
|
1012 * @since S60 5.0 |
|
1013 */ |
|
1014 void ResetAndHide(); |
|
1015 |
|
1016 /** |
|
1017 * Removes tabs and updates tabs array if those were active. |
|
1018 * Called when something changes in msg store root. |
|
1019 * @since S60 5.0 |
|
1020 */ |
|
1021 void RemoveTabsAndUpdateArray(); |
|
1022 |
|
1023 /** |
|
1024 * Checks for any IA updates. |
|
1025 */ |
|
1026 void CheckIAUpdate(); |
|
1027 /** |
|
1028 * CR:422-271 |
|
1029 * Set of Functions for decoding the .mms files from the hardcoded path |
|
1030 * @since S60 5.0 |
|
1031 */ |
|
1032 TInt PopulateMMSTemplates(); |
|
1033 |
|
1034 TInt DecodeAllMMSFromDirectoryL( TFileName& aFilePath, TMsvId aBoxid /*= KMsvDraftEntryId*/ ); |
|
1035 |
|
1036 TInt DecodeMMSFromFileL( TFileName& aFilePath, TMsvId aBoxId /*= KMsvDraftEntryId*/, TUint32 aFlags = 0 ); |
|
1037 |
|
1038 TInt FeedDataInChunks( CMmsCodecClient* aCodecClient ); |
|
1039 |
|
1040 void FillBufferFromFileL( const TDesC& aFilePath, RFs& aFs, CBufFlat* aEncodeBuffer ); |
|
1041 |
|
1042 public: |
|
1043 void OpenMtmMailboxViewL(const TMsvEntry& aEntry); |
|
1044 TBool FindMtmInVisibleListL( TUid aMtm, CArrayFix<TUid>& aListItemUids ); |
|
1045 /** |
|
1046 * Gets the status of iMsgDeletedStatus flag. |
|
1047 * @since S60 5.0 |
|
1048 */ |
|
1049 TInt GetMsgDeletedStatus(); |
|
1050 /** |
|
1051 * Sets iMsgDeletedStatus flag. |
|
1052 * @since S60 5.0 |
|
1053 */ |
|
1054 void SetMsgDeletedStatus(TBool aStatus); |
|
1055 TUid GetFsIntegratedEmailAppMtmPluginId(); |
|
1056 |
|
1057 |
|
1058 private: // Data |
|
1059 CMsvSession* iSession; |
|
1060 CMtmUiDataRegistry* iUiRegistry; |
|
1061 CMsvEntry* iEntry; |
|
1062 CMsvEntry* iRootEntry; |
|
1063 |
|
1064 CMtmStore* iMtmStore; |
|
1065 |
|
1066 CUidNameArray iMsgTypesWritePopup; |
|
1067 CUidNameArray iMsgTypesWriteSubmenu; |
|
1068 CUidNameArray iMsgTypesSettings; |
|
1069 CMsgFuncArray* iMTMFunctionsArray; |
|
1070 |
|
1071 CMsvSingleOpWatcherArray iOperations; |
|
1072 CMsvSingleOpWatcher* iEditorOperation; |
|
1073 |
|
1074 CMceMessageListView* iMceListView; |
|
1075 CMceDeliveryReportView* iMceDeliveryView; |
|
1076 CMceMainViewListView* iMceMainView; |
|
1077 TUint iMceActiveView; |
|
1078 |
|
1079 CMceSessionHolder* iSessionHolder; |
|
1080 |
|
1081 CMceBitmapResolver* iBitmapResolver; |
|
1082 |
|
1083 CMceConnectMailboxTimer* iConnectMailboxTimer; |
|
1084 |
|
1085 CMceLogEngine* iMceLogEngine; |
|
1086 CAknNavigationControlContainer* iNaviPane; |
|
1087 CAknNavigationDecorator* iDecoratedTabGroup; |
|
1088 CMsvEntrySelection* iTabsArray; |
|
1089 CMceIdleMtmLoader* iMtmLoader; |
|
1090 TMceFlags iMceUiFlags; |
|
1091 CErrorUI* iMceErrorUi; |
|
1092 CMsvSingleOpWatcher* iDeleteOperation; |
|
1093 CMsvSingleOpWatcher* iFetchNewOperation; |
|
1094 CMsvOperation* iBlockingOperation; |
|
1095 CAknLocalScreenClearer* iLocalScreenClearer; |
|
1096 CMceMailAccountItemArray* iMailAccountItemArray; |
|
1097 CAknNavigationDecorator* iFolderIndicator; |
|
1098 CMsvEntrySelection* iMMSNotifications; |
|
1099 CMceIAUpdateUtils* iMceIAUpdate; |
|
1100 |
|
1101 TBool iMessageStoreExist; |
|
1102 TBool iCancelFreeDiskSpaceRequest; |
|
1103 TBool iMemoryInUse; |
|
1104 TBool iAlwaysOnline; |
|
1105 RConnectionMonitor iConnectionMonitor; |
|
1106 // security data caging |
|
1107 TFileName iFilename; |
|
1108 TBool iCsp; |
|
1109 // MMS.Content.Upload |
|
1110 RPointerArray<CSendingServiceInfo> iUploadServices; |
|
1111 // NCN reset |
|
1112 CMceEmailNotifHandler *iEmailNotifHandler; |
|
1113 CAknQueryDialog* iPhoneMemoryQuery; |
|
1114 |
|
1115 TBool iResourceChangeCalled; |
|
1116 TMsvOp iMoveOrCopyMailOperation; |
|
1117 TBool iMailboxCreationOn; |
|
1118 TMsvOp iMailboxDeleteOperation; |
|
1119 // Owned: Pointer to email API object |
|
1120 CImumInternalApi* iEmailApi; |
|
1121 |
|
1122 #ifdef RD_READ_MESSAGE_DELETION |
|
1123 CMsvEntrySelection* iIdArray; |
|
1124 TBool iHandleNewMsgToInbox; |
|
1125 #endif // RD_READ_MESSAGE_DELETION |
|
1126 TMsvId iAnchorId; |
|
1127 TInt iDiskSpaceForMoveOrCopy; |
|
1128 CIdle* iCancelExitFlagOperation; |
|
1129 TBool iAudioMsgEnabled ; // CR : 401-1806 |
|
1130 TBool iPostcardEnabled ; // CR : 401-1806 |
|
1131 TBool iFeatureMgrEnabled ; // CR : 401-1806 |
|
1132 // ETrue if MCE integration feature is ON. In practice, this means |
|
1133 // that S60 mailboxes are hided from MCE main view |
|
1134 TBool iEmailClientIntegration; |
|
1135 |
|
1136 // ETrue if Selectable Default Email feature is on |
|
1137 TBool iSelectableEmail; |
|
1138 TBool iMsgDeletedStatus; |
|
1139 TBool iServerStarted ; |
|
1140 |
|
1141 /** |
|
1142 * CMail Changes, it will be ETrue if |
|
1143 * KFeatureIdFfEmailFramework is enabled |
|
1144 */ |
|
1145 TBool iEmailFramework; |
|
1146 //CR:422-271 |
|
1147 //iFs is needed for opening a .mms file from hardcoded path for mms templates |
|
1148 RFs iFs; |
|
1149 CBufFlat* iEncodeBuffer; |
|
1150 CMmsClientMtm* iMmsMtm; |
|
1151 /** |
|
1152 * Iad Update Feature Flag. |
|
1153 * It will be ETrue, if feature is enabled, |
|
1154 * otherwise EFalse |
|
1155 */ |
|
1156 TBool iIadUpdateVal; |
|
1157 //To check if simdialog is open or not |
|
1158 TBool iSimDialogOpen; |
|
1159 }; |
|
1160 |
|
1161 #endif |
|
1162 |
|
1163 // End of file |