|
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 wrapper operation |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 #ifndef __IMUMFETCHANDEDITOPERATION_H__ |
|
21 #define __IMUMFETCHANDEDITOPERATION_H__ |
|
22 |
|
23 #include <msvstd.h> |
|
24 #include "PROGTYPE.H" |
|
25 #include "ImumDiskSpaceObserverOperation.h" |
|
26 #include "ImumEditOperation.h" |
|
27 |
|
28 class CEikonEnv; |
|
29 class CBaseMtmUi; |
|
30 class CMsvEntrySelection; |
|
31 class MMsvProgressReporter; |
|
32 |
|
33 /** |
|
34 * class CImumFetchAndEditOperation |
|
35 * |
|
36 * Common email MTM wrapper operation that takes an active operation that |
|
37 * fetches a message, and launches an editor when the fetch completes. |
|
38 */ |
|
39 class CImumFetchAndEditOperation : |
|
40 public CImumDiskSpaceObserverOperation |
|
41 { |
|
42 public: |
|
43 /** |
|
44 * |
|
45 */ |
|
46 static CImumFetchAndEditOperation* NewL( |
|
47 CImumInternalApi& aMailboxApi, |
|
48 TRequestStatus& aObserverRequestStatus, |
|
49 MMsvProgressReporter& aReporter, |
|
50 const TEmailEditParams& aParams, |
|
51 TBool aAckReceipts); |
|
52 |
|
53 /** |
|
54 * |
|
55 */ |
|
56 virtual ~CImumFetchAndEditOperation(); |
|
57 |
|
58 /** |
|
59 * For reporting DoRunL leaves. |
|
60 */ |
|
61 virtual const TDesC8& GetErrorProgressL(TInt aError); |
|
62 |
|
63 /** |
|
64 * |
|
65 */ |
|
66 void SetFetchOpL(CMsvOperation* aFetchOp); |
|
67 |
|
68 /** |
|
69 * |
|
70 */ |
|
71 TRequestStatus& RequestStatus(); |
|
72 |
|
73 protected: |
|
74 |
|
75 /** |
|
76 * |
|
77 */ |
|
78 virtual void DoRunL(); |
|
79 private: |
|
80 /** |
|
81 * |
|
82 */ |
|
83 CImumFetchAndEditOperation( |
|
84 CImumInternalApi& aMailboxApi, |
|
85 TRequestStatus& aObserverRequestStatus, |
|
86 MMsvProgressReporter& aReporter, |
|
87 const TEmailEditParams& aParams, |
|
88 TBool aAckReceipts); |
|
89 |
|
90 /** |
|
91 * |
|
92 */ |
|
93 void DoEditL(); |
|
94 |
|
95 private: |
|
96 enum TFetchAndEditState { EStateIdle, EStateFetching, EStateEditing, EStateComplete }; |
|
97 TFetchAndEditState iState; |
|
98 TEmailEditParams iEditParams; |
|
99 TUid iActualMtm; |
|
100 TPckgBuf<TMsvLocalOperationProgress> iLocalProgress; |
|
101 TBool iAckReceipts; |
|
102 }; |
|
103 |
|
104 #endif |
|
105 |
|
106 // End of File |