|
1 /* |
|
2 * Copyright (c) 2006 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 * Common email MTM operation for launching editors |
|
16 * |
|
17 * |
|
18 */ |
|
19 |
|
20 |
|
21 #ifndef __IMUMEDITOPERATION_H__ |
|
22 #define __IMUMEDITOPERATION_H__ |
|
23 |
|
24 #include <msvstd.h> |
|
25 #include <MuiuMsgEditorLauncher.h> |
|
26 #include <ImumInternalApi.h> // CImumInternalApi |
|
27 #include "PROGTYPE.H" |
|
28 |
|
29 class CEikonEnv; |
|
30 class CBaseMtmUi; |
|
31 class CMsvEntrySelection; |
|
32 class MMsvProgressReporter; |
|
33 |
|
34 struct TEmailEditParams |
|
35 { |
|
36 TUint iPreferences; |
|
37 TFileName iEditorFileName; |
|
38 TEditorParameters iEditorParams; // Includes message Id. |
|
39 }; |
|
40 |
|
41 /** |
|
42 * class CImumEditOperation |
|
43 * |
|
44 * Common email MTM operation for launching editors. Encapsulates creating a |
|
45 * receipt if required. |
|
46 */ |
|
47 class CImumEditOperation : public CMsvOperation |
|
48 { |
|
49 public: |
|
50 /** |
|
51 * |
|
52 */ |
|
53 static CImumEditOperation* NewL( |
|
54 CImumInternalApi& aMailboxApi, |
|
55 TRequestStatus& aObserverRequestStatus, |
|
56 TUid aMtmType, |
|
57 const TEmailEditParams& aParams, |
|
58 TBool aAckReceipts); |
|
59 |
|
60 /** |
|
61 * Destructor |
|
62 */ |
|
63 virtual ~CImumEditOperation(); |
|
64 |
|
65 /** |
|
66 * From CMsvOperation |
|
67 */ |
|
68 virtual const TDesC8& ProgressL(); |
|
69 |
|
70 protected: |
|
71 /** |
|
72 * From CActive |
|
73 */ |
|
74 virtual void DoCancel(); |
|
75 |
|
76 /** |
|
77 * From CActive |
|
78 */ |
|
79 virtual void RunL(); |
|
80 |
|
81 private: |
|
82 /** |
|
83 * C++ constructor |
|
84 */ |
|
85 CImumEditOperation( |
|
86 CImumInternalApi& aMailboxApi, |
|
87 TRequestStatus& aObserverRequestStatus, |
|
88 TUid aMtmType, |
|
89 const TEmailEditParams& aParams ); |
|
90 |
|
91 /** |
|
92 * Symbian OS constructor |
|
93 */ |
|
94 void ConstructL(TBool aSendReceipts); |
|
95 |
|
96 |
|
97 /** |
|
98 * |
|
99 */ |
|
100 void DoLaunchEditorL(); |
|
101 |
|
102 private: |
|
103 enum TEditState { EStateIdle, EStateMakeReceipt, EStateLaunching }; |
|
104 TEditState iState; |
|
105 TEmailEditParams iEditParams; |
|
106 CMsvOperation* iOperation; |
|
107 CMsvEntry* iMsgEntry; |
|
108 TUid iActualMtm; |
|
109 TPckgBuf<TEmailEditProgress> iProgress; |
|
110 }; |
|
111 |
|
112 #endif |