branch | RCL_3 |
changeset 64 | 3533d4323edc |
parent 63 | d189ee25cf9d |
63:d189ee25cf9d | 64:3533d4323edc |
---|---|
20 #define __BASEPLUGIN_H__ |
20 #define __BASEPLUGIN_H__ |
21 |
21 |
22 #include <e32std.h> |
22 #include <e32std.h> |
23 #include <e32base.h> |
23 #include <e32base.h> |
24 |
24 |
25 #include "CFSMailPlugin.h" |
25 #include "cfsmailplugin.h" |
26 #include "mmrorganizer.h" |
26 #include "mmrorganizer.h" |
27 |
27 |
28 //<cmail> |
28 //<cmail> |
29 #include "MsgStoreFolderUtils.h" |
29 #include "msgstorefolderutils.h" |
30 #include "MsgStoreMailBox.h" |
30 #include "msgstoremailbox.h" |
31 #include "MsgStoreMailBoxObserver.h" |
31 #include "msgstoremailboxobserver.h" |
32 #include "MsgStoreMessage.h" |
32 #include "msgstoremessage.h" |
33 #include "MsgStoreObserver.h" |
33 #include "msgstoreobserver.h" |
34 #include "DebugLogMacros.h" |
34 #include "debuglogmacros.h" |
35 //</cmail> |
35 //</cmail> |
36 |
36 |
37 //<qmail> Entire CBasePlugin class is exported in 10.1 |
37 #include "basemrinfoobject.h" |
38 #include "baseplugindef.h" |
38 #include "map.h" |
39 //</qmail> |
|
40 |
|
41 #include "BaseMrInfoObject.h" |
|
42 #include "Map.h" |
|
43 |
39 |
44 |
40 |
45 class CMsgStore; |
41 class CMsgStore; |
46 |
42 |
47 class CBaseMrInfoProcessor; |
43 class CBaseMrInfoProcessor; |
48 class TDayOfWeekFtor; |
44 class TDayOfWeekFtor; |
49 class CFetchRequester; |
45 class CFetchRequester; |
50 class CMailboxInfo; |
46 class CMailboxInfo; |
51 class CSearchHandler; |
47 class CSearchHandler; |
52 class HMailIterator; |
48 class HMailIterator; |
53 class CDelayedOp; |
|
54 class CDelayedOpsManager; |
49 class CDelayedOpsManager; |
55 class MDelayedOpsManager; |
50 class MDelayedOpsManager; |
56 |
51 |
57 //<qmail> |
|
58 /** |
|
59 * reply/forward message creation parameters |
|
60 */ |
|
61 struct TReplyForwardParams |
|
62 { |
|
63 HBufC* iHeader; // reply/forward header, ownership stays in UI |
|
64 HBufC* iSmartTag; // smart reply/forward tag, ownership stays in UI |
|
65 }; |
|
66 //</qmail> |
|
67 |
52 |
68 /** |
53 /** |
69 * Notes for derived classes: |
54 * Notes for derived classes: |
70 * GetPluginId - you must override this to return the ECOM id of the plugin. |
55 * GetPluginId - you must override this to return the ECOM id of the plugin. |
71 */ |
56 */ |
72 class BASEPLUGIN_EXPORT CBasePlugin : |
57 class CBasePlugin : |
73 public CFSMailPlugin, |
58 public CFSMailPlugin, |
74 public MMsgStoreObserver, |
59 public MMsgStoreObserver, |
75 protected MMsgStoreMailBoxObserver |
60 protected MMsgStoreMailBoxObserver |
76 |
61 |
77 { |
62 { |
81 friend class CSearchHandler; |
66 friend class CSearchHandler; |
82 //there is a need for a better way to access internal plugin state by |
67 //there is a need for a better way to access internal plugin state by |
83 //private components. |
68 //private components. |
84 friend class CDelayedDeleteMessagesOp; |
69 friend class CDelayedDeleteMessagesOp; |
85 friend class CDelayedSetContentOp; |
70 friend class CDelayedSetContentOp; |
86 friend class CDelayedMessageStorerOp; |
71 |
87 // <qmail> |
|
88 friend class CDelayedAddNewOrRemoveChildPartOp; |
|
89 friend class CDelayedOp; |
|
90 // </qmail> |
|
91 protected: |
72 protected: |
92 struct TOngoingFetchInfo; |
73 struct TOngoingFetchInfo; |
93 struct TCacheLine |
74 struct TCacheLine |
94 { |
75 { |
95 CMsgStoreMessage* iMsg; |
76 CMsgStoreMessage* iMsg; |
99 }; |
80 }; |
100 |
81 |
101 public: |
82 public: |
102 static CBasePlugin* NewL(); |
83 static CBasePlugin* NewL(); |
103 static CBasePlugin* NewLC(); |
84 static CBasePlugin* NewLC(); |
104 virtual ~CBasePlugin(); |
85 IMPORT_C virtual ~CBasePlugin(); |
105 protected: |
86 protected: |
106 CBasePlugin(); |
87 IMPORT_C CBasePlugin(); |
107 void ConstructL(); |
88 IMPORT_C void ConstructL(); |
108 |
89 |
109 // CFSMailPlugin // |
90 // CFSMailPlugin // |
110 public: |
91 public: |
111 |
92 |
112 /** |
93 /** |
113 * This methoed must be called before destruction of |
94 * This methoed must be called before destruction of |
114 * CBasePlugin derived class. To fix bug EIZU-7XVF2Z. |
95 * CBasePlugin derived class. To fix bug EIZU-7XVF2Z. |
115 */ |
96 */ |
116 void DeleteDelayedOpsManager(); |
97 IMPORT_C void DeleteDelayedOpsManager(); |
117 virtual void ListMailBoxesL( |
98 |
99 IMPORT_C virtual void ListMailBoxesL( |
|
118 RArray<TFSMailMsgId>& aMailboxes ); |
100 RArray<TFSMailMsgId>& aMailboxes ); |
119 |
101 |
120 virtual CFSMailBox* GetMailBoxByUidL( |
102 IMPORT_C virtual CFSMailBox* GetMailBoxByUidL( |
121 const TFSMailMsgId& aMailBox); |
103 const TFSMailMsgId& aMailBox); |
122 |
104 |
123 virtual void DeleteMailBoxByUidL( |
105 IMPORT_C virtual void DeleteMailBoxByUidL( |
124 const TFSMailMsgId& aMailBoxId, |
106 const TFSMailMsgId& aMailBoxId, |
125 MFSMailRequestObserver& aOperationObserver, |
107 MFSMailRequestObserver& aOperationObserver, |
126 const TInt aRequestId ); |
108 const TInt aRequestId ); |
127 |
109 |
128 virtual TDesC& GetBrandingIdL( |
110 IMPORT_C virtual TDesC& GetBrandingIdL( |
129 const TFSMailMsgId& aMailboxId ); |
111 const TFSMailMsgId& aMailboxId ); |
130 |
112 |
131 virtual void MoveMessagesL( |
113 IMPORT_C virtual void MoveMessagesL( |
132 const TFSMailMsgId& aMailBoxId, |
114 const TFSMailMsgId& aMailBoxId, |
133 const RArray<TFSMailMsgId>& aMessageIds, |
115 const RArray<TFSMailMsgId>& aMessageIds, |
134 const TFSMailMsgId& aSourceFolderId, |
116 const TFSMailMsgId& aSourceFolderId, |
135 const TFSMailMsgId& aDestinationFolderId ); |
117 const TFSMailMsgId& aDestinationFolderId ); |
136 |
118 |
137 virtual void CopyMessagesL( |
119 IMPORT_C virtual void CopyMessagesL( |
138 const TFSMailMsgId& aMailBoxId, |
120 const TFSMailMsgId& aMailBoxId, |
139 const RArray<TFSMailMsgId>& aMessageIds, |
121 const RArray<TFSMailMsgId>& aMessageIds, |
140 RArray<TFSMailMsgId>& aNewMessages, |
122 RArray<TFSMailMsgId>& aNewMessages, |
141 const TFSMailMsgId& aSourceFolderId, |
123 const TFSMailMsgId& aSourceFolderId, |
142 const TFSMailMsgId& aDestinationFolderId ); |
124 const TFSMailMsgId& aDestinationFolderId ); |
143 |
125 |
144 MDesCArray* GetMrusL( |
126 IMPORT_C MDesCArray* GetMrusL( |
145 const TFSMailMsgId& aMailBoxId ); |
127 const TFSMailMsgId& aMailBoxId ); |
146 |
128 |
147 void SetMrusL( |
129 IMPORT_C void SetMrusL( |
148 const TFSMailMsgId& aMailBoxId, |
130 const TFSMailMsgId& aMailBoxId, |
149 MDesCArray* aNewMruList ); |
131 MDesCArray* aNewMruList ); |
150 |
132 |
151 void GoOnlineL( |
133 IMPORT_C void GoOnlineL( |
152 const TFSMailMsgId& aMailBoxId ); |
134 const TFSMailMsgId& aMailBoxId ); |
153 |
135 |
154 void GoOfflineL( |
136 IMPORT_C void GoOfflineL( |
155 const TFSMailMsgId& aMailBoxId ); |
137 const TFSMailMsgId& aMailBoxId ); |
156 |
138 |
157 const TFSProgress GetLastSyncStatusL( |
139 IMPORT_C const TFSProgress GetLastSyncStatusL( |
158 const TFSMailMsgId& aMailBoxId ); |
140 const TFSMailMsgId& aMailBoxId ); |
159 |
141 |
160 void RefreshNowL( |
142 IMPORT_C void RefreshNowL( |
161 const TFSMailMsgId& aMailBoxId, |
143 const TFSMailMsgId& aMailBoxId, |
162 MFSMailRequestObserver& aOperationObserver, |
144 MFSMailRequestObserver& aOperationObserver, |
163 TInt aRequestId, |
145 TInt aRequestId ); |
164 const TBool aSilentConnection=EFalse ); |
146 |
165 |
147 IMPORT_C virtual CFSMailFolder* GetFolderByUidL( |
166 virtual CFSMailFolder* GetFolderByUidL( |
|
167 const TFSMailMsgId& aMailBoxId, |
148 const TFSMailMsgId& aMailBoxId, |
168 const TFSMailMsgId& aFolderId ); |
149 const TFSMailMsgId& aFolderId ); |
169 |
150 |
170 virtual CFSMailFolder* CreateFolderL( |
151 IMPORT_C virtual CFSMailFolder* CreateFolderL( |
171 const TFSMailMsgId& aMailBoxId, |
152 const TFSMailMsgId& aMailBoxId, |
172 const TFSMailMsgId& aFolderId, |
153 const TFSMailMsgId& aFolderId, |
173 const TDesC& aFolderName, |
154 const TDesC& aFolderName, |
174 const TBool aSync ); |
155 const TBool aSync ); |
175 |
156 |
176 virtual void DeleteFolderByUidL( |
157 IMPORT_C virtual void DeleteFolderByUidL( |
177 const TFSMailMsgId& aMailBox, |
158 const TFSMailMsgId& aMailBox, |
178 const TFSMailMsgId& aFolder ); |
159 const TFSMailMsgId& aFolder ); |
179 |
160 |
180 virtual void ListFoldersL( |
161 IMPORT_C virtual void ListFoldersL( |
181 const TFSMailMsgId& aMailBoxId, |
162 const TFSMailMsgId& aMailBoxId, |
182 const TFSMailMsgId& aFolderId, |
163 const TFSMailMsgId& aFolderId, |
183 RPointerArray<CFSMailFolder>& aFolderList ); |
164 RPointerArray<CFSMailFolder>& aFolderList ); |
184 |
165 |
185 virtual void ListFoldersL( |
166 IMPORT_C virtual void ListFoldersL( |
186 const TFSMailMsgId& aMailBoxId, |
167 const TFSMailMsgId& aMailBoxId, |
187 RPointerArray<CFSMailFolder>& aFolderList ); |
168 RPointerArray<CFSMailFolder>& aFolderList ); |
188 |
169 |
189 virtual TFSMailMsgId GetStandardFolderIdL( |
170 IMPORT_C virtual TFSMailMsgId GetStandardFolderIdL( |
190 const TFSMailMsgId& aMailBoxId, |
171 const TFSMailMsgId& aMailBoxId, |
191 const TFSFolderType aFolderType ); |
172 const TFSFolderType aFolderType ); |
192 |
173 |
193 virtual MFSMailIterator* ListMessagesL( |
174 IMPORT_C virtual MFSMailIterator* ListMessagesL( |
194 const TFSMailMsgId& aMailBoxId, |
175 const TFSMailMsgId& aMailBoxId, |
195 const TFSMailMsgId& aFolderId, |
176 const TFSMailMsgId& aFolderId, |
196 const TFSMailDetails aDetails, |
177 const TFSMailDetails aDetails, |
197 const RArray<TFSMailSortCriteria>& aSorting ); |
178 const RArray<TFSMailSortCriteria>& aSorting ); |
198 |
179 |
199 virtual CFSMailMessage* GetMessageByUidL( |
180 IMPORT_C virtual CFSMailMessage* GetMessageByUidL( |
200 const TFSMailMsgId& aMailBoxId, |
181 const TFSMailMsgId& aMailBoxId, |
201 const TFSMailMsgId& aFolderId, |
182 const TFSMailMsgId& aFolderId, |
202 const TFSMailMsgId& aMessageId, |
183 const TFSMailMsgId& aMessageId, |
203 const TFSMailDetails aDetails ); |
184 const TFSMailDetails aDetails ); |
204 |
185 |
205 /** |
186 /** |
206 * The delete is executed asynchronously. The base plugin will queue |
187 * The delete is executed asynchronously. The base plugin will queue |
207 * the request and return immediately. |
188 * the request and return immediately. |
208 */ |
189 */ |
209 virtual void DeleteMessagesByUidL( |
190 IMPORT_C virtual void DeleteMessagesByUidL( |
210 const TFSMailMsgId& aMailBoxId, |
191 const TFSMailMsgId& aMailBoxId, |
211 const TFSMailMsgId& aFolderId, |
192 const TFSMailMsgId& aFolderId, |
212 const RArray<TFSMailMsgId>& aMessages ); |
193 const RArray<TFSMailMsgId>& aMessages ); |
213 |
194 |
214 virtual CFSMailMessage* CreateMessageToSendL( |
195 IMPORT_C virtual CFSMailMessage* CreateMessageToSendL( |
215 const TFSMailMsgId& aMailBox ); |
196 const TFSMailMsgId& aMailBox ); |
216 // <qmail> |
197 |
217 virtual void CreateMessageToSendL( |
198 IMPORT_C virtual CFSMailMessage* CreateForwardMessageL( |
218 const TFSMailMsgId& aMailBoxId, |
|
219 MFSMailRequestObserver& aOperationObserver, |
|
220 const TInt aRequestId ); |
|
221 // </qmail> |
|
222 |
|
223 virtual CFSMailMessage* CreateForwardMessageL( |
|
224 const TFSMailMsgId& aMailBox, |
199 const TFSMailMsgId& aMailBox, |
225 const TFSMailMsgId& aOriginal, |
200 const TFSMailMsgId& aOriginal, |
226 const TDesC& aHeaderDescriptor ); |
201 const TDesC& aHeaderDescriptor ); |
227 |
202 |
228 virtual CFSMailMessage* CreateReplyMessageL( |
203 IMPORT_C virtual CFSMailMessage* CreateReplyMessageL( |
229 const TFSMailMsgId& aMailBoxId, |
204 const TFSMailMsgId& aMailBoxId, |
230 const TFSMailMsgId& aOriginalMessageId, |
205 const TFSMailMsgId& aOriginalMessageId, |
231 const TBool aReplyToAll, |
206 const TBool aReplyToAll, |
232 const TDesC& aHeaderDescriptor ); |
207 const TDesC& aHeaderDescriptor ); |
233 |
208 |
234 virtual void StoreMessageL( |
209 IMPORT_C virtual void StoreMessageL( |
235 const TFSMailMsgId& aMailBoxId, |
210 const TFSMailMsgId& aMailBoxId, |
236 CFSMailMessage& aMessage ); |
211 CFSMailMessage& aMessage ); |
237 |
212 |
238 // <qmail> |
213 IMPORT_C virtual void FetchMessagesL( |
239 void StoreMessagesL( |
|
240 const TFSMailMsgId& aMailBoxId, |
|
241 RPointerArray<CFSMailMessage> &messages, |
|
242 MFSMailRequestObserver& aOperationObserver, |
|
243 const TInt aRequestId ); |
|
244 // </qmail> |
|
245 |
|
246 // <qmail> |
|
247 virtual void StoreMessagePartsL( |
|
248 RPointerArray<CFSMailMessagePart>& aMessageParts, |
|
249 MFSMailRequestObserver& aOperationObserver, |
|
250 const TInt aRequestId); |
|
251 // <//qmail> |
|
252 |
|
253 virtual void FetchMessagesL( |
|
254 const TFSMailMsgId& aMailBoxId, |
214 const TFSMailMsgId& aMailBoxId, |
255 const TFSMailMsgId& aFolderId, |
215 const TFSMailMsgId& aFolderId, |
256 const RArray<TFSMailMsgId>& aMessageIds, |
216 const RArray<TFSMailMsgId>& aMessageIds, |
257 TFSMailDetails aDetails, |
217 TFSMailDetails aDetails, |
258 MFSMailRequestObserver& aObserver, |
218 MFSMailRequestObserver& aObserver, |
259 TInt aRequestId ); |
219 TInt aRequestId ); |
260 |
220 |
261 virtual void FetchMessagePartsL( |
221 IMPORT_C virtual void FetchMessagePartsL( |
262 const TFSMailMsgId& aMailBoxId, |
222 const TFSMailMsgId& aMailBoxId, |
263 const TFSMailMsgId& aFolderId, |
223 const TFSMailMsgId& aFolderId, |
264 const TFSMailMsgId& aMessageId, |
224 const TFSMailMsgId& aMessageId, |
265 const RArray<TFSMailMsgId>& aMessagePartIds, |
225 const RArray<TFSMailMsgId>& aMessagePartIds, |
266 MFSMailRequestObserver& aOperationObserver, |
226 MFSMailRequestObserver& aOperationObserver, |
267 const TInt aRequestId, |
227 const TInt aRequestId, |
268 const TUint aPreferredByteCount ); |
228 const TUint aPreferredByteCount ); |
269 |
229 |
270 virtual void GetMessagesL( |
230 IMPORT_C virtual void GetMessagesL( |
271 const TFSMailMsgId& aMailBoxId, |
231 const TFSMailMsgId& aMailBoxId, |
272 const TFSMailMsgId& aParentFolderId, |
232 const TFSMailMsgId& aParentFolderId, |
273 const RArray<TFSMailMsgId>& aMessageIds, |
233 const RArray<TFSMailMsgId>& aMessageIds, |
274 RPointerArray<CFSMailMessage>& aMessageList, |
234 RPointerArray<CFSMailMessage>& aMessageList, |
275 TFSMailDetails aDetails ); |
235 TFSMailDetails aDetails ); |
276 |
236 |
277 virtual void ChildPartsL( |
237 IMPORT_C virtual void ChildPartsL( |
278 const TFSMailMsgId& aMailBoxId, |
238 const TFSMailMsgId& aMailBoxId, |
279 const TFSMailMsgId& aParentFolderId, |
239 const TFSMailMsgId& aParentFolderId, |
280 const TFSMailMsgId& aMessageId, |
240 const TFSMailMsgId& aMessageId, |
281 const TFSMailMsgId& aParentId, |
241 const TFSMailMsgId& aParentId, |
282 RPointerArray<CFSMailMessagePart>& aParts ); |
242 RPointerArray<CFSMailMessagePart>& aParts ); |
283 |
243 |
284 virtual CFSMailMessagePart* NewChildPartL( |
244 IMPORT_C virtual CFSMailMessagePart* NewChildPartL( |
285 const TFSMailMsgId& aMailBoxId, |
245 const TFSMailMsgId& aMailBoxId, |
286 const TFSMailMsgId& aParentFolderId, |
246 const TFSMailMsgId& aParentFolderId, |
287 const TFSMailMsgId& aMessageId, |
247 const TFSMailMsgId& aMessageId, |
288 const TFSMailMsgId& aParentPartId, |
248 const TFSMailMsgId& aParentPartId, |
289 const TFSMailMsgId& aInsertBefore, |
249 const TFSMailMsgId& aInsertBefore, |
290 const TDesC& aContentType ); |
250 const TDesC& aContentType ); |
291 |
251 |
292 virtual CFSMailMessagePart* CopyMessageAsChildPartL( |
252 IMPORT_C virtual CFSMailMessagePart* CopyMessageAsChildPartL( |
293 const TFSMailMsgId& aMailBoxId, |
253 const TFSMailMsgId& aMailBoxId, |
294 const TFSMailMsgId& aParentFolderId, |
254 const TFSMailMsgId& aParentFolderId, |
295 const TFSMailMsgId& aMessageId, |
255 const TFSMailMsgId& aMessageId, |
296 const TFSMailMsgId& aParentPartId, |
256 const TFSMailMsgId& aParentPartId, |
297 const TFSMailMsgId& aInsertBefore, |
257 const TFSMailMsgId& aInsertBefore, |
298 const CFSMailMessage& aMessage ); |
258 const CFSMailMessage& aMessage ); |
299 |
259 |
300 virtual void RemoveChildPartL( |
260 IMPORT_C virtual void RemoveChildPartL( |
301 const TFSMailMsgId& aMailBoxId, |
261 const TFSMailMsgId& aMailBoxId, |
302 const TFSMailMsgId& aParentFolderId, |
262 const TFSMailMsgId& aParentFolderId, |
303 const TFSMailMsgId& aMessageId, |
263 const TFSMailMsgId& aMessageId, |
304 const TFSMailMsgId& aParentPartId, |
264 const TFSMailMsgId& aParentPartId, |
305 const TFSMailMsgId& aPartId ); |
265 const TFSMailMsgId& aPartId ); |
306 // <qmail> |
266 |
307 virtual void RemoveChildPartL( |
267 IMPORT_C virtual void SetPartContentFromFileL( |
308 const TFSMailMsgId& aMailBoxId, |
|
309 const TFSMailMsgId& aParentFolderId, |
|
310 const TFSMailMsgId& aMessageId, |
|
311 const TFSMailMsgId& aParentPartId, |
|
312 const TFSMailMsgId& aPartId, |
|
313 MFSMailRequestObserver& aOperationObserver, |
|
314 const TInt aRequestId ); |
|
315 // </qmail> |
|
316 |
|
317 virtual void SetPartContentFromFileL( |
|
318 const TFSMailMsgId& aMailBoxId, |
268 const TFSMailMsgId& aMailBoxId, |
319 const TFSMailMsgId& aParentFolderId, |
269 const TFSMailMsgId& aParentFolderId, |
320 const TFSMailMsgId& aMessageId, |
270 const TFSMailMsgId& aMessageId, |
321 const TFSMailMsgId& aMessagePartId, |
271 const TFSMailMsgId& aMessagePartId, |
322 const TDesC& aFilePath ); |
272 const TDesC& aFilePath ); |
323 |
273 |
324 virtual void StoreMessagePartL( |
274 IMPORT_C virtual void StoreMessagePartL( |
325 const TFSMailMsgId& aMailBoxId, |
275 const TFSMailMsgId& aMailBoxId, |
326 const TFSMailMsgId& aParentFolderId, |
276 const TFSMailMsgId& aParentFolderId, |
327 const TFSMailMsgId& aMessageId, |
277 const TFSMailMsgId& aMessageId, |
328 CFSMailMessagePart& aMessagePart ); |
278 CFSMailMessagePart& aMessagePart ); |
329 |
279 |
330 virtual CFSMailMessagePart* MessagePartL( |
280 IMPORT_C virtual CFSMailMessagePart* MessagePartL( |
331 const TFSMailMsgId& aMailBoxId, |
281 const TFSMailMsgId& aMailBoxId, |
332 const TFSMailMsgId& aParentFolderId, |
282 const TFSMailMsgId& aParentFolderId, |
333 const TFSMailMsgId& aMessageId, |
283 const TFSMailMsgId& aMessageId, |
334 const TFSMailMsgId& aMessagePartId ); |
284 const TFSMailMsgId& aMessagePartId ); |
335 |
285 |
336 virtual TInt GetMessagePartFileL( |
286 IMPORT_C virtual TInt GetMessagePartFileL( |
337 const TFSMailMsgId& aMailBoxId, |
287 const TFSMailMsgId& aMailBoxId, |
338 const TFSMailMsgId& aParentFolderId, |
288 const TFSMailMsgId& aParentFolderId, |
339 const TFSMailMsgId& aMessageId, |
289 const TFSMailMsgId& aMessageId, |
340 const TFSMailMsgId& aMessagePartId, |
290 const TFSMailMsgId& aMessagePartId, |
341 RFile& aFileHandle ); |
291 RFile& aFileHandle ); |
342 |
292 |
343 virtual void CopyMessagePartFileL( |
293 IMPORT_C virtual void CopyMessagePartFileL( |
344 const TFSMailMsgId& aMailBoxId, |
294 const TFSMailMsgId& aMailBoxId, |
345 const TFSMailMsgId& aParentFolderId, |
295 const TFSMailMsgId& aParentFolderId, |
346 const TFSMailMsgId& aMessageId, |
296 const TFSMailMsgId& aMessageId, |
347 const TFSMailMsgId& aMessagePartId, |
297 const TFSMailMsgId& aMessagePartId, |
348 const TDesC& aFilePath ); |
298 const TDesC& aFilePath ); |
349 |
299 |
350 virtual void GetContentToBufferL( |
300 IMPORT_C virtual void GetContentToBufferL( |
351 const TFSMailMsgId& aMailBoxId, |
301 const TFSMailMsgId& aMailBoxId, |
352 const TFSMailMsgId& aParentFolderId, |
302 const TFSMailMsgId& aParentFolderId, |
353 const TFSMailMsgId& aMessageId, |
303 const TFSMailMsgId& aMessageId, |
354 const TFSMailMsgId& aMessagePartId, |
304 const TFSMailMsgId& aMessagePartId, |
355 TDes& aBuffer, |
305 TDes& aBuffer, |
356 TUint aStartOffset ); |
306 TUint aStartOffset ); |
357 |
307 |
358 virtual void SetContentL( |
308 IMPORT_C virtual void SetContentL( |
359 const TDesC& aBuffer, |
309 const TDesC& aBuffer, |
360 const TFSMailMsgId& aMailBoxId, |
310 const TFSMailMsgId& aMailBoxId, |
361 const TFSMailMsgId& aParentFolderId, |
311 const TFSMailMsgId& aParentFolderId, |
362 const TFSMailMsgId& aMessageId, |
312 const TFSMailMsgId& aMessageId, |
363 const TFSMailMsgId& aMessagePartId); |
313 const TFSMailMsgId& aMessagePartId); |
364 |
314 |
365 virtual void RemovePartContentL( |
315 IMPORT_C virtual void RemovePartContentL( |
366 const TFSMailMsgId& aMailBoxId, |
316 const TFSMailMsgId& aMailBoxId, |
367 const TFSMailMsgId& aParentFolderId, |
317 const TFSMailMsgId& aParentFolderId, |
368 const TFSMailMsgId& aMessageId, |
318 const TFSMailMsgId& aMessageId, |
369 const RArray<TFSMailMsgId>& aPartIds ); |
319 const RArray<TFSMailMsgId>& aPartIds ); |
370 |
320 |
371 virtual void SearchL( |
321 IMPORT_C virtual void SearchL( |
372 const TFSMailMsgId& aMailBoxId, |
322 const TFSMailMsgId& aMailBoxId, |
373 const RArray<TFSMailMsgId>& aFolderIds, |
323 const RArray<TFSMailMsgId>& aFolderIds, |
374 const RPointerArray<TDesC>& aSearchStrings, |
324 const RPointerArray<TDesC>& aSearchStrings, |
375 const TFSMailSortCriteria& aSortCriteria, |
325 const TFSMailSortCriteria& aSortCriteria, |
376 MFSMailBoxSearchObserver& aSearchObserver ); |
326 MFSMailBoxSearchObserver& aSearchObserver ); |
377 |
327 |
378 virtual void CancelSearch( |
328 IMPORT_C virtual void CancelSearch( |
379 const TFSMailMsgId& aMailBoxId ); |
329 const TFSMailMsgId& aMailBoxId ); |
380 |
330 |
381 virtual void ClearSearchResultCache( |
331 IMPORT_C virtual void ClearSearchResultCache( |
382 const TFSMailMsgId& aMailBoxId ); |
332 const TFSMailMsgId& aMailBoxId ); |
383 |
333 |
384 virtual void AddObserverL( |
334 IMPORT_C virtual void AddObserverL( |
385 MFSMailEventObserver& aObserver ); |
335 MFSMailEventObserver& aObserver ); |
386 |
336 |
387 virtual void RemoveObserver( |
337 IMPORT_C virtual void RemoveObserver( |
388 MFSMailEventObserver& aObserver ); |
338 MFSMailEventObserver& aObserver ); |
389 |
339 |
390 virtual void UnregisterRequestObserver( |
340 IMPORT_C virtual void UnregisterRequestObserver( |
391 TInt aRequestId ); |
341 TInt aRequestId ); |
392 |
342 |
393 virtual void SendMessageL( |
343 IMPORT_C virtual void SendMessageL( |
394 CFSMailMessage& aMessage ); |
344 CFSMailMessage& aMessage ); |
395 |
345 |
396 virtual TFSProgress StatusL( |
346 IMPORT_C virtual TFSProgress StatusL( |
397 TInt aRequestId ); |
347 TInt aRequestId ); |
398 |
348 |
399 virtual void CancelL( |
349 IMPORT_C virtual void CancelL( |
400 TInt aRequestId ); |
350 TInt aRequestId ); |
401 |
351 |
402 virtual void SubscribeMailboxEventsL( |
352 IMPORT_C virtual void SubscribeMailboxEventsL( |
403 const TFSMailMsgId& aMailboxId, |
353 const TFSMailMsgId& aMailboxId, |
404 MFSMailEventObserver& aObserver ); |
354 MFSMailEventObserver& aObserver ); |
405 |
355 |
406 virtual void UnsubscribeMailboxEvents( |
356 IMPORT_C virtual void UnsubscribeMailboxEvents( |
407 const TFSMailMsgId& aMailboxId, |
357 const TFSMailMsgId& aMailboxId, |
408 MFSMailEventObserver& aObserver ); |
358 MFSMailEventObserver& aObserver ); |
409 //<qmail> |
359 |
410 virtual TSSMailSyncState CurrentSyncState( |
360 IMPORT_C virtual TSSMailSyncState CurrentSyncState( |
411 const TFSMailMsgId& aMailboxId ); |
361 const TFSMailMsgId& aMailboxId ); |
412 //</qmail> |
362 |
413 virtual TFSMailBoxStatus GetMailBoxStatus( |
363 IMPORT_C virtual TFSMailBoxStatus GetMailBoxStatus( |
414 const TFSMailMsgId& aMailboxId ); |
364 const TFSMailMsgId& aMailboxId ); |
415 |
365 |
416 virtual TBool MailboxHasCapabilityL( |
366 IMPORT_C virtual TBool MailboxHasCapabilityL( |
417 TFSMailBoxCapabilities aCapability, |
367 TFSMailBoxCapabilities aCapability, |
418 TFSMailMsgId aMailBoxId ); |
368 TFSMailMsgId aMailBoxId ); |
419 |
369 |
420 /** |
370 /** |
421 * Create a new ChildPart using a file path |
371 * Create a new ChildPart using a file path |
422 */ |
372 */ |
423 virtual CFSMailMessagePart* NewChildPartFromFileL( |
373 IMPORT_C virtual CFSMailMessagePart* NewChildPartFromFileL( |
424 const TFSMailMsgId& aMailBoxId, |
374 const TFSMailMsgId& aMailBoxId, |
425 const TFSMailMsgId& aParentFolderId, |
375 const TFSMailMsgId& aParentFolderId, |
426 const TFSMailMsgId& aMessageId, |
376 const TFSMailMsgId& aMessageId, |
427 const TFSMailMsgId& aParentPartId, |
377 const TFSMailMsgId& aParentPartId, |
428 const TDesC& aContentType, |
378 const TDesC& aContentType, |
431 /** |
381 /** |
432 * Create a new ChildPart using a file handle |
382 * Create a new ChildPart using a file handle |
433 * NOTE 1: RFs.ShareProtected() must have been called already before calling this method. |
383 * NOTE 1: RFs.ShareProtected() must have been called already before calling this method. |
434 * NOTE 2: The ownersip of the RFile handle (aFile) is transferred to this method. |
384 * NOTE 2: The ownersip of the RFile handle (aFile) is transferred to this method. |
435 */ |
385 */ |
436 virtual CFSMailMessagePart* NewChildPartFromFileL( |
386 IMPORT_C virtual CFSMailMessagePart* NewChildPartFromFileL( |
437 const TFSMailMsgId& aMailBoxId, |
387 const TFSMailMsgId& aMailBoxId, |
438 const TFSMailMsgId& aParentFolderId, |
388 const TFSMailMsgId& aParentFolderId, |
439 const TFSMailMsgId& aMessageId, |
389 const TFSMailMsgId& aMessageId, |
440 const TFSMailMsgId& aParentPartId, |
390 const TFSMailMsgId& aParentPartId, |
441 const TDesC& aContentType, |
391 const TDesC& aContentType, |
442 RFile& aFile ); |
392 RFile& aFile ); |
443 // <qmail> |
393 |
444 virtual void NewChildPartFromFileL( |
394 IMPORT_C virtual TInt WizardDataAvailableL(); |
445 const TFSMailMsgId& aMailBoxId, |
395 |
446 const TFSMailMsgId& aParentFolderId, |
396 IMPORT_C virtual void AuthenticateL( |
447 const TFSMailMsgId& aMessageId, |
|
448 const TFSMailMsgId& aParentPartId, |
|
449 const TDesC& aContentType, |
|
450 const TDesC& aFilePath, |
|
451 MFSMailRequestObserver& aOperationObserver, |
|
452 const TInt aRequestId ); |
|
453 // </qmail> |
|
454 virtual TInt WizardDataAvailableL(); |
|
455 |
|
456 virtual void AuthenticateL( |
|
457 MFSMailRequestObserver& aOperationObserver, |
397 MFSMailRequestObserver& aOperationObserver, |
458 TInt aRequestId ); |
398 TInt aRequestId ); |
459 |
399 |
460 virtual void SetCredentialsL( |
400 IMPORT_C virtual void SetCredentialsL( |
461 const TFSMailMsgId& aMailBoxId, |
401 const TFSMailMsgId& aMailBoxId, |
462 const TDesC& aUsername, |
402 const TDesC& aUsername, |
463 const TDesC& aPassword ); |
403 const TDesC& aPassword ); |
464 |
404 |
465 virtual TInt CancelSyncL( |
405 IMPORT_C virtual TInt CancelSyncL( |
466 const TFSMailMsgId& aMailBoxId ); |
406 const TFSMailMsgId& aMailBoxId ); |
467 |
407 |
468 virtual void SetMailboxName( |
408 IMPORT_C virtual void SetMailboxName( |
469 const TFSMailMsgId& /*aMailboxId*/, |
409 const TFSMailMsgId& /*aMailboxId*/, |
470 const TDesC& /*aMailboxName*/ ); |
410 const TDesC& /*aMailboxName*/ ); |
471 |
411 |
472 // MMsgStoreObserver // |
412 // MMsgStoreObserver // |
473 public: |
413 public: |
474 virtual void SystemEventNotify( |
414 IMPORT_C virtual void SystemEventNotify( |
475 TMsgStoreSystemEvent aEvent ); |
415 TMsgStoreSystemEvent aEvent ); |
476 |
416 |
477 virtual void AccountEventNotify( |
417 IMPORT_C virtual void AccountEventNotify( |
478 TMsgStoreAccountEvent aEvent, |
418 TMsgStoreAccountEvent aEvent, |
479 TInt32 aOwnerId, |
419 TInt32 aOwnerId, |
480 const TDesC& aName, |
420 const TDesC& aName, |
481 const TDesC& aNewName, |
421 const TDesC& aNewName, |
482 TMsgStoreId aMailboxId ); |
422 TMsgStoreId aMailboxId ); |
483 |
423 |
484 virtual void ModificationNotify( |
424 IMPORT_C virtual void ModificationNotify( |
485 TMsgStoreId aMailBoxId, |
425 TMsgStoreId aMailBoxId, |
486 TMsgStoreOperation aOperation, |
426 TMsgStoreOperation aOperation, |
487 TMsgStoreContainerType aType, |
427 TMsgStoreContainerType aType, |
488 TUint32 aFlags, |
428 TUint32 aFlags, |
489 TMsgStoreId aId, |
429 TMsgStoreId aId, |
490 TMsgStoreId aParentId, |
430 TMsgStoreId aParentId, |
491 TMsgStoreId aOtherId ); |
431 TMsgStoreId aOtherId ); |
492 |
432 |
493 protected: |
433 protected: |
494 |
434 |
495 CFSMailAddress* FetchEmailAddressL( |
435 IMPORT_C CFSMailAddress* FetchEmailAddressL( |
496 CMsgStorePropertyContainer& aMessage, |
436 CMsgStorePropertyContainer& aMessage, |
497 TUint aIdx ); |
437 TUint aIdx ); |
498 |
438 |
499 CMailboxInfo& GetMailboxInfoL( |
439 IMPORT_C CMailboxInfo& GetMailboxInfoL( |
500 TMsgStoreId aId ); |
440 TMsgStoreId aId ); |
501 |
441 |
502 void GetMailboxDisplayNameL( |
442 void GetMailboxDisplayNameL( |
503 TMsgStoreId aId, |
443 TMsgStoreId aId, |
504 RBuf& aDisplayName ); |
444 RBuf& aDisplayName ); |
505 |
445 |
506 virtual TUint GetPluginId(); |
446 IMPORT_C virtual TUint GetPluginId(); |
507 |
447 |
508 /** |
448 /** |
509 * Get signature string from protocol specific subclass. |
449 * Get signature string from protocol specific subclass. |
510 * Caller is responsible for memory of returned string. |
450 * Caller is responsible for memory of returned string. |
511 */ |
451 */ |
531 { |
471 { |
532 return NULL; |
472 return NULL; |
533 } |
473 } |
534 |
474 |
535 |
475 |
536 virtual void TranslateMsgStorePropsL( |
476 IMPORT_C virtual void TranslateMsgStorePropsL( |
537 const TFSMailMsgId& aMailBoxId, |
477 const TFSMailMsgId& aMailBoxId, |
538 CMsgStorePropertyContainer& aMessage, |
478 CMsgStorePropertyContainer& aMessage, |
539 CFSMailMessagePart& aFsMsg, |
479 CFSMailMessagePart& aFsMsg, |
540 const TFSMailDetails aDetails = EFSMsgDataEnvelope ); |
480 const TFSMailDetails aDetails = EFSMsgDataEnvelope ); |
541 |
481 |
542 /** |
482 /** |
543 * Translates common message store meeting requests into Freestyle mr info |
483 * Translates common message store meeting requests into Freestyle mr info |
544 * objects. |
484 * objects. |
545 * Sync plugins might be interested in extending the default behavior. |
485 * Sync plugins might be interested in extending the default behavior. |
546 */ |
486 */ |
547 virtual void TranslateMsgStoreMrL( |
487 IMPORT_C virtual void TranslateMsgStoreMrL( |
548 const TFSMailMsgId& aMailBoxId, |
488 const TFSMailMsgId& aMailBoxId, |
549 CMsgStorePropertyContainer& aMessage, |
489 CMsgStorePropertyContainer& aMessage, |
550 CMsgStorePropertyContainer& aCalendar, |
490 CMsgStorePropertyContainer& aCalendar, |
551 CFSMailMessagePart& aFsMsg ); |
491 CFSMailMessagePart& aFsMsg ); |
552 |
492 |
557 * to the message store can be minimized. |
497 * to the message store can be minimized. |
558 * |
498 * |
559 * @param aSrc input/source Freestyle message. |
499 * @param aSrc input/source Freestyle message. |
560 * @param aDst output/destination MessageStore message. |
500 * @param aDst output/destination MessageStore message. |
561 */ |
501 */ |
562 virtual void TranslateEmailFwMessageL( |
502 IMPORT_C virtual void TranslateEmailFwMessageL( |
563 CFSMailMessagePart& aSrc, |
503 CFSMailMessagePart& aSrc, |
564 CMsgStoreMessagePart& aDst, |
504 CMsgStoreMessagePart& aDst, |
565 TBool aInInbox ); |
505 TBool aInInbox ); |
566 |
506 |
567 virtual void TranslateEmailFwMrL( |
507 IMPORT_C virtual void TranslateEmailFwMrL( |
568 MMRInfoObject& aSrc, |
508 MMRInfoObject& aSrc, |
569 CMsgStorePropertyContainer& aDst ); |
509 CMsgStorePropertyContainer& aDst ); |
570 |
510 |
571 void TranslateEmailFwAttendeeL( |
511 IMPORT_C void TranslateEmailFwAttendeeL( |
572 MMROrganizer& aSrc, |
512 MMROrganizer& aSrc, |
573 RMsgStoreAddress& aDst ); |
513 RMsgStoreAddress& aDst ); |
574 |
514 |
575 void DoListFoldersL( |
515 void DoListFoldersL( |
576 TFSMailMsgId aMailBoxId, |
516 TFSMailMsgId aMailBoxId, |
590 TFSMailMsgId aMailBox = TFSMailMsgId(), |
530 TFSMailMsgId aMailBox = TFSMailMsgId(), |
591 TAny* aParam1 = NULL, |
531 TAny* aParam1 = NULL, |
592 TAny* aParam2 = NULL, |
532 TAny* aParam2 = NULL, |
593 TAny* aParam3 = NULL ); |
533 TAny* aParam3 = NULL ); |
594 |
534 |
595 virtual void NotifyMailboxEventL( |
535 IMPORT_C virtual void NotifyMailboxEventL( |
596 TFSMailEvent aEvent, |
536 TFSMailEvent aEvent, |
597 TFSMailMsgId aMailBox, |
537 TFSMailMsgId aMailBox, |
598 TAny* aParam1 = NULL, |
538 TAny* aParam1 = NULL, |
599 TAny* aParam2 = NULL, |
539 TAny* aParam2 = NULL, |
600 TAny* aParam3 = NULL ); |
540 TAny* aParam3 = NULL ); |
602 /** |
542 /** |
603 * Tries to find a body part of the specified content type. By default |
543 * Tries to find a body part of the specified content type. By default |
604 * looks for the text/plain part. |
544 * looks for the text/plain part. |
605 * @return the main body text part or NULL if one can not be found. |
545 * @return the main body text part or NULL if one can not be found. |
606 */ |
546 */ |
607 CMsgStoreMessagePart* GetBodyPartL( |
547 IMPORT_C CMsgStoreMessagePart* GetBodyPartL( |
608 CMsgStoreMessage& aMessage, |
548 CMsgStoreMessage& aMessage, |
609 const TDesC& aContentType = KFSMailContentTypeTextPlain() ); |
549 const TDesC& aContentType = KFSMailContentTypeTextPlain() ); |
610 |
550 |
611 /** |
551 /** |
612 * Creates a forward/reply message via copying the original, using sender(s) as |
552 * Creates a forward/reply message via copying the original, using sender(s) as |
615 * @param aHeaderDescriptor packaged TReplyForwardParams that provide the message |
555 * @param aHeaderDescriptor packaged TReplyForwardParams that provide the message |
616 * quote header and the smart reply label that needs to be inserted in case of a |
556 * quote header and the smart reply label that needs to be inserted in case of a |
617 * truncated message. |
557 * truncated message. |
618 * @param aKeepAttachments true if the original message attachments are to be kept. |
558 * @param aKeepAttachments true if the original message attachments are to be kept. |
619 */ |
559 */ |
620 CFSMailMessage* CreateForwardReplyMessageL( |
560 IMPORT_C CFSMailMessage* CreateForwardReplyMessageL( |
621 const TFSMailMsgId& aMailBox, |
561 const TFSMailMsgId& aMailBox, |
622 const TFSMailMsgId& aOriginal, |
562 const TFSMailMsgId& aOriginal, |
623 const TBool aReplyToAll, |
563 const TBool aReplyToAll, |
624 const TDesC& aHeaderDescriptor, |
564 const TDesC& aHeaderDescriptor, |
625 TBool aKeepAttachments, |
565 TBool aKeepAttachments, |
627 |
567 |
628 /** |
568 /** |
629 * Recursively looks for the part with id aPartId in the part container |
569 * Recursively looks for the part with id aPartId in the part container |
630 * aParent. |
570 * aParent. |
631 */ |
571 */ |
632 CMsgStoreMessagePart* FindMessagePartL( |
572 IMPORT_C CMsgStoreMessagePart* FindMessagePartL( |
633 CMsgStoreMessagePart& aParent, |
573 CMsgStoreMessagePart& aParent, |
634 TMsgStoreId aPartId ); |
574 TMsgStoreId aPartId ); |
635 |
575 |
636 /** |
576 /** |
637 * Get MsgStore account object for the specified mailbox id. |
577 * Get MsgStore account object for the specified mailbox id. |
638 */ |
578 */ |
639 CMsgStoreAccount* GetAccountForMsgBoxL( |
579 IMPORT_C CMsgStoreAccount* GetAccountForMsgBoxL( |
640 const TFSMailMsgId& aMailboxId ); |
580 const TFSMailMsgId& aMailboxId ); |
641 |
581 |
642 /** |
582 /** |
643 * Create a MR reply message. |
583 * Create a MR reply message. |
644 */ |
584 */ |
645 virtual CFSMailMessage* CreateMrReplyMessageL( |
585 IMPORT_C virtual CFSMailMessage* CreateMrReplyMessageL( |
646 const TFSMailMsgId& aMailBoxId, |
586 const TFSMailMsgId& aMailBoxId, |
647 MMRInfoObject& aMeetingRequest, |
587 MMRInfoObject& aMeetingRequest, |
648 const TFSMailMsgId& aOriginalMessageId ); |
588 const TFSMailMsgId& aOriginalMessageId ); |
649 |
589 |
650 /** |
590 /** |
651 * Applyed when an account was deleted for proper cleanup. |
591 * Applyed when an account was deleted for proper cleanup. |
652 */ |
592 */ |
653 virtual void HandleMailboxDeleteL( |
593 IMPORT_C virtual void HandleMailboxDeleteL( |
654 const TFSMailMsgId& aMailboxId ); |
594 const TFSMailMsgId& aMailboxId ); |
655 |
595 |
656 |
596 |
657 protected: |
597 protected: |
658 |
598 |
686 void TranslateEmailFwRecipientsL( |
626 void TranslateEmailFwRecipientsL( |
687 CMsgStoreMessagePart& aDst, |
627 CMsgStoreMessagePart& aDst, |
688 const TDesC8& aDstProperty, |
628 const TDesC8& aDstProperty, |
689 RPointerArray<CFSMailAddress>& aRecipients ); |
629 RPointerArray<CFSMailAddress>& aRecipients ); |
690 |
630 |
691 static void RemoveAllPropertiesL( |
631 IMPORT_C static void RemoveAllPropertiesL( |
692 CMsgStorePropertyContainer& aContainer, |
632 CMsgStorePropertyContainer& aContainer, |
693 const TDesC8& aName ); |
633 const TDesC8& aName ); |
694 |
634 |
695 CMailboxInfo& RefreshMailboxCacheL( TMsgStoreId aMailBoxId ); |
635 IMPORT_C CMailboxInfo& RefreshMailboxCacheL( TMsgStoreId aMailBoxId ); |
696 |
636 |
697 void UnsubscribeMailboxEventsL( |
637 void UnsubscribeMailboxEventsL( |
698 const TFSMailMsgId& aMailboxId, |
638 const TFSMailMsgId& aMailboxId, |
699 MFSMailEventObserver& aObserver ); |
639 MFSMailEventObserver& aObserver ); |
700 |
640 |
730 RFile& aFile ); |
670 RFile& aFile ); |
731 |
671 |
732 /** |
672 /** |
733 * Called by RemovePartContentL for each part that needs its content removed. |
673 * Called by RemovePartContentL for each part that needs its content removed. |
734 */ |
674 */ |
735 virtual void HandleRemovePartContentL( |
675 IMPORT_C virtual void HandleRemovePartContentL( |
736 CMsgStoreMessage& aMsg, |
676 CMsgStoreMessage& aMsg, |
737 CMsgStoreMessagePart& aPart ); |
677 CMsgStoreMessagePart& aPart ); |
738 |
678 |
739 /** |
679 /** |
740 * When replying or forwarding a message determine the "To:" field's value. |
680 * When replying or forwarding a message determine the "To:" field's value. |
750 * @param aMailBoxNameHasChanged - used to return to the caller if a change is detected. |
690 * @param aMailBoxNameHasChanged - used to return to the caller if a change is detected. |
751 * @param aMailBoxId - the ID of the mailbox |
691 * @param aMailBoxId - the ID of the mailbox |
752 */ |
692 */ |
753 void RefreshCachedMailBoxDisplayNameL( TBool& aMailBoxNameHasChanged, const TMsgStoreId& aMailBoxId ); |
693 void RefreshCachedMailBoxDisplayNameL( TBool& aMailBoxNameHasChanged, const TMsgStoreId& aMailBoxId ); |
754 |
694 |
755 virtual void ReportRequestStatusL( |
695 IMPORT_C virtual void ReportRequestStatusL( |
756 TMsgStoreId aMailBox, |
696 TMsgStoreId aMailBox, |
757 TMsgStoreId aOtherId, |
697 TMsgStoreId aOtherId, |
758 TMsgStoreId aMsgId, |
698 TMsgStoreId aMsgId, |
759 TMsgStoreId aPartId, |
699 TMsgStoreId aPartId, |
760 TBool aCanReportCompletion = EFalse ); |
700 TBool aCanReportCompletion = EFalse ); |
761 |
701 |
762 /** |
702 /** |
763 * Finds the corresponding download request object for the part with id |
703 * Finds the corresponding download request object for the part with id |
764 * of aPartId identified by also the mailbox and the message ids. |
704 * of aPartId identified by also the mailbox and the message ids. |
765 */ |
705 */ |
766 TBool FindFetchRequestL( |
706 IMPORT_C TBool FindFetchRequestL( |
767 TMsgStoreId aMailBox, |
707 TMsgStoreId aMailBox, |
768 TMsgStoreId aOtherId, |
708 TMsgStoreId aOtherId, |
769 TMsgStoreId aMsgId, |
709 TMsgStoreId aMsgId, |
770 TMsgStoreId aPartId, |
710 TMsgStoreId aPartId, |
771 CBasePlugin::TOngoingFetchInfo& aOngoingFetchInfo ); |
711 CBasePlugin::TOngoingFetchInfo& aOngoingFetchInfo ); |
772 |
712 |
773 TBool DeleteFetchRequestForPart( |
713 IMPORT_C TBool DeleteFetchRequestForPart( |
774 TOngoingFetchInfo& aFetchInfo ); |
714 TOngoingFetchInfo& aFetchInfo ); |
775 |
715 |
776 void DeleteFetchRequest( |
716 IMPORT_C void DeleteFetchRequest( |
777 TOngoingFetchInfo& aFetchInfo ); |
717 TOngoingFetchInfo& aFetchInfo ); |
778 |
718 |
779 |
719 |
780 protected: |
720 protected: |
781 void ResetCache(); |
721 IMPORT_C void ResetCache(); |
782 |
722 |
783 void ResetBodyCache(); |
723 IMPORT_C void ResetBodyCache(); |
784 |
724 |
785 /** |
725 /** |
786 * This method retrieves the specified message store message from a |
726 * This method retrieves the specified message store message from a |
787 * cache or directly from the message store if not cached. If the |
727 * cache or directly from the message store if not cached. If the |
788 * message was retrieved from the message store it is put into the |
728 * message was retrieved from the message store it is put into the |
791 * invalid it must call the ResetCache method. |
731 * invalid it must call the ResetCache method. |
792 * |
732 * |
793 * @param aMailBoxId |
733 * @param aMailBoxId |
794 * @param aMsgId |
734 * @param aMsgId |
795 */ |
735 */ |
796 CMsgStoreMessage* GetCachedMsgL( |
736 IMPORT_C CMsgStoreMessage* GetCachedMsgL( |
797 TMsgStoreId aMailBoxId, |
737 TMsgStoreId aMailBoxId, |
798 TMsgStoreId aMsgId ); |
738 TMsgStoreId aMsgId ); |
799 |
739 |
800 CMsgStoreMessagePart* GetCachedBodyL( |
740 IMPORT_C CMsgStoreMessagePart* GetCachedBodyL( |
801 TMsgStoreId aPartId ); |
741 TMsgStoreId aPartId ); |
802 |
742 |
803 RPointerArray<CMsgStoreMessagePart>& GetCachedMsgChildrenL(); |
743 IMPORT_C RPointerArray<CMsgStoreMessagePart>& GetCachedMsgChildrenL(); |
804 |
744 |
805 RPointerArray<CMsgStoreMessagePart>& GetCachedBodyChildrenL(); |
745 IMPORT_C RPointerArray<CMsgStoreMessagePart>& GetCachedBodyChildrenL(); |
806 |
746 |
807 void InvalidateCacheIfNecessary( |
747 IMPORT_C void InvalidateCacheIfNecessary( |
808 TMsgStoreId aId, |
748 TMsgStoreId aId, |
809 TMsgStoreId aParentId, |
749 TMsgStoreId aParentId, |
810 TMsgStoreId aOtherId ); |
750 TMsgStoreId aOtherId ); |
811 |
751 |
812 virtual const TDesC& CBasePlugin::CalendarFileName() const; |
752 IMPORT_C virtual const TDesC& CBasePlugin::CalendarFileName() const; |
813 |
753 |
814 public: |
754 public: |
815 |
755 |
816 /** |
756 /** |
817 * Direct message sending that does not require having a FW message |
757 * Direct message sending that does not require having a FW message |
818 * instance. The FW's SendMessageL method internally uses this method |
758 * instance. The FW's SendMessageL method internally uses this method |
819 * after translating the FW message to the MsgStore format. |
759 * after translating the FW message to the MsgStore format. |
820 */ |
760 */ |
821 void SendMessageL( |
761 IMPORT_C void SendMessageL( |
822 CMsgStoreMailBox& aMailBox, |
762 CMsgStoreMailBox& aMailBox, |
823 CMsgStoreMessage& aMsg, |
763 CMsgStoreMessage& aMsg, |
824 const TTime& aSentTime ); |
764 const TTime& aSentTime ); |
825 |
765 |
826 /** |
766 /** |
827 * The delayed ops manager is used to queue asynchronous processing of |
767 * The delayed ops manager is used to queue asynchronous processing of |
828 * plugin requests. |
768 * plugin requests. |
829 */ |
769 */ |
830 MDelayedOpsManager& GetDelayedOpsManager(); |
770 IMPORT_C MDelayedOpsManager& GetDelayedOpsManager(); |
831 |
771 |
832 protected: |
772 protected: |
833 |
773 |
834 CMsgStore* iMsgStore; |
774 CMsgStore* iMsgStore; |
835 RMap<TInt64, CMailboxInfo> iMailboxes; |
775 RMap<TInt64, CMailboxInfo> iMailboxes; |
836 |
776 |
837 //does not actually own the observers. |
777 //does not actually own the observers. |
838 RPointerArray<MFSMailEventObserver> iObservers; |
778 RPointerArray<MFSMailEventObserver> iObservers; |
839 //async fetch reqs. |
779 //async fetch reqs. |
840 RPointerArray<CFetchRequester> iReqs; |
780 RPointerArray<CFetchRequester> iReqs; |
841 RPointerArray<CDelayedOp> iDelayedOpReqs; |
|
842 |
781 |
843 TCacheLine iCacheLine; |
782 TCacheLine iCacheLine; |
844 |
783 |
845 private: |
784 private: |
846 protected: |
785 protected: |
871 /** |
810 /** |
872 * There is mailbox-related state information that is used to bind |
811 * There is mailbox-related state information that is used to bind |
873 * the FSEF representation and the MsgStore one. This entity groups |
812 * the FSEF representation and the MsgStore one. This entity groups |
874 * it in one place. |
813 * it in one place. |
875 */ |
814 */ |
876 NONSHARABLE_CLASS( CMailboxInfo ) : public CBase |
815 class CMailboxInfo : public CBase |
877 { |
816 { |
878 public: |
817 public: |
879 CMailboxInfo( CBasePlugin* aBasePlugin ) |
818 CMailboxInfo( CBasePlugin* aBasePlugin ) |
880 : iBasePlugin( aBasePlugin ) |
819 : iBasePlugin( aBasePlugin ) |
881 { |
820 { |