16 */ |
16 */ |
17 |
17 |
18 |
18 |
19 //MsgStore. |
19 //MsgStore. |
20 //<cmail> |
20 //<cmail> |
21 #include "msgstore.h" |
21 #include "MsgStore.h" |
22 #include "msgstoreaccount.h" |
22 #include "MsgStoreAccount.h" |
23 #include "msgstoremailbox.h" |
23 #include "MsgStoreMailBox.h" |
24 #include "msgstoremessage.h" |
24 #include "MsgStoreMessage.h" |
25 #include "msgstorefolder.h" |
25 #include "MsgStoreFolder.h" |
26 #include "msgstorepropertycontainer.h" |
26 #include "MsgStorePropertyContainer.h" |
27 #include "msgstorepropertykeys.h" |
27 #include "MsgStorePropertyKeys.h" |
28 #include "msgstoresortcriteria.h" |
28 #include "MsgStoreSortCriteria.h" |
29 #include "msgstoresortresultiterator.h" |
29 #include "MsgStoreSortResultIterator.h" |
30 //Freestyle. |
30 //Freestyle. |
31 #include "cfsmailcommon.h" |
31 #include "CFSMailCommon.h" |
32 #include "cfsmailmessage.h" |
32 #include "CFSMailMessage.h" |
33 #include "cmrcalendarinfo.h" |
33 #include "cmrcalendarinfo.h" |
34 //</cmail> |
34 //</cmail> |
35 //Base plugin. |
35 //Base plugin. |
36 #include "baseplugin.h" |
36 #include "BasePlugin.h" |
37 #include "basepluginpanic.h" |
37 #include "BasePluginPanic.h" |
38 #include "baseplugincommonutils.h" |
38 #include "baseplugincommonutils.h" |
39 #include "mailiterator.h" |
39 #include "MailIterator.h" |
40 #include "baseplugindelayedopsprivate.h" |
40 #include "baseplugindelayedopsprivate.h" |
|
41 |
|
42 //<qmail> |
|
43 #include "CFSMailFolder.h" |
|
44 #include "baseplugindef.h" |
|
45 //</qmail> |
|
46 |
41 // Other |
47 // Other |
42 #include <e32base.h> |
48 #include <e32base.h> |
43 #include <utf.h> |
49 #include <utf.h> |
44 #include <calsession.h> |
50 #include <calsession.h> |
45 |
51 |
|
52 //<qmail> |
46 //<cmail> |
53 //<cmail> |
47 #include "FreestyleEmailUiConstants.h" |
54 //#include "freestyleemailuiconstants.h" // removed from 10.1 |
48 //</cmail> |
55 //</cmail> |
49 |
56 //</qmail> |
50 //size of the read buffer when reading body content from the quoted |
57 //size of the read buffer when reading body content from the quoted |
51 //message when replying/forwarding. |
58 //message when replying/forwarding. |
52 const TInt KQuotedReadBufferSize = 1024*64; |
59 const TInt KQuotedReadBufferSize = 1024*64; |
53 |
60 |
54 |
61 |
91 |
98 |
92 |
99 |
93 /** |
100 /** |
94 * |
101 * |
95 */ |
102 */ |
96 EXPORT_C CBasePlugin::CBasePlugin() |
103 CBasePlugin::CBasePlugin() |
97 : iMailboxes( RMap<TInt, CMailboxInfo>::CompareInt ) |
104 : iMailboxes( RMap<TInt, CMailboxInfo>::CompareInt ) |
98 { |
105 { |
99 } |
106 } |
100 |
107 |
101 |
108 |
102 /** |
109 /** |
103 * |
110 * |
104 */ |
111 */ |
105 EXPORT_C CBasePlugin::~CBasePlugin() |
112 CBasePlugin::~CBasePlugin() |
106 { |
113 { |
107 //needs to be first thing to do as it might force execution of operations |
114 //needs to be first thing to do as it might force execution of operations |
108 //that depend on the plugin's current state. |
115 //that depend on the plugin's current state. |
109 delete iDelayedOpsManager; |
116 delete iDelayedOpsManager; |
110 |
117 |
111 iMailboxes.ResetAndDestroy(); |
118 iMailboxes.ResetAndDestroy(); |
112 iMailboxes.Close(); |
119 iMailboxes.Close(); |
113 |
120 |
114 if ( iObservers.Count() > 0 ) |
121 //<qmail> |
|
122 if ( iObservers.Count() > 0 && iMsgStore ) |
|
123 //</qmail> |
115 { |
124 { |
116 TRAP_IGNORE( iMsgStore->RemoveObserverL( this ) ); |
125 TRAP_IGNORE( iMsgStore->RemoveObserverL( this ) ); |
117 } |
126 } |
118 iObservers.Close(); |
127 iObservers.Close(); |
119 |
128 |
120 delete iMsgStore; |
129 delete iMsgStore; |
121 |
130 |
122 iReqs.ResetAndDestroy(); |
131 iReqs.ResetAndDestroy(); |
123 iReqs.Close(); |
132 iReqs.Close(); |
124 |
133 //<qmail> |
|
134 // Note that all the ops in iDelayedOpReqs array (if any) have already been |
|
135 // deleted in the destructor of CDelayedOpsManager class. |
|
136 iDelayedOpReqs.Reset(); |
|
137 iDelayedOpReqs.Close(); |
|
138 //</qmail> |
125 ResetCache(); |
139 ResetCache(); |
126 |
140 |
127 __LOG_DESTRUCT |
141 __LOG_DESTRUCT |
128 } |
142 } |
129 |
143 |
133 |
147 |
134 /** |
148 /** |
135 * Note that as the msgstore performs the delete immediately the observer will get |
149 * Note that as the msgstore performs the delete immediately the observer will get |
136 * called from within this method. |
150 * called from within this method. |
137 */ |
151 */ |
138 EXPORT_C void CBasePlugin::DeleteMailBoxByUidL( |
152 void CBasePlugin::DeleteMailBoxByUidL( |
139 const TFSMailMsgId& aMailBoxId, |
153 const TFSMailMsgId& aMailBoxId, |
140 MFSMailRequestObserver& aOperationObserver, |
154 MFSMailRequestObserver& aOperationObserver, |
141 const TInt aRequestId ) |
155 const TInt aRequestId ) |
142 { |
156 { |
143 __LOG_ENTER( "DeleteMailBoxByUidL" ) |
157 __LOG_ENTER( "DeleteMailBoxByUidL" ) |
302 |
316 |
303 /** |
317 /** |
304 * |
318 * |
305 * @param aMailBoxId if not found leaves with KErrNotFound. |
319 * @param aMailBoxId if not found leaves with KErrNotFound. |
306 */ |
320 */ |
307 EXPORT_C TFSMailMsgId CBasePlugin::GetStandardFolderIdL( |
321 TFSMailMsgId CBasePlugin::GetStandardFolderIdL( |
308 const TFSMailMsgId& aMailBoxId, |
322 const TFSMailMsgId& aMailBoxId, |
309 const TFSFolderType aFolderType ) |
323 const TFSFolderType aFolderType ) |
310 |
324 |
311 { |
325 { |
312 __LOG_ENTER( "GetStandardFolderIdL" ) |
326 __LOG_ENTER( "GetStandardFolderIdL" ) |
330 * Note that the unseen count is not set by the plugin as this information is not |
344 * Note that the unseen count is not set by the plugin as this information is not |
331 * readily available. |
345 * readily available. |
332 * |
346 * |
333 * @param aMailBoxId if not found leaves with KErrNotFound. |
347 * @param aMailBoxId if not found leaves with KErrNotFound. |
334 */ |
348 */ |
335 EXPORT_C CFSMailFolder* CBasePlugin::GetFolderByUidL( |
349 CFSMailFolder* CBasePlugin::GetFolderByUidL( |
336 const TFSMailMsgId& aMailBoxId, |
350 const TFSMailMsgId& aMailBoxId, |
337 const TFSMailMsgId& aFolderId ) |
351 const TFSMailMsgId& aFolderId ) |
338 |
352 |
339 { |
353 { |
340 __LOG_ENTER( "GetFolderByUidL" ) |
354 __LOG_ENTER( "GetFolderByUidL" ) |
401 /** |
415 /** |
402 * @param aFolderId parent folder id. |
416 * @param aFolderId parent folder id. |
403 * @param aMailBoxId if not found leaves with KErrNotFound. |
417 * @param aMailBoxId if not found leaves with KErrNotFound. |
404 * @return if the folder already exists returns the existing one. |
418 * @return if the folder already exists returns the existing one. |
405 */ |
419 */ |
406 EXPORT_C CFSMailFolder* CBasePlugin::CreateFolderL( |
420 CFSMailFolder* CBasePlugin::CreateFolderL( |
407 const TFSMailMsgId& aMailBoxId, |
421 const TFSMailMsgId& aMailBoxId, |
408 const TFSMailMsgId& aParentFolderId, |
422 const TFSMailMsgId& aParentFolderId, |
409 const TDesC& aFolderName, |
423 const TDesC& aFolderName, |
410 const TBool aSync ) |
424 const TBool aSync ) |
411 |
425 |
447 |
461 |
448 /** |
462 /** |
449 * |
463 * |
450 * @param aMailBoxId if not found leaves with KErrNotFound. |
464 * @param aMailBoxId if not found leaves with KErrNotFound. |
451 */ |
465 */ |
452 EXPORT_C void CBasePlugin::DeleteFolderByUidL( |
466 void CBasePlugin::DeleteFolderByUidL( |
453 const TFSMailMsgId& aMailBoxId, |
467 const TFSMailMsgId& aMailBoxId, |
454 const TFSMailMsgId& aFolder ) |
468 const TFSMailMsgId& aFolder ) |
455 |
469 |
456 { |
470 { |
457 __LOG_ENTER( "DeleteFolderByUidL" ) |
471 __LOG_ENTER( "DeleteFolderByUidL" ) |
506 |
520 |
507 /** |
521 /** |
508 * |
522 * |
509 * @param aMailBoxId if not found leaves with KErrNotFound. |
523 * @param aMailBoxId if not found leaves with KErrNotFound. |
510 */ |
524 */ |
511 EXPORT_C MFSMailIterator* CBasePlugin::ListMessagesL( |
525 MFSMailIterator* CBasePlugin::ListMessagesL( |
512 const TFSMailMsgId& aMailBoxId, |
526 const TFSMailMsgId& aMailBoxId, |
513 const TFSMailMsgId& aFolderId, |
527 const TFSMailMsgId& aFolderId, |
514 const TFSMailDetails aDetails, |
528 const TFSMailDetails aDetails, |
515 const RArray<TFSMailSortCriteria>& aSorting ) |
529 const RArray<TFSMailSortCriteria>& aSorting ) |
516 |
530 |
585 |
599 |
586 /** |
600 /** |
587 * |
601 * |
588 * @param aMailBoxId if not found leaves with KErrNotFound. |
602 * @param aMailBoxId if not found leaves with KErrNotFound. |
589 */ |
603 */ |
590 EXPORT_C CFSMailMessage* CBasePlugin::GetMessageByUidL( |
604 CFSMailMessage* CBasePlugin::GetMessageByUidL( |
591 const TFSMailMsgId& aMailBoxId, |
605 const TFSMailMsgId& aMailBoxId, |
592 const TFSMailMsgId& /*aFolderId*/, |
606 const TFSMailMsgId& /*aFolderId*/, |
593 const TFSMailMsgId& aMessageId, |
607 const TFSMailMsgId& aMessageId, |
594 const TFSMailDetails aDetails ) |
608 const TFSMailDetails aDetails ) |
595 |
609 |
610 |
624 |
611 /** |
625 /** |
612 * |
626 * |
613 * @param aMailBoxId if not found leaves with KErrNotFound. |
627 * @param aMailBoxId if not found leaves with KErrNotFound. |
614 */ |
628 */ |
615 EXPORT_C void CBasePlugin::DeleteMessagesByUidL( |
629 void CBasePlugin::DeleteMessagesByUidL( |
616 const TFSMailMsgId& aMailBoxId, |
630 const TFSMailMsgId& aMailBoxId, |
617 const TFSMailMsgId& aFolderId, |
631 const TFSMailMsgId& aFolderId, |
618 const RArray<TFSMailMsgId>& aMessages ) |
632 const RArray<TFSMailMsgId>& aMessages ) |
619 |
633 |
620 { |
634 { |
632 /** |
646 /** |
633 * Drafts folder assumed. |
647 * Drafts folder assumed. |
634 * |
648 * |
635 * @param aMailBoxId if not found leaves with KErrNotFound. |
649 * @param aMailBoxId if not found leaves with KErrNotFound. |
636 */ |
650 */ |
637 EXPORT_C CFSMailMessage* CBasePlugin::CreateMessageToSendL( |
651 CFSMailMessage* CBasePlugin::CreateMessageToSendL( |
638 const TFSMailMsgId& aMailBox ) |
652 const TFSMailMsgId& aMailBox ) |
639 |
653 |
640 { |
654 { |
641 __LOG_ENTER( "CreateMessageToSendL" ) |
655 __LOG_ENTER( "CreateMessageToSendL" ) |
642 |
656 |
736 CleanupStack::PopAndDestroy( textPlain ); |
750 CleanupStack::PopAndDestroy( textPlain ); |
737 if ( signature ) |
751 if ( signature ) |
738 { |
752 { |
739 CleanupStack::PopAndDestroy( signature ); |
753 CleanupStack::PopAndDestroy( signature ); |
740 } |
754 } |
|
755 |
|
756 //<qmail> |
|
757 //create the text/html part. |
|
758 props = CMsgStorePropertyContainer::NewL(); |
|
759 CleanupStack::PushL( props ); |
|
760 |
|
761 props->AddPropertyL( |
|
762 KMsgStorePropertyContentType, KFSMailContentTypeTextHtml ); |
|
763 |
|
764 props->AddPropertyL( KMsgStorePropertyCharset, KMessageBodyCharset ); |
|
765 |
|
766 props->AddPropertyL( |
|
767 KMsgStorePropertyContentDisposition, KMessageBodyDisposition ); |
|
768 |
|
769 CMsgStoreMessagePart* htmlPlain = bodyPart->AddChildPartL( *props ); |
|
770 CleanupStack::PopAndDestroy( props ); |
|
771 CleanupStack::PushL( htmlPlain ); |
|
772 htmlPlain->AppendToContentL(KNullDesC8); |
|
773 CleanupStack::PopAndDestroy( htmlPlain ); |
|
774 //</qmail> |
|
775 |
|
776 //delete body part |
741 CleanupStack::PopAndDestroy( bodyPart ); |
777 CleanupStack::PopAndDestroy( bodyPart ); |
742 |
778 |
743 //done. |
779 //done. |
744 message->CommitL(); |
780 message->CommitL(); |
745 |
781 |
755 |
791 |
756 __LOG_EXIT |
792 __LOG_EXIT |
757 return result; |
793 return result; |
758 } |
794 } |
759 |
795 |
760 |
796 // <qmail> |
761 /** |
797 /** |
762 * |
798 * |
763 */ |
799 */ |
764 EXPORT_C CFSMailMessage* CBasePlugin::CreateForwardMessageL( |
800 void CBasePlugin::CreateMessageToSendL( |
|
801 const TFSMailMsgId& aMailBoxId, |
|
802 MFSMailRequestObserver& aOperationObserver, |
|
803 const TInt aRequestId) |
|
804 { |
|
805 CDelayedMessageToSendOp* delayedOp = CDelayedMessageToSendOp::NewLC( |
|
806 *this,aMailBoxId,aOperationObserver,aRequestId); |
|
807 iDelayedOpsManager->EnqueueOpL( delayedOp ); |
|
808 iDelayedOpReqs.AppendL(delayedOp); |
|
809 CleanupStack::Pop( delayedOp ); |
|
810 } |
|
811 // </qmail> |
|
812 /** |
|
813 * |
|
814 */ |
|
815 CFSMailMessage* CBasePlugin::CreateForwardMessageL( |
765 const TFSMailMsgId& aMailBox, |
816 const TFSMailMsgId& aMailBox, |
766 const TFSMailMsgId& aOriginal, |
817 const TFSMailMsgId& aOriginal, |
767 const TDesC& aHeaderDescriptor ) |
818 const TDesC& aHeaderDescriptor ) |
768 { |
819 { |
769 return CreateForwardReplyMessageL( aMailBox, aOriginal, EFalse, aHeaderDescriptor, ETrue ); |
820 return CreateForwardReplyMessageL( aMailBox, aOriginal, EFalse, aHeaderDescriptor, ETrue ); |
771 |
822 |
772 |
823 |
773 /** |
824 /** |
774 * Relying on the UI for the subject and recipients. |
825 * Relying on the UI for the subject and recipients. |
775 */ |
826 */ |
776 EXPORT_C CFSMailMessage* CBasePlugin::CreateReplyMessageL( |
827 CFSMailMessage* CBasePlugin::CreateReplyMessageL( |
777 const TFSMailMsgId& aMailBoxId, |
828 const TFSMailMsgId& aMailBoxId, |
778 const TFSMailMsgId& aOriginalMessageId, |
829 const TFSMailMsgId& aOriginalMessageId, |
779 const TBool aReplyToAll, |
830 const TBool aReplyToAll, |
780 const TDesC& aHeaderDescriptor ) |
831 const TDesC& aHeaderDescriptor ) |
781 { |
832 { |
784 |
835 |
785 |
836 |
786 /** |
837 /** |
787 * |
838 * |
788 */ |
839 */ |
789 EXPORT_C CFSMailMessage* CBasePlugin::CreateMrReplyMessageL( |
840 CFSMailMessage* CBasePlugin::CreateMrReplyMessageL( |
790 const TFSMailMsgId& aMailBoxId, |
841 const TFSMailMsgId& aMailBoxId, |
791 MMRInfoObject& /*aMeetingRequest*/, |
842 MMRInfoObject& /*aMeetingRequest*/, |
792 const TFSMailMsgId& aOriginalMessageId ) |
843 const TFSMailMsgId& aOriginalMessageId ) |
793 { |
844 { |
794 return CreateReplyMessageL( aMailBoxId, aOriginalMessageId, EFalse, KNullDesC ); |
845 return CreateReplyMessageL( aMailBoxId, aOriginalMessageId, EFalse, KNullDesC ); |
797 |
848 |
798 /** |
849 /** |
799 * |
850 * |
800 * @param aMailBoxId if not found leaves with KErrNotFound. |
851 * @param aMailBoxId if not found leaves with KErrNotFound. |
801 */ |
852 */ |
802 EXPORT_C void CBasePlugin::StoreMessageL( |
853 void CBasePlugin::StoreMessageL( |
803 const TFSMailMsgId& aMailBoxId, |
854 const TFSMailMsgId& aMailBoxId, |
804 CFSMailMessage& aMessage ) |
855 CFSMailMessage& aMessage ) |
805 |
856 |
806 { |
857 { |
807 __LOG_ENTER( "StoreMessageL" ) |
858 __LOG_ENTER( "StoreMessageL" ) |
839 |
890 |
840 ResetCache(); |
891 ResetCache(); |
841 __LOG_EXIT |
892 __LOG_EXIT |
842 } |
893 } |
843 |
894 |
|
895 // <qmail> |
|
896 /** |
|
897 * |
|
898 * @param aMailBoxId Mailbox id. |
|
899 * @param aOperationObserver Operation observer. |
|
900 * @param aRequestId The request id. |
|
901 */ |
|
902 void CBasePlugin::StoreMessagesL( |
|
903 const TFSMailMsgId& aMailBox, |
|
904 RPointerArray<CFSMailMessage> &messages, |
|
905 MFSMailRequestObserver& aOperationObserver, |
|
906 const TInt aRequestId ) |
|
907 |
|
908 { |
|
909 __LOG_ENTER( "StoreMessagesL" ) |
|
910 |
|
911 CDelayedMessageStorerOp* delayedOp = CDelayedMessageStorerOp::NewLC( |
|
912 aMailBox,messages,aOperationObserver,aRequestId); |
|
913 iDelayedOpsManager->EnqueueOpL( delayedOp ); |
|
914 CleanupStack::Pop( delayedOp ); |
|
915 |
|
916 |
|
917 __LOG_EXIT |
|
918 } |
|
919 // </qmail> |
|
920 |
|
921 |
|
922 // <qmail> |
|
923 /** |
|
924 * Asynchronous message part storing |
|
925 * |
|
926 * @param aMessagePart email parts data to be stored |
|
927 * @param aOperationObserver Observer for the operation |
|
928 * @param aRequestId id of the operation |
|
929 */ |
|
930 void CBasePlugin::StoreMessagePartsL( |
|
931 RPointerArray<CFSMailMessagePart>& aMessageParts, |
|
932 MFSMailRequestObserver& aOperationObserver, |
|
933 const TInt aRequestId) |
|
934 { |
|
935 __LOG_ENTER( "StoreMessagePartsL" ) |
|
936 |
|
937 CDelayedMessageStorerOp* delayedOp = CDelayedMessageStorerOp::NewLC( |
|
938 aMessageParts,aOperationObserver,aRequestId); |
|
939 iDelayedOpsManager->EnqueueOpL( delayedOp ); |
|
940 CleanupStack::Pop( delayedOp ); |
|
941 |
|
942 __LOG_EXIT |
|
943 } |
|
944 // <//qmail> |
844 |
945 |
845 /** |
946 /** |
846 * Async operation, starts fetching. |
947 * Async operation, starts fetching. |
847 * @param aRequestId |
948 * @param aRequestId |
848 */ |
949 */ |
849 EXPORT_C void CBasePlugin::FetchMessagesL( |
950 void CBasePlugin::FetchMessagesL( |
850 const TFSMailMsgId& /*aMailBox*/, |
951 const TFSMailMsgId& /*aMailBox*/, |
851 const TFSMailMsgId& /*aFolder*/, |
952 const TFSMailMsgId& /*aFolder*/, |
852 const RArray<TFSMailMsgId>& /*aMessageIds*/, |
953 const RArray<TFSMailMsgId>& /*aMessageIds*/, |
853 TFSMailDetails /*aDetails*/, |
954 TFSMailDetails /*aDetails*/, |
854 MFSMailRequestObserver& /*aObserver*/, |
955 MFSMailRequestObserver& /*aObserver*/, |
860 |
961 |
861 |
962 |
862 /** |
963 /** |
863 * |
964 * |
864 */ |
965 */ |
865 EXPORT_C void CBasePlugin::GetMessagesL( |
966 void CBasePlugin::GetMessagesL( |
866 const TFSMailMsgId& /*aMailBoxId*/, |
967 const TFSMailMsgId& /*aMailBoxId*/, |
867 const TFSMailMsgId& /*aParentFolderId*/, |
968 const TFSMailMsgId& /*aParentFolderId*/, |
868 const RArray<TFSMailMsgId>& /*aMessageIds*/, |
969 const RArray<TFSMailMsgId>& /*aMessageIds*/, |
869 RPointerArray<CFSMailMessage>& /*aMessageList*/, |
970 RPointerArray<CFSMailMessage>& /*aMessageList*/, |
870 const TFSMailDetails /*aDetails*/ ) |
971 const TFSMailDetails /*aDetails*/ ) |
875 |
976 |
876 |
977 |
877 /** |
978 /** |
878 * CFSMailPlugin::SendMessageL |
979 * CFSMailPlugin::SendMessageL |
879 */ |
980 */ |
880 EXPORT_C void CBasePlugin::SendMessageL( CFSMailMessage& aMessage ) |
981 void CBasePlugin::SendMessageL( CFSMailMessage& aMessage ) |
881 { |
982 { |
882 __LOG_ENTER( "SendMessageL1" ) |
983 __LOG_ENTER( "SendMessageL1" ) |
883 |
984 |
884 TMsgStoreId mailBoxId = aMessage.GetMailBoxId().Id(); |
985 TMsgStoreId mailBoxId = aMessage.GetMailBoxId().Id(); |
885 TMsgStoreId msgId = aMessage.GetMessageId().Id(); |
986 TMsgStoreId msgId = aMessage.GetMessageId().Id(); |
905 * Plugin could use this method to "send" a message if the CFSMailPlugin's is |
1006 * Plugin could use this method to "send" a message if the CFSMailPlugin's is |
906 * not necessary. The method also stores the message properties before doing so. |
1007 * not necessary. The method also stores the message properties before doing so. |
907 * This allows for optimizing away of unnecessary writes to the msgstore. |
1008 * This allows for optimizing away of unnecessary writes to the msgstore. |
908 * @param aSentTime the sent time you want set for the message. |
1009 * @param aSentTime the sent time you want set for the message. |
909 */ |
1010 */ |
910 EXPORT_C void CBasePlugin::SendMessageL( |
1011 void CBasePlugin::SendMessageL( |
911 CMsgStoreMailBox& aMailBox, |
1012 CMsgStoreMailBox& aMailBox, |
912 CMsgStoreMessage& aMsg, |
1013 CMsgStoreMessage& aMsg, |
913 const TTime& aSentTime ) |
1014 const TTime& aSentTime ) |
914 { |
1015 { |
915 __LOG_ENTER( "SendMessageL2" ) |
1016 __LOG_ENTER( "SendMessageL2" ) |
937 } |
1038 } |
938 |
1039 |
939 /** |
1040 /** |
940 * |
1041 * |
941 */ |
1042 */ |
942 EXPORT_C void CBasePlugin::MoveMessagesL( |
1043 void CBasePlugin::MoveMessagesL( |
943 const TFSMailMsgId& aMailBoxId, |
1044 const TFSMailMsgId& aMailBoxId, |
944 const RArray<TFSMailMsgId>& aMessageIds, |
1045 const RArray<TFSMailMsgId>& aMessageIds, |
945 const TFSMailMsgId& aSourceFolderId, |
1046 const TFSMailMsgId& aSourceFolderId, |
946 const TFSMailMsgId& aDestinationFolderId ) |
1047 const TFSMailMsgId& aDestinationFolderId ) |
947 |
1048 |
960 |
1061 |
961 |
1062 |
962 /** |
1063 /** |
963 * |
1064 * |
964 */ |
1065 */ |
965 EXPORT_C void CBasePlugin::CopyMessagesL( |
1066 void CBasePlugin::CopyMessagesL( |
966 const TFSMailMsgId& aMailBoxId, |
1067 const TFSMailMsgId& aMailBoxId, |
967 const RArray<TFSMailMsgId>& aMessageIds, |
1068 const RArray<TFSMailMsgId>& aMessageIds, |
968 RArray<TFSMailMsgId>& aNewMessages, |
1069 RArray<TFSMailMsgId>& aNewMessages, |
969 const TFSMailMsgId& aSourceFolderId, |
1070 const TFSMailMsgId& aSourceFolderId, |
970 const TFSMailMsgId& aDestinationFolderId ) |
1071 const TFSMailMsgId& aDestinationFolderId ) |
994 /** |
1095 /** |
995 * Get the MsgStore mailbox instance for the specified FSEF mailbox id. |
1096 * Get the MsgStore mailbox instance for the specified FSEF mailbox id. |
996 * |
1097 * |
997 * @param aId mailbox id, if none can be found leaves with KErrNotFound. |
1098 * @param aId mailbox id, if none can be found leaves with KErrNotFound. |
998 */ |
1099 */ |
999 EXPORT_C CMailboxInfo& CBasePlugin::GetMailboxInfoL( |
1100 CMailboxInfo& CBasePlugin::GetMailboxInfoL( |
1000 TMsgStoreId aId ) |
1101 TMsgStoreId aId ) |
1001 { |
1102 { |
1002 |
1103 |
1003 __ASSERT_DEBUG( NULL != iMsgStore, ::BasePluginPanic( ENoMsgStoreSessionAssert ) ); |
1104 __ASSERT_DEBUG( NULL != iMsgStore, ::BasePluginPanic( ENoMsgStoreSessionAssert ) ); |
1004 |
1105 |
1254 } //GetBodyPartL. |
1355 } //GetBodyPartL. |
1255 |
1356 |
1256 /** |
1357 /** |
1257 * |
1358 * |
1258 */ |
1359 */ |
1259 EXPORT_C CFSMailMessage* CBasePlugin::CreateForwardReplyMessageL( |
1360 CFSMailMessage* CBasePlugin::CreateForwardReplyMessageL( |
1260 const TFSMailMsgId& aMailBox, |
1361 const TFSMailMsgId& aMailBox, |
1261 const TFSMailMsgId& aOriginal, |
1362 const TFSMailMsgId& aOriginal, |
1262 const TBool aReplyToAll, |
1363 const TBool aReplyToAll, |
1263 const TDesC& aHeaderDescriptor, |
1364 const TDesC& aHeaderDescriptor, |
1264 TBool aKeepAttachments, |
1365 TBool aKeepAttachments, |
1568 |
1669 |
1569 /** |
1670 /** |
1570 * RefreshMailboxCacheL - This will refresh the mailbox instance cache maintained within the base plugin. |
1671 * RefreshMailboxCacheL - This will refresh the mailbox instance cache maintained within the base plugin. |
1571 * |
1672 * |
1572 */ |
1673 */ |
1573 EXPORT_C CMailboxInfo& CBasePlugin::RefreshMailboxCacheL( TMsgStoreId aMailBoxId ) |
1674 CMailboxInfo& CBasePlugin::RefreshMailboxCacheL( TMsgStoreId aMailBoxId ) |
1574 { |
1675 { |
1575 //save the observers |
1676 //save the observers |
1576 CMailboxInfo& oldMailBox = GetMailboxInfoL( aMailBoxId ); |
1677 CMailboxInfo& oldMailBox = GetMailboxInfoL( aMailBoxId ); |
1577 |
1678 |
1578 RPointerArray<MFSMailEventObserver> observers; |
1679 RPointerArray<MFSMailEventObserver> observers; |