17 |
17 |
18 |
18 |
19 #ifndef IPSPLGSOSBASEPLUGIN_H |
19 #ifndef IPSPLGSOSBASEPLUGIN_H |
20 #define IPSPLGSOSBASEPLUGIN_H |
20 #define IPSPLGSOSBASEPLUGIN_H |
21 |
21 |
22 //<cmail> |
22 #include "CFSMailPlugin.h" |
23 #include "cfsmailplugin.h" |
23 #include "MFSMailRequestObserver.h" |
24 #include "mfsmailrequestobserver.h" |
|
25 //</cmail> |
|
26 #include <rconnmon.h> |
24 #include <rconnmon.h> |
27 |
|
28 #include "ipsplgsosbaseplugin.hrh" |
25 #include "ipsplgsosbaseplugin.hrh" |
29 #include "ipsplgcommon.h" |
26 #include "ipsplgcommon.h" |
30 #include "ipsplgsingleopwatcher.h" |
27 #include "ipsplgsingleopwatcher.h" |
31 #include "ipsplgtimeroperation.h" |
28 #include "ipsplgtimeroperation.h" |
32 |
29 //<Qmail> |
|
30 #include "ipsstateextension.h" |
|
31 //</Qmail> |
33 class CMsvSession; |
32 class CMsvSession; |
34 class CIpsPlgTimerOperation; |
33 class CIpsPlgTimerOperation; |
35 class CIpsPlgMsgMapper; |
34 class CIpsPlgMsgMapper; |
36 class CImEmailMessage; |
35 class CImEmailMessage; |
37 class CIpsPlgMruList; |
36 class CIpsPlgMruList; |
38 class CIpsPlgSettingsObserver; |
37 class CIpsPlgSettingsObserver; |
39 class CRepository; |
38 class CRepository; |
40 class CIpsPlgSearch; |
39 class CIpsPlgSearch; |
41 class CIpsSetDataApi; |
40 // <qmail> CIpsSetDataApi removed |
42 class CIpsPlgSmtpService; |
41 class CIpsPlgSmtpService; |
43 class CIpsPlgSyncStateHandler; |
42 class CIpsPlgSyncStateHandler; |
44 class CIpsPlgEventHandler; |
43 class CIpsPlgEventHandler; |
45 class CIpsPlgOperationWait; |
|
46 |
44 |
47 /** |
45 /** |
48 * FreestyleIpsServices plugin class |
46 * FreestyleIpsServices plugin class |
49 * |
47 * |
50 * @lib ipssosplugin.lib |
48 * @lib ipssosplugin.lib |
51 * @since FSEmail 2.0 |
49 * @since FSEmail 2.0 |
52 */ |
50 */ |
53 class CIpsPlgSosBasePlugin : |
51 NONSHARABLE_CLASS ( CIpsPlgSosBasePlugin ) : |
54 public CFSMailPlugin, |
52 public CFSMailPlugin, |
55 public MIpsPlgSingleOpWatcher, |
53 public MIpsPlgSingleOpWatcher, |
56 public MFSMailRequestObserver, // a dummy observer |
54 public MFSMailRequestObserver, // a dummy observer |
57 public MIpsPlgTimerOperationCallBack |
55 public MIpsPlgTimerOperationCallBack, |
|
56 public MStateObserverCallback |
58 { |
57 { |
59 |
58 //<Qmail> |
|
59 public: //from MStateObserverCallback |
|
60 void ActiveFolderChanged( |
|
61 const TFSMailMsgId& aActiveMailboxId, |
|
62 const TFSMailMsgId& aActiveFolderId); |
|
63 |
|
64 public://from CExtendableEmail |
|
65 |
|
66 CEmailExtension* ExtensionL( const TUid& aInterfaceUid ); |
|
67 //</Qmail> |
60 public: |
68 public: |
61 |
69 |
62 /** |
70 /** |
63 * ~CIpsPlgSosBasePlugin |
71 * ~CIpsPlgSosBasePlugin |
64 * Destructor |
72 * Destructor |
65 */ |
73 */ |
66 IMPORT_C virtual ~CIpsPlgSosBasePlugin(); |
74 IMPORT_C virtual ~CIpsPlgSosBasePlugin(); |
67 |
75 |
68 public: //from MIpsPlgSingleOpWatcher |
76 public: //from MIpsPlgSingleOpWatcher |
69 |
77 |
70 /** |
78 /** |
71 * |
79 * |
72 */ |
80 */ |
175 |
183 |
176 virtual void DeleteMessagesByUidL( |
184 virtual void DeleteMessagesByUidL( |
177 const TFSMailMsgId& aMailBoxId, |
185 const TFSMailMsgId& aMailBoxId, |
178 const TFSMailMsgId& aFolderId, |
186 const TFSMailMsgId& aFolderId, |
179 const RArray<TFSMailMsgId>& aMessages ); |
187 const RArray<TFSMailMsgId>& aMessages ); |
|
188 |
|
189 //<qmail> |
|
190 virtual void DeleteMessagesByUidL( |
|
191 const TFSMailMsgId& aMailBoxId, |
|
192 const TFSMailMsgId& aFolderId, |
|
193 const RArray<TFSMailMsgId>& aMessages, |
|
194 MFSMailRequestObserver& aOperationObserver, |
|
195 const TInt aRequestId); |
|
196 //</qmail> |
180 |
197 |
181 // MESSAGE STORE OPERATIONS |
198 // MESSAGE STORE OPERATIONS |
182 |
199 |
183 virtual CFSMailMessage* CreateMessageToSendL( |
200 virtual CFSMailMessage* CreateMessageToSendL( |
184 const TFSMailMsgId& aMailBoxId ); |
201 const TFSMailMsgId& aMailBoxId ); |
|
202 |
|
203 // <qmail> |
|
204 /** |
|
205 * Creates new email message to message store asynchronously |
|
206 * |
|
207 * @param aMailBoxId msv entry id to mailbox which setting are used |
|
208 * @param aOperationObserver Observer for the operation |
|
209 * @param aRequestId Id of the operation |
|
210 */ |
|
211 virtual void CreateMessageToSendL( |
|
212 const TFSMailMsgId& aMailBoxId, |
|
213 MFSMailRequestObserver& aOperationObserver, |
|
214 const TInt aRequestId ); |
|
215 // </qmail> |
185 |
216 |
186 virtual CFSMailMessage* CreateForwardMessageL( |
217 virtual CFSMailMessage* CreateForwardMessageL( |
187 const TFSMailMsgId& aMailBoxId, |
218 const TFSMailMsgId& aMailBoxId, |
188 const TFSMailMsgId& aOriginalMessageId, |
219 const TFSMailMsgId& aOriginalMessageId, |
189 const TDesC& aHeaderDescriptor ); |
220 const TDesC& aHeaderDescriptor ); |
|
221 |
|
222 // <qmail> |
|
223 /** |
|
224 * Creates a forward email message to message store asynchronously |
|
225 * |
|
226 * @param aMailBoxId msv entry id to mailbox which setting are used |
|
227 * @param aOriginalMessageId id of the forwarded message |
|
228 * @param aOperationObserver Observer for the operation |
|
229 * @param aRequestId Id of the operation |
|
230 */ |
|
231 virtual void CreateForwardMessageL( |
|
232 const TFSMailMsgId& aMailBoxId, |
|
233 const TFSMailMsgId& aOriginalMessageId, |
|
234 MFSMailRequestObserver& aOperationObserver, |
|
235 const TInt aRequestId, |
|
236 const TDesC& aHeaderDescriptor = KNullDesC ); |
|
237 // </qmail> |
190 |
238 |
191 virtual CFSMailMessage* CreateReplyMessageL( |
239 virtual CFSMailMessage* CreateReplyMessageL( |
192 const TFSMailMsgId& aMailBoxId, |
240 const TFSMailMsgId& aMailBoxId, |
193 const TFSMailMsgId& aOriginalMessageId, |
241 const TFSMailMsgId& aOriginalMessageId, |
194 const TBool aReplyToAll, |
242 const TBool aReplyToAll, |
195 const TDesC& aHeaderDescriptor ); |
243 const TDesC& aHeaderDescriptor ); |
196 |
244 |
|
245 // <qmail> |
|
246 /** |
|
247 * Creates new reply message to message store asynchronously |
|
248 * |
|
249 * @param aMailBoxId msv entry id to mailbox which setting are used |
|
250 * @param aOriginalMessageId id of the replied message |
|
251 * @param aReplyToAll reply to all recipients |
|
252 * @param aOperationObserver Observer for the operation |
|
253 * @param aRequestId Id of the operation |
|
254 */ |
|
255 virtual void CreateReplyMessageL( |
|
256 const TFSMailMsgId& aMailBoxId, |
|
257 const TFSMailMsgId& aOriginalMessageId, |
|
258 const TBool aReplyToAll, |
|
259 MFSMailRequestObserver& aOperationObserver, |
|
260 const TInt aRequestId, |
|
261 const TDesC& aHeaderDescriptor ); |
|
262 // </qmail> |
|
263 |
197 virtual void StoreMessageL( |
264 virtual void StoreMessageL( |
198 const TFSMailMsgId& aMailBoxId, |
265 const TFSMailMsgId& aMailBoxId, |
199 CFSMailMessage& aMessage ); |
266 CFSMailMessage& aMessage ); |
200 |
267 |
|
268 |
|
269 // <qmail> |
|
270 virtual void StoreMessagesL( |
|
271 const TFSMailMsgId& aMailBoxId, |
|
272 RPointerArray<CFSMailMessage> &messages, |
|
273 MFSMailRequestObserver& aOperationObserver, |
|
274 const TInt aRequestId ); |
|
275 // </qmail> |
|
276 |
201 virtual void GetMessagesL( |
277 virtual void GetMessagesL( |
202 const TFSMailMsgId& aMailBoxId, |
278 const TFSMailMsgId& aMailBoxId, |
203 const TFSMailMsgId& aFolderId, |
279 const TFSMailMsgId& aFolderId, |
204 const RArray<TFSMailMsgId>& aMessageIds, |
280 const RArray<TFSMailMsgId>& aMessageIds, |
205 RPointerArray<CFSMailMessage>& aMessageList, |
281 RPointerArray<CFSMailMessage>& aMessageList, |
225 const TFSMailMsgId& aParentFolderId, |
301 const TFSMailMsgId& aParentFolderId, |
226 const TFSMailMsgId& aMessageId, |
302 const TFSMailMsgId& aMessageId, |
227 const TFSMailMsgId& aParentPartId, |
303 const TFSMailMsgId& aParentPartId, |
228 const TDesC& aContentType, |
304 const TDesC& aContentType, |
229 const TDesC& aFilePath ); |
305 const TDesC& aFilePath ); |
|
306 |
|
307 // <qmail> |
|
308 virtual void NewChildPartFromFileL( |
|
309 const TFSMailMsgId& aMailBoxId, |
|
310 const TFSMailMsgId& aParentFolderId, |
|
311 const TFSMailMsgId& aMessageId, |
|
312 const TFSMailMsgId& aParentPartId, |
|
313 const TDesC& aContentType, |
|
314 const TDesC& aFilePath, |
|
315 MFSMailRequestObserver& aOperationObserver, |
|
316 const TInt aRequestId ); |
|
317 // </qmail> |
230 |
318 |
231 /** |
319 /** |
232 * Creates attachment based on file handle |
320 * Creates attachment based on file handle |
233 * @param aMailBoxId specifies the mailbox |
321 * @param aMailBoxId specifies the mailbox |
234 * @param aParentFolderId specifies the folder where message is |
322 * @param aParentFolderId specifies the folder where message is |
257 const TFSMailMsgId& aMailBoxId, |
345 const TFSMailMsgId& aMailBoxId, |
258 const TFSMailMsgId& aParentFolderId, |
346 const TFSMailMsgId& aParentFolderId, |
259 const TFSMailMsgId& aMessageId, |
347 const TFSMailMsgId& aMessageId, |
260 const TFSMailMsgId& aParentPartId, |
348 const TFSMailMsgId& aParentPartId, |
261 const TFSMailMsgId& aPartId); |
349 const TFSMailMsgId& aPartId); |
262 |
350 |
|
351 // <qmail> |
|
352 virtual void RemoveChildPartL( |
|
353 const TFSMailMsgId& aMailBoxId, |
|
354 const TFSMailMsgId& aParentFolderId, |
|
355 const TFSMailMsgId& aMessageId, |
|
356 const TFSMailMsgId& aParentPartId, |
|
357 const TFSMailMsgId& aPartId, |
|
358 MFSMailRequestObserver& aOperationObserver, |
|
359 const TInt aRequestId ); |
|
360 // </qmail> |
|
361 |
263 virtual CFSMailMessagePart* MessagePartL( |
362 virtual CFSMailMessagePart* MessagePartL( |
264 const TFSMailMsgId& aMailBoxId, |
363 const TFSMailMsgId& aMailBoxId, |
265 const TFSMailMsgId& aParentFolderId, |
364 const TFSMailMsgId& aParentFolderId, |
266 const TFSMailMsgId& aMessageId, |
365 const TFSMailMsgId& aMessageId, |
267 const TFSMailMsgId& aMessagePartId); |
366 const TFSMailMsgId& aMessagePartId); |
312 const TFSMailMsgId& aMailBoxId, |
411 const TFSMailMsgId& aMailBoxId, |
313 const TFSMailMsgId& aParentFolderId, |
412 const TFSMailMsgId& aParentFolderId, |
314 const TFSMailMsgId& aMessageId, |
413 const TFSMailMsgId& aMessageId, |
315 CFSMailMessagePart& aMessagePart); |
414 CFSMailMessagePart& aMessagePart); |
316 |
415 |
|
416 //<qmail> |
|
417 virtual void StoreMessagePartsL( |
|
418 RPointerArray<CFSMailMessagePart>& aMessagePart, |
|
419 MFSMailRequestObserver& aOperationObserver, |
|
420 const TInt aRequestId ); |
|
421 //<qmail> |
|
422 |
317 virtual void UnregisterRequestObserver( TInt aRequestId ); |
423 virtual void UnregisterRequestObserver( TInt aRequestId ); |
318 |
424 |
319 // MESSAGE SENDING |
425 // MESSAGE SENDING |
320 |
426 |
321 virtual void SendL(TFSMailMsgId aMessageId ); |
427 virtual void SendL(TFSMailMsgId aMessageId ); |
322 |
428 |
323 virtual void SendMessageL( CFSMailMessage& aMessage ); |
429 virtual void SendMessageL( CFSMailMessage& aMessage ); |
|
430 |
|
431 virtual void SendMessageL( |
|
432 CFSMailMessage& aMessage, |
|
433 MFSMailRequestObserver& aOperationObserver, |
|
434 const TInt aRequestId ); |
324 |
435 |
325 // OPERATION HANDLING |
436 // OPERATION HANDLING |
326 |
437 |
327 virtual void GoOnlineL( const TFSMailMsgId& aMailBoxId ); |
438 virtual void GoOnlineL( const TFSMailMsgId& aMailBoxId ); |
328 |
439 |
612 void FixReplyForwardHeaderL( |
737 void FixReplyForwardHeaderL( |
613 CFSMailMessage* aMessage, |
738 CFSMailMessage* aMessage, |
614 const TFSMailMsgId& aMailBoxId, |
739 const TFSMailMsgId& aMailBoxId, |
615 const TFSMailMsgId& aOriginalMessageId, |
740 const TFSMailMsgId& aOriginalMessageId, |
616 const TDesC& aHeaderDescriptor ); |
741 const TDesC& aHeaderDescriptor ); |
617 |
742 |
618 /** |
743 private: |
619 * Resolves the possible signature text to be added to message body. |
|
620 * |
|
621 * @return Pointer to the descriptor containing the signature text, or |
|
622 * NULL if signature adding is not set or signature text is |
|
623 * of zero length. Ownership to caller. |
|
624 */ |
|
625 HBufC* ResolveSignatureTextL( const TFSMailMsgId& aMailBoxId ); |
|
626 |
744 |
627 /** |
745 /** |
628 * Maps symbian msv api's folder type to fs folder type |
746 * Maps symbian msv api's folder type to fs folder type |
629 */ |
747 */ |
630 TFSFolderType GetFolderType( |
748 TFSFolderType GetFolderType( |