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