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