|
1 /* |
|
2 * Copyright (c) 2007-2008 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: IMAP4 populate messages operation |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef __IPSPLGIMAP4POPULATEOP_H__ |
|
19 #define __IPSPLGIMAP4POPULATEOP_H__ |
|
20 |
|
21 #include "ipsplgonlineoperation.h" |
|
22 |
|
23 class CIpsPlgEventHandler; |
|
24 |
|
25 /** |
|
26 * class CIpsPlgImap4PopulateOp |
|
27 * |
|
28 */ |
|
29 |
|
30 class CIpsPlgImap4PopulateOp : |
|
31 public CIpsPlgOnlineOperation |
|
32 { |
|
33 public: |
|
34 |
|
35 /** |
|
36 * NewL() |
|
37 * Basic factory function - creates dialog with standard title resource |
|
38 * @param CMsvSession& |
|
39 * |
|
40 * |
|
41 * |
|
42 * |
|
43 * |
|
44 * |
|
45 * @return CIpsPlgImap4PopulateOperation* self pointer |
|
46 */ |
|
47 |
|
48 IMPORT_C static CIpsPlgImap4PopulateOp* NewL( |
|
49 CMsvSession& aMsvSession, |
|
50 TRequestStatus& aObserverRequestStatus, |
|
51 TInt aPriority, |
|
52 TMsvId aService, |
|
53 CIpsPlgTimerOperation& aActivityTimer, |
|
54 const TImImap4GetPartialMailInfo& aPartialMailInfo, |
|
55 const CMsvEntrySelection& aSel, |
|
56 TFSMailMsgId aFSMailBoxId, |
|
57 MFSMailRequestObserver& aFSOperationObserver, |
|
58 TInt aFSRequestId, |
|
59 CIpsPlgEventHandler* aEventHandler, |
|
60 TBool aDoFilterSelection = ETrue ); |
|
61 |
|
62 /** |
|
63 * ~CIpsPlgImap4PopulateOp() |
|
64 * destructor |
|
65 */ |
|
66 |
|
67 virtual ~CIpsPlgImap4PopulateOp(); |
|
68 |
|
69 /** |
|
70 * |
|
71 */ |
|
72 const TDesC8& ProgressL(); |
|
73 |
|
74 |
|
75 /** |
|
76 * |
|
77 */ |
|
78 const TDesC8& GetErrorProgressL( TInt aError ); |
|
79 |
|
80 /** |
|
81 * |
|
82 */ |
|
83 TFSProgress GetFSProgressL() const; |
|
84 |
|
85 /** |
|
86 * |
|
87 */ |
|
88 virtual TInt IpsOpType() const; |
|
89 |
|
90 private: |
|
91 |
|
92 |
|
93 /** |
|
94 * CIpsPlgImap4PopulateOp() |
|
95 * @param |
|
96 * |
|
97 * |
|
98 * |
|
99 * |
|
100 * |
|
101 * |
|
102 |
|
103 */ |
|
104 |
|
105 CIpsPlgImap4PopulateOp( |
|
106 CMsvSession& aMsvSession, |
|
107 TRequestStatus& aObserverRequestStatus, |
|
108 TInt aPriority, |
|
109 TMsvId aService, |
|
110 CIpsPlgTimerOperation& aActivityTimer, |
|
111 const TImImap4GetPartialMailInfo& aGetMailInfo, |
|
112 TFSMailMsgId aFSMailBoxId, |
|
113 MFSMailRequestObserver& aFSOperationObserver, |
|
114 TInt aFSRequestId, |
|
115 CIpsPlgEventHandler* aEventHandler ); |
|
116 |
|
117 /** |
|
118 * |
|
119 */ |
|
120 |
|
121 void ConstructL( |
|
122 const CMsvEntrySelection& aSel, |
|
123 TBool aDoFilterSelection ); |
|
124 |
|
125 |
|
126 /** |
|
127 * |
|
128 */ |
|
129 |
|
130 void RunL(); |
|
131 |
|
132 /** |
|
133 * |
|
134 */ |
|
135 void DoRunL(); |
|
136 |
|
137 /** |
|
138 * |
|
139 */ |
|
140 void DoCancel(); |
|
141 |
|
142 /** |
|
143 * |
|
144 */ |
|
145 |
|
146 void Complete(); |
|
147 |
|
148 /** |
|
149 * |
|
150 */ |
|
151 void DoConnectL(); |
|
152 |
|
153 /** |
|
154 * |
|
155 */ |
|
156 void FilterSelectionL( const CMsvEntrySelection& aSelection ); |
|
157 |
|
158 /** |
|
159 * |
|
160 */ |
|
161 TBool IsPartialPopulate( ); |
|
162 |
|
163 protected: |
|
164 |
|
165 /** |
|
166 * |
|
167 */ |
|
168 void DoPopulateL(); |
|
169 |
|
170 /** |
|
171 * From CIpsPlgOnlineoperation |
|
172 */ |
|
173 TInt GetEngineProgress( const TDesC8& aProgress ); |
|
174 |
|
175 protected: |
|
176 |
|
177 enum TFetchState |
|
178 { |
|
179 EStateIdle, |
|
180 EStateConnecting, |
|
181 EStateFetching, |
|
182 EStateInfoEntryChange |
|
183 }; |
|
184 |
|
185 |
|
186 private: //Data |
|
187 |
|
188 TImImap4GetPartialMailInfo iPartialMailInfo; |
|
189 RArray<TMsvId> iSelection; |
|
190 // not owned |
|
191 CIpsPlgEventHandler* iEventHandler; |
|
192 CMsvEntrySelection* iTempSelection; |
|
193 TDesC8* iFetchErrorProgress; |
|
194 TPckgBuf<TImap4SyncProgress> iSyncProgress; |
|
195 TMsvId iParent; |
|
196 TFetchState iState; |
|
197 |
|
198 }; |
|
199 |
|
200 #endif //__IPSPLGIMAP4POPULATEOP_H__ |