|
1 /* |
|
2 * Copyright (c) 2007 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: declares compose view |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef __CNCSCOMPOSEVIEW_H__ |
|
21 #define __CNCSCOMPOSEVIEW_H__ |
|
22 |
|
23 #include "cfsmailcommon.h" |
|
24 #include "mfsmailrequestobserver.h" |
|
25 #include <alf/alfenv.h> |
|
26 #include "AknServerApp.h" |
|
27 #include <AknProgressDialog.h> |
|
28 #include <MsgAttachmentUtils.h> |
|
29 |
|
30 #include "FreestyleEmailUiViewBase.h" |
|
31 #include "FreestyleEmailUiConstants.h" |
|
32 #include "FSComposerFetchLogic.h" |
|
33 #include "FreestyleEmailUi.hrh" |
|
34 #include "cmailcustomstatuspaneindicators.h" |
|
35 |
|
36 class CNcsComposeViewContainer; |
|
37 class CFSMailClient; |
|
38 class CAlfControl; |
|
39 class CAlfAnchorLayout; |
|
40 class CFSMailBox; |
|
41 class CFSMailMessage; |
|
42 class CFSMailMessagePart; |
|
43 class CNcsEmailAddressObject; |
|
44 class CFSMailAddress; |
|
45 class CFSEmailCRHandler; |
|
46 class CFreestyleEmailUiAppUi; |
|
47 class CAlfEnv; |
|
48 class CFreestyleEmailUiSendAttachmentsListControl; |
|
49 class CMsvSession; |
|
50 class CAknsLayeredBackgroundControlContext; |
|
51 class CFsAutoSaver; |
|
52 class CAknWaitDialog; |
|
53 class CActiveHelper; |
|
54 class CAknStylusPopUpMenu; |
|
55 class CAknToolbarExtension; |
|
56 |
|
57 |
|
58 const TInt KErrNcsComposeViewNotReady = KErrNotReady - 1000; |
|
59 |
|
60 /** |
|
61 * CNcsComposeView view class. |
|
62 */ |
|
63 class CNcsComposeView: |
|
64 public CFsEmailUiViewBase, |
|
65 public MAlfActionObserver, |
|
66 public MComposerFetchLogicCallback, |
|
67 public MProgressDialogCallback, |
|
68 public MAknServerAppExitObserver |
|
69 { |
|
70 |
|
71 private: |
|
72 |
|
73 /** |
|
74 * Type of commit |
|
75 */ |
|
76 enum TCommitType |
|
77 { |
|
78 // This is transient commit, message may get further modifications |
|
79 ETransient, |
|
80 // This is final commit, no more incoming changes |
|
81 EFinal |
|
82 }; |
|
83 |
|
84 public: // constructors and destructor |
|
85 |
|
86 /** |
|
87 * NewL. |
|
88 * Two-phased constructor. |
|
89 * Construct a CNcsComposeView for the AVKON application aApp. |
|
90 * Using two phase construction,and return a pointer to the created object |
|
91 * @return a pointer to the created instance of CNcsComposeView |
|
92 */ |
|
93 static CNcsComposeView* NewL( |
|
94 CFSMailClient& aMailClient, |
|
95 CAlfEnv& aEnv, |
|
96 CFreestyleEmailUiAppUi* aAppUi, |
|
97 CAlfControlGroup& aControlGroup, |
|
98 CMsvSession& aMsvSession ); |
|
99 |
|
100 /** |
|
101 * NewLC. |
|
102 * Two-phased constructor. |
|
103 * Construct a CNcsComposeView for the AVKON application aApp. |
|
104 * Using two phase construction,and return a pointer to the created object |
|
105 * @return a pointer to the created instance of CNcsComposeView |
|
106 */ |
|
107 static CNcsComposeView* NewLC( |
|
108 CFSMailClient& aMailClient, |
|
109 CAlfEnv& aEnv, |
|
110 CFreestyleEmailUiAppUi* aAppUi, |
|
111 CAlfControlGroup& aControlGroup, |
|
112 CMsvSession& aMsvSession ); |
|
113 |
|
114 /** |
|
115 * ~CNcsComposeView. |
|
116 * Virtual Destructor. |
|
117 */ |
|
118 virtual ~CNcsComposeView(); |
|
119 |
|
120 // Exit preparation function. |
|
121 void PrepareForExit(); |
|
122 |
|
123 public: // from CFsEmailUiViewBase |
|
124 |
|
125 /** |
|
126 * Id |
|
127 * @return Id Uid value |
|
128 */ |
|
129 TUid Id() const; |
|
130 |
|
131 /** |
|
132 * HandleCommandL |
|
133 * From CAknView, takes care of command handling. |
|
134 * @param aCommand Command to be handled |
|
135 */ |
|
136 void HandleCommandL( TInt aCommand ); |
|
137 |
|
138 /** |
|
139 * ChildDoDeactivate |
|
140 * Deactivate an AknView |
|
141 * Remove the container class instance from the App UI's stack and |
|
142 * deletes the instance |
|
143 */ |
|
144 void ChildDoDeactivate(); |
|
145 |
|
146 /** |
|
147 * DynInitMenuPaneL |
|
148 * Called by the framework before menu is shown to |
|
149 * show/hide items dynamically. |
|
150 * @param aResourceId The Id of the menu pane. |
|
151 * @param aMenuPane The menu pane. |
|
152 */ |
|
153 void DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane ); |
|
154 |
|
155 /** |
|
156 * HandleDynamicVariantSwitchL |
|
157 * Recalculates component layout |
|
158 */ |
|
159 void HandleDynamicVariantSwitchL( |
|
160 CFsEmailUiViewBase::TDynamicSwitchType aType ); |
|
161 /** |
|
162 * to hide or show CAlfVisuals ( used for activation or deactivation ) |
|
163 */ |
|
164 virtual void FadeOut( TBool aDirectionOut ); |
|
165 |
|
166 public: // from MAlfActionObserver |
|
167 |
|
168 void HandleActionL( const TAlfActionCommand& aActionCommand ); |
|
169 |
|
170 public: // from MComposerFetchLogicCallback |
|
171 |
|
172 TBool FetchLogicComplete( TComposerFetchState aState, TInt aError ); |
|
173 |
|
174 public: // new functions |
|
175 |
|
176 /** |
|
177 * LaunchStylusPopupMenu |
|
178 * Show stylus popup menu for the attachments line |
|
179 */ |
|
180 void LaunchStylusPopupMenu( const TPoint& aPenEventScreenLocation ); |
|
181 |
|
182 /** |
|
183 * AttachmentsListControl |
|
184 * Returns pointer to attachment list control |
|
185 */ |
|
186 CFreestyleEmailUiSendAttachmentsListControl* AttachmentsListControl(); |
|
187 |
|
188 /** |
|
189 * NewMessage |
|
190 * Returns pointer to current composer message |
|
191 */ |
|
192 CFSMailMessage* NewMessage(); |
|
193 |
|
194 /** |
|
195 * Commits changes to message. This method sets the field contents from |
|
196 * the UI to the message object, but does not save the message unless |
|
197 * explicitely requested. |
|
198 */ |
|
199 void CommitL( TBool aParseAddresses = ETrue, |
|
200 TFieldToCommit aFieldToCommit = EAllFields, |
|
201 TBool aSaveNow = EFalse, |
|
202 TCommitType aType = ETransient ); |
|
203 |
|
204 /** |
|
205 * Saves the message content, if it has been changed since the last save. |
|
206 */ |
|
207 TInt SaveMessage(); |
|
208 void SaveMessageL(); |
|
209 |
|
210 void DialogDismissedL( TInt aButtonId ); |
|
211 |
|
212 void ShowFetchingWaitNoteL(); |
|
213 |
|
214 TBool IsPreparedForExit(); |
|
215 |
|
216 void AsyncExitL(); |
|
217 |
|
218 void HandleContainerChangeRequiringToolbarRefresh(); |
|
219 |
|
220 /** |
|
221 * Callback method for setting body content in asynchronous way. |
|
222 */ |
|
223 void SetBodyContentComplete(); |
|
224 |
|
225 /** |
|
226 * Checks if "Opening" wait note is visible. |
|
227 */ |
|
228 TBool IsOpeningWaitNoteVisible(); |
|
229 |
|
230 protected: |
|
231 |
|
232 void ProcessCommandL( TInt aCommand ); |
|
233 |
|
234 private: // from |
|
235 |
|
236 /** |
|
237 * @see CFsEmailUiViewBase::ChildDoActivateL |
|
238 */ |
|
239 void ChildDoActivateL( const TVwsViewId& aPrevViewId, |
|
240 TUid aCustomMessageId, |
|
241 const TDesC8& aCustomMessage ); |
|
242 |
|
243 /** |
|
244 * From MAknToolbarObserver. |
|
245 */ |
|
246 void DynInitToolbarL( TInt aResourceId, CAknToolbar* aToolbar ); |
|
247 |
|
248 /** |
|
249 * @see CFsEmailUiViewBase::OfferToolbarEventL |
|
250 */ |
|
251 void OfferToolbarEventL( TInt aCommand ); |
|
252 |
|
253 /** |
|
254 * @see CFsEmailUiViewBase::ToolbarResourceId |
|
255 */ |
|
256 TInt ToolbarResourceId() const; |
|
257 |
|
258 /** |
|
259 * @see CFsEmailUiViewBase::GetInitiallyDimmedItemsL |
|
260 */ |
|
261 void GetInitiallyDimmedItemsL( const TInt aResourceId, |
|
262 RArray<TInt>& aDimmedItems ) const; |
|
263 |
|
264 /** |
|
265 * Update toolbar items. |
|
266 */ |
|
267 void RefreshToolbar(); |
|
268 |
|
269 private: // new functions |
|
270 |
|
271 /** |
|
272 * HandleActivationCommandL |
|
273 * Called from DoActivateL() to do the part of view activation which depends on the |
|
274 * activation command given in TUid argument. |
|
275 */ |
|
276 void HandleActivationCommandL( TUid aCustomMessageId ); |
|
277 |
|
278 /** |
|
279 * DoSaveDraftL |
|
280 * Saves message to drafts |
|
281 * @param aAskUser If ETrue asks user whether to save. |
|
282 * @return ETrue if option was select and |
|
283 * EFalse if Cancel was pressed, or if saving failed. |
|
284 */ |
|
285 TBool DoSaveDraftL( TBool aAskUser ); |
|
286 |
|
287 /** |
|
288 * DoSendL |
|
289 * Sends email message. |
|
290 */ |
|
291 void DoSendL(); |
|
292 |
|
293 enum TExitMode |
|
294 { |
|
295 ESaveDraftQuery, |
|
296 ESaveDraft, |
|
297 ENoSave |
|
298 }; |
|
299 |
|
300 /** |
|
301 * DoSafeExit |
|
302 */ |
|
303 void DoSafeExit( TExitMode aMode=ESaveDraftQuery ); |
|
304 |
|
305 /** |
|
306 * DoExitL |
|
307 * Handler called when exiting the view. |
|
308 */ |
|
309 void DoExitL( TExitMode aMode=ESaveDraftQuery ); |
|
310 |
|
311 /** |
|
312 * DoOpenAttachmentListL |
|
313 * Saves current editor message to drafts and opens |
|
314 * attachment list |
|
315 */ |
|
316 void DoOpenAttachmentListL(); |
|
317 |
|
318 /** |
|
319 * SetAttachmentLabelContent |
|
320 * Set files from model to view label |
|
321 */ |
|
322 void SetAttachmentLabelContentL(); |
|
323 |
|
324 /** |
|
325 * GetAttachmentsFromMail |
|
326 * get list of attachments from mail |
|
327 */ |
|
328 void GetAttachmentsFromMailL(); |
|
329 |
|
330 /** |
|
331 * FileExistsInModel |
|
332 * Check for duplicates in model when reading attachments from mail |
|
333 */ |
|
334 TBool FileExistsInModel( TFSMailMsgId aAttachmentId ); |
|
335 |
|
336 /** |
|
337 * DoQuickTextL |
|
338 * Display the Quick Text dialog |
|
339 */ |
|
340 void DoQuickTextL(); |
|
341 |
|
342 /** |
|
343 * AsyncAddAttachment |
|
344 * Add attachment file to message |
|
345 */ |
|
346 static TInt AsyncAddAttachment( TAny* aSelfPtr ); |
|
347 |
|
348 /** |
|
349 * RunFollowUpFlagDlgL() |
|
350 * Query user for followup flag |
|
351 */ |
|
352 void RunFollowUpFlagDlgL(); |
|
353 |
|
354 /** |
|
355 * InitFieldsL |
|
356 * Inits fields with message data. |
|
357 */ |
|
358 void InitFieldsL(); |
|
359 |
|
360 /** |
|
361 * InitReplyFieldsL |
|
362 * Inits fields when composing reply message. |
|
363 * @param aReplyAll ETrue if this is replyall message. |
|
364 */ |
|
365 void InitReplyFieldsL( TBool aReplyAll ); |
|
366 |
|
367 /** |
|
368 * RemoveOwnAddress |
|
369 * Removes own address while doing reply all. |
|
370 * @param aAddressList The address list. |
|
371 */ |
|
372 void RemoveOwnAddress( |
|
373 RPointerArray<CNcsEmailAddressObject>& aAddressList ); |
|
374 |
|
375 /** |
|
376 * InitForwardFieldsL |
|
377 * Inits fields when composing forward message. |
|
378 */ |
|
379 void InitForwardFieldsL(); |
|
380 |
|
381 /** |
|
382 * IncludeMessageTextL |
|
383 * Inits body text when forwarding, replying, or opening draft message. |
|
384 * @param aEnsureEmptyLineInBegin When true, the function ensures there's |
|
385 * empty lines in the beginning of the |
|
386 * message. I.e. line break(s) are inserted |
|
387 * in front of any quote or signature |
|
388 */ |
|
389 void IncludeMessageTextL( TBool aEnsureSpaceInBegin = EFalse ); |
|
390 |
|
391 /** |
|
392 * Async version of IncludeMessageTextL. |
|
393 * Inits body text async when forwarding, replying message. |
|
394 * @param aEnsureEmptyLineInBegin When true, the function ensures there's empty lines |
|
395 * in the beginning of the message. I.e. line break(s) |
|
396 * are inserted in front of any quote or signature |
|
397 */ |
|
398 void IncludeMessageTextAsyncL( TBool aEnsureSpaceInBegin = EFalse ); |
|
399 |
|
400 /** |
|
401 * SetPriority |
|
402 * Sets priority when using saved draft. |
|
403 */ |
|
404 void SetPriority(); |
|
405 |
|
406 /** |
|
407 * Sets follow-up flag to status pane indicator from draft message. |
|
408 */ |
|
409 void SetFollowUp(); |
|
410 |
|
411 /** |
|
412 * GetMessageBodyL |
|
413 * Gets message body in a buffer. |
|
414 * @return Message body |
|
415 */ |
|
416 HBufC* GetMessageBodyL(); |
|
417 |
|
418 /** |
|
419 * ReturnToPreviousViewL |
|
420 * Exit editor and return to previous view |
|
421 */ |
|
422 void ReturnToPreviousViewL(); |
|
423 |
|
424 /** |
|
425 * FetchTextPartL |
|
426 * Fetch text part |
|
427 * @param aMsg The message whiches text part is to be fetched |
|
428 */ |
|
429 void FetchTextPartL( CFSMailMessage& aMsg ); |
|
430 |
|
431 /** |
|
432 * Do the needed initializations for reply/reply all/forward commands |
|
433 * depending on the iCustomMessageId. |
|
434 */ |
|
435 void InitReplyOrForwardUiL(); |
|
436 |
|
437 /** |
|
438 * GenerateReplyMessageL |
|
439 * Creates reply message |
|
440 * @param aReplyAll ETrue for reply all and EFalse for reply |
|
441 */ |
|
442 void GenerateReplyMessageL( TBool aReplyAll ); |
|
443 |
|
444 /** |
|
445 * InitReplyUiL |
|
446 * Inits UI in reply case |
|
447 * @param aReplyAll ETrue for reply all and EFalse for reply |
|
448 */ |
|
449 void InitReplyUiL( TBool aReplyAll ); |
|
450 |
|
451 /** |
|
452 * GenerateForwardMessageL |
|
453 * Creates forward message |
|
454 */ |
|
455 void GenerateForwardMessageL(); |
|
456 |
|
457 /** |
|
458 * InitForwardUiL |
|
459 * Inits UI in forward case |
|
460 */ |
|
461 void InitForwardUiL(); |
|
462 |
|
463 /** |
|
464 * InitUiGeneralL |
|
465 * Inits UI in general case |
|
466 */ |
|
467 void InitUiGeneralL(); |
|
468 /** |
|
469 * GenerateReplyHeaderLC |
|
470 * Creates header lines for reply/forward message |
|
471 * @return Reply header |
|
472 */ |
|
473 HBufC* GenerateReplyHeaderLC(); |
|
474 |
|
475 /** |
|
476 * GenerateSmartTagLC |
|
477 * Creates smart reply/forward tag |
|
478 * @return Smart tag |
|
479 */ |
|
480 HBufC* GenerateSmartTagLC(); |
|
481 |
|
482 /** |
|
483 * SetReplyForwardFlagL |
|
484 * Set reply/forward flag into original message if needed |
|
485 */ |
|
486 void SetReplyForwardFlagL(); |
|
487 |
|
488 /** |
|
489 * MailBoxSupportsSmartReply |
|
490 * @return ETrue if mailbox supports smart reply |
|
491 */ |
|
492 TBool MailBoxSupportsSmartReply(); |
|
493 |
|
494 /** |
|
495 * MailBoxSupportsSmartForward |
|
496 * @return ETrue if the mailbox supports smart forward |
|
497 */ |
|
498 TBool MailBoxSupportsSmartForward(); |
|
499 |
|
500 /** |
|
501 * HasUnfetchedAttachmentsL |
|
502 * @param aMsg Message to be tested |
|
503 * @return ETrue if the message has unfetched attachments |
|
504 */ |
|
505 TBool HasUnfetchedAttachmentsL( CFSMailMessage& aMsg ); |
|
506 |
|
507 /** |
|
508 * SaveToDraftsL |
|
509 * @param aParseAddresses ETrue to parse text in address fields now |
|
510 */ |
|
511 void SaveToDraftsL( TBool aParseAddresses ); |
|
512 |
|
513 void ExitComposer(); |
|
514 |
|
515 void CreateContainerL(); |
|
516 |
|
517 void ResetComposer(); |
|
518 |
|
519 void SaveAndCleanPreviousMessage(); |
|
520 |
|
521 // First start function to improve app loading perf. |
|
522 void DoFirstStartL(); |
|
523 |
|
524 static TInt AsyncExit( TAny* aSelfPtr ); |
|
525 |
|
526 // Gets button from toolbar extension. |
|
527 CAknButton* Button( TInt aCmdId, |
|
528 CAknToolbarExtension* aExtension = NULL ); |
|
529 TBool WLANConnectionActive(); |
|
530 |
|
531 private: // Constructors and destructor |
|
532 |
|
533 /** |
|
534 * CNcsComposeView |
|
535 * C++ default constructor. |
|
536 * @param aAppUi App UI |
|
537 * @param aEnv Alfred environment |
|
538 * @param aSendAttachmentControlGroup Send attachment control group |
|
539 * @param aMailClient Email framework client object. |
|
540 * @param aBgControl Background control. |
|
541 */ |
|
542 CNcsComposeView( CFreestyleEmailUiAppUi& aAppUi, |
|
543 CAlfEnv& aEnv, |
|
544 CAlfControlGroup& aControlGroup, |
|
545 CFSMailClient& aMailClient, |
|
546 CMsvSession& aMsvSession ); |
|
547 |
|
548 /** |
|
549 * ConstructL |
|
550 * 2nd phase constructor. |
|
551 */ |
|
552 void ConstructL(); |
|
553 |
|
554 private: // data |
|
555 |
|
556 /** |
|
557 * control container |
|
558 */ |
|
559 CNcsComposeViewContainer* iContainer; |
|
560 |
|
561 /** |
|
562 * view identifier |
|
563 */ |
|
564 TUid iIdentifier; |
|
565 |
|
566 /** |
|
567 * email framework client |
|
568 */ |
|
569 CFSMailClient& iMailClient; |
|
570 |
|
571 /** |
|
572 * email framework mailbox |
|
573 */ |
|
574 CFSMailBox* iMailBox; |
|
575 |
|
576 /** |
|
577 * original message |
|
578 */ |
|
579 CFSMailMessage* iOrigMessage; |
|
580 |
|
581 /** |
|
582 * new message |
|
583 */ |
|
584 CFSMailMessage* iNewMessage; |
|
585 |
|
586 /** |
|
587 * new message text part |
|
588 */ |
|
589 CFSMailMessagePart* iNewMessageTextPart; |
|
590 |
|
591 /** |
|
592 * central repository handler |
|
593 */ |
|
594 CFSEmailCRHandler* iCrHandler; |
|
595 |
|
596 /** |
|
597 * launch parameters |
|
598 */ |
|
599 TEditorLaunchParams iLaunchParams; |
|
600 |
|
601 /** |
|
602 * flag to indicate on exit whether mail was sent |
|
603 */ |
|
604 TBool iMailSent; |
|
605 |
|
606 /** |
|
607 * flag to indicate on exit whether mail sending failed |
|
608 */ |
|
609 TBool iMailSendFailed; |
|
610 |
|
611 /** |
|
612 * error code for fetching message, KErrNone if fetched succesfully |
|
613 */ |
|
614 TInt iMailFetchingErrCode; |
|
615 |
|
616 /** |
|
617 * flag to indicate whether view is ready to handle user commands |
|
618 */ |
|
619 TBool iViewReady; |
|
620 |
|
621 /** |
|
622 * flag to indicate is save to draft called by attachment list |
|
623 */ |
|
624 TBool iAttachmentListSaveDraft; |
|
625 |
|
626 /** |
|
627 * session to messaging server |
|
628 */ |
|
629 CMsvSession& iMsvSession; |
|
630 |
|
631 /** |
|
632 * stored TUid passes to DoActivateL |
|
633 */ |
|
634 TUid iCustomMessageId; |
|
635 |
|
636 /** |
|
637 * background size |
|
638 */ |
|
639 TSize iBackgroundImageSize; |
|
640 |
|
641 /** |
|
642 * alfred environment |
|
643 */ |
|
644 CAlfEnv& iEnv; |
|
645 |
|
646 /** |
|
647 * autosave |
|
648 */ |
|
649 CFsAutoSaver* iAutoSaver; |
|
650 |
|
651 /** |
|
652 * fetch logic |
|
653 */ |
|
654 CFsComposerFetchLogic* iFetchLogic; |
|
655 |
|
656 TBool iFirstStartCompleted; |
|
657 |
|
658 /** |
|
659 * dialog query (send or delete) |
|
660 */ |
|
661 CAknListQueryDialog* iDlg; |
|
662 |
|
663 /** |
|
664 * checkquery (send or delete) |
|
665 */ |
|
666 TBool iCheckQuery; |
|
667 |
|
668 CAsyncCallBack* iAsyncCallback; |
|
669 |
|
670 CAknWaitDialog* iFetchWaitDialog; //<cmail> |
|
671 |
|
672 //when some plugin makes fake sync, we need these |
|
673 TBool iFakeSyncGoingOn; |
|
674 TBool iFetchDialogCancelled; |
|
675 CActiveHelper* iActiveHelper; |
|
676 |
|
677 // For the fake synchronous operations of the mail plugin run in DoExitL |
|
678 // we need to knwo when the method is running and block all the commands |
|
679 // during that time. |
|
680 TBool iExecutingDoExitL; |
|
681 |
|
682 CAsyncCallBack* iAsyncAttachmentAdd; |
|
683 MsgAttachmentUtils::TMsgAttachmentFetchType iAttachmentAddType; |
|
684 |
|
685 // Status pane indicators (priority and followup) |
|
686 CCustomStatuspaneIndicators* iStatusPaneIndicators; |
|
687 |
|
688 // Popup menu for attachment list. |
|
689 CAknStylusPopUpMenu* iStylusPopUpMenu; |
|
690 |
|
691 // Flag to indicate whether message text part has been modified. |
|
692 TBool iMessageTextPartModified; |
|
693 |
|
694 // Flag to indicate whether message has been modified. |
|
695 TBool iMessageModified; |
|
696 |
|
697 /** |
|
698 * Flag indicating async way of inluding message body text. |
|
699 */ |
|
700 TBool iIncludeMessageTextAsync; |
|
701 |
|
702 /** |
|
703 * Buffer for text of message's body. |
|
704 * Own. |
|
705 */ |
|
706 HBufC* iBody; |
|
707 |
|
708 /** |
|
709 * Flag indicating that view was fully activated. |
|
710 */ |
|
711 TBool iViewFullyActivated; |
|
712 |
|
713 /** |
|
714 * Flag indicating that "Opening" wait note is visible. |
|
715 */ |
|
716 TBool iOpeningWaitNoteVisible; |
|
717 |
|
718 /** |
|
719 * "Opening" wait dialog. |
|
720 */ |
|
721 CAknWaitDialog* iOpeningWaitDialog; |
|
722 |
|
723 /** |
|
724 * Flag indicating that adding attachment dialog is opened. |
|
725 */ |
|
726 TBool iAddingAttachmentDialogOpened; |
|
727 }; |
|
728 |
|
729 /** |
|
730 * This class is used by CNcsComposeView for waiting its own async tasks. |
|
731 * |
|
732 * @since S60 v3.2 |
|
733 */ |
|
734 class CActiveHelper : public CActive |
|
735 { |
|
736 public: // public functions |
|
737 |
|
738 /** |
|
739 * Default 1st phase factory method. |
|
740 * Creates an instance of CCacheSessionActiveHelper |
|
741 * |
|
742 * @return created instance of the CCacheSessionActiveHelper |
|
743 */ |
|
744 static CActiveHelper* NewL( CNcsComposeView* aComposeView ); |
|
745 |
|
746 /** |
|
747 * Destructor |
|
748 */ |
|
749 ~CActiveHelper( ); |
|
750 |
|
751 /** |
|
752 * Active object start |
|
753 */ |
|
754 void Start(); |
|
755 |
|
756 private: // private functions |
|
757 |
|
758 /** |
|
759 * Constructor |
|
760 */ |
|
761 CActiveHelper( CNcsComposeView* aSession ); |
|
762 |
|
763 /** |
|
764 * Active object RunL |
|
765 */ |
|
766 void RunL(); |
|
767 |
|
768 /** |
|
769 * Active object DoCancel |
|
770 */ |
|
771 void DoCancel(); |
|
772 |
|
773 /** |
|
774 * ConstructL |
|
775 */ |
|
776 void ConstructL(); |
|
777 |
|
778 /** |
|
779 * pointer to CNcsComposeView doesnt own |
|
780 */ |
|
781 CNcsComposeView* iComposeView; |
|
782 |
|
783 }; |
|
784 |
|
785 #endif // CNCSCOMPOSEVIEW_H |
|
786 |
|
787 |
|
788 // End of File |