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