--- a/emailservices/emailframework/inc/CFSMailPlugin.h Tue Feb 02 00:02:40 2010 +0200
+++ b/emailservices/emailframework/inc/CFSMailPlugin.h Fri Apr 16 14:51:52 2010 +0300
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -18,17 +18,21 @@
#ifndef CFSFWMAILPLUGIN_H
#define CFSFWMAILPLUGIN_H
-#include <ecom/ecom.h>
+#include <ecom.h>
+//<cmail>
#include "MFSMailRequestObserver.h"
-#include "mfsmaileventobserver.h"
-#include "cfsmailbox.h"
-#include "cfsmailplugin.hrh"
-#include "cemailextensionbase.h"
+#include "MFSMailEventObserver.h"
+#include "CFSMailBox.h"
+#include "CFSMailPlugin.hrh"
+//</cmail>
+
// constants
const TUid KFSMailPluginInterface = { FSMAILPLUGININTERFACE };
_LIT8( KFSPluginInterfaceImplementationType, "Plug-In Interface / Freestyle Email Framework");
+class MFSMailIterator;
+
/**
* Freestyle Email Framework Plugin Interface
*
@@ -40,11 +44,11 @@
* CFSMailPlugin,CFSMailPlugin.inl are exported by framework
*
* @lib FSFWCommonLib
- *
+ * @since S60 v3.1
*/
-class CFSMailPlugin : public CExtendableEmail
+NONSHARABLE_CLASS ( CFSMailPlugin ) : public CBase
{
-
+
public: // Methods
/**
@@ -68,9 +72,9 @@
* @param aInfo plugin implementation info
*/
static void ListImplementationsL( RPointerArray<CImplementationInformation>& aInfo );
-
- /** MAILBOX HANDLING API */
-
+
+ /** MAILBOX HANDLING API */
+
/**
* Enables synchronization of identified mailbox. This means
* that the plugin can connect to server to do synchronization
@@ -90,7 +94,7 @@
* in offline state like network error or scheduling.
*
* @param aMailBoxId mailbox id request is accessed to
- */
+ */
virtual void GoOnlineL( const TFSMailMsgId& aMailBoxId ) = 0;
/**
@@ -102,7 +106,7 @@
* mailboxes also.
*
* @param aMailBoxId mailbox id request is accessed to
- */
+ */
virtual void GoOfflineL( const TFSMailMsgId& aMailBoxId ) = 0;
/**
@@ -113,10 +117,10 @@
*
* All collections (mail etc.) supported by the plugin and
* enabled by user settings are synchronized.
- *
+ *
* This is an asynchronous operation and the request id
* is returned for cancelling purpose.
- *
+ *
* Observer is given as a parameter to enable callbacks
* related to this operation. Alternatively user can use
* empty implementation of the observer function and rely
@@ -128,7 +132,7 @@
* will receive progress notifications during the operation.
* @param aRequestId identifies asynchronous request if parallel
* requests exist
- */
+ */
virtual void RefreshNowL( const TFSMailMsgId& aMailBoxId,
MFSMailRequestObserver& aOperationObserver,
TInt aRequestId ) = 0;
@@ -139,7 +143,7 @@
* @param aMailBoxId mailbox id
*
* @return last sync operation status
- *
+ *
*/
virtual const TFSProgress GetLastSyncStatusL( const TFSMailMsgId& aMailBoxId ) = 0;
@@ -147,7 +151,7 @@
* cancels all ongoing synchronizations in given mailbox regardless if initiated
* by email framework or plugin itself
*
- * @return error code
+ * @return error code
*/
virtual TInt CancelSyncL( const TFSMailMsgId& aMailBoxId ) = 0;
@@ -161,14 +165,14 @@
virtual TSSMailSyncState CurrentSyncState( const TFSMailMsgId& aMailboxId ) = 0;
/**
- * returns mailbox online status
+ * returns mailbox online status
*
* @param aMailboxId id of target mailbox
*
* @return online / offline
*/
virtual TFSMailBoxStatus GetMailBoxStatus( const TFSMailMsgId& aMailBoxId ) = 0;
-
+
/**
* checks if mailbox supports given capability
*
@@ -177,9 +181,9 @@
*
* @return true/false
*/
- virtual TBool MailboxHasCapabilityL( TFSMailBoxCapabilities aCapability,
- TFSMailMsgId aMailBoxId ) = 0;
-
+ virtual TBool MailboxHasCapabilityL( TFSMailBoxCapabilities aCapability,
+ TFSMailMsgId aMailBoxId ) = 0;
+
/**
* lists existing mailboxes contained by plugin
*
@@ -187,33 +191,33 @@
* table owned by user
* to this table owned by framework
*/
- virtual void ListMailBoxesL( RArray<TFSMailMsgId>& aMailboxes) = 0;
+ virtual void ListMailBoxesL( RArray<TFSMailMsgId>& aMailboxes) = 0;
/**
* returns email mailbox object related to given mailbox id
* mailbox data set by plugin :
- * - mailbox id
+ * - mailbox id
* - mailbox name
* - branding id
* - mailbox capabilities
*
* @param aMailBoxId mailbox id
*
- * @return mailBox object ( CFSMailBox ) to be owned by user
+ * @return mailBox object ( CFSMailBox ) to be owned by user
*/
virtual CFSMailBox* GetMailBoxByUidL( const TFSMailMsgId& aMailBoxId) = 0;
-
+
/**
- * removes mailbox
+ * removes mailbox
*
* @param aMailBoxId id of the mailbox to be removed
* @param aOperationObserver is FW provided observer that should be
* used to report progress notifications during the operation.
* @param aRequestId asynchronous request id
*/
- virtual void DeleteMailBoxByUidL( const TFSMailMsgId& aMailBoxId,
- MFSMailRequestObserver& aOperationObserver,
- const TInt aRequestId ) = 0;
+ virtual void DeleteMailBoxByUidL( const TFSMailMsgId& aMailBoxId,
+ MFSMailRequestObserver& aOperationObserver,
+ const TInt aRequestId ) = 0;
/**
* Returns branding id of this mailbox.
@@ -239,7 +243,7 @@
* Unsubscribes events from given mailbox
*
* @param aMailboxId id of target mailbox
- * @param aObserver event observer
+ * @param aObserver event observer
*/
virtual void UnsubscribeMailboxEvents(const TFSMailMsgId& aMailboxId,
MFSMailEventObserver& aObserver) = 0;
@@ -266,23 +270,11 @@
/**
* checks from plugin if connection is allowed when roaming
*
- * @param aConnectionAllowed
+ * @param aConnectionAllowed
* @return KErrNone or error code
*/
virtual TInt IsConnectionAllowedWhenRoaming( TFSMailMsgId aMailBoxId, TBool& aConnectionAllowed );
-
- /**
- * Reads email from file stream and converts it to class CFSMailMessage
- *
- * @param aMailBoxId mailbox where email exists
- * @param aFile input file given by user
- * @return CFSMailMessage
- */
- virtual CFSMailMessage* CreateMessageFromFileL( const TFSMailMsgId /*aMailboxId*/,
- const RFile& /*aFile*/ )
- { return NULL; };
-
/**
* Moves a messages between the given folders.
*
@@ -291,30 +283,16 @@
* @param aSourceFolderId source folder id
* @param aDestinationFolderId destination folder id
*
- */
+ */
virtual void MoveMessagesL( const TFSMailMsgId& aMailBoxId,
- const RArray<TFSMailMsgId>& aMessageIds,
+ const RArray<TFSMailMsgId>& aMessageIds,
const TFSMailMsgId& aSourceFolderId,
const TFSMailMsgId& aDestinationFolderId ) = 0;
-
- /**
- * Moves a messages between the given folders. Async version.
- * @param aMailBoxId id of the target mailbox
- * @param aMessageIds ids of the messages to be transferred owned by user
- * @param aSourceFolderId source folder id
- * @param aDestinationFolderId destination folder id
- */
- virtual TInt MoveMessagesL( const TFSMailMsgId& /*aMailBoxId*/,
- const RArray<TFSMailMsgId>& /*aMessageIds*/,
- const TFSMailMsgId& /*aSourceFolderId*/,
- const TFSMailMsgId& /*aDestinationFolderId*/,
- MFSMailRequestObserver& /*aOperationObserver*/,
- TInt /*aRequestId*/ ){return KErrNotSupported;}
-
+
/**
* Copies a messages from folder to another.
* This function copies a messages to the given folder,
- * including the properties, content, and all attachments.
+ * including the properties, content, and all attachments.
* (note Only works if the store is in an authenticated state,
* otherwise this function leaves with KErrNotReady)
*
@@ -323,7 +301,7 @@
* @param aNewMessages ids of the copied new messages owned by user
* @param aSourceFolderId source folder id
* @param aDestinationFolderId destination folder id
- */
+ */
virtual void CopyMessagesL( const TFSMailMsgId& aMailBoxId,
const RArray<TFSMailMsgId>& aMessageIds,
RArray<TFSMailMsgId>& aNewMessages,
@@ -339,7 +317,7 @@
*
* The function will leave with KErrNotFound if a mailbox with
* given id is not found.
- *
+ *
* @param aMailBoxId target mailbox id
*
* @return Array of descriptors containing MRUs. Ownership
@@ -356,26 +334,26 @@
*
* The function will leave with KErrNotFound if a mailbox with
* given id is not found.
- *
+ *
* @param aMailBoxId target mailbox id
* @param aNewMruList Array of descriptors containing MRUs.
* Empty if no entries are found.
*/
virtual void SetMrusL( const TFSMailMsgId& aMailBoxId,
MDesCArray* aNewMruList ) = 0;
-
- /** FOLDER HANDLING API */
+
+ /** FOLDER HANDLING API */
/**
* returns email folder object related to given folder id
* folder data set by plugin :
- * - folder id
+ * - folder id
* - folder name
- * - folder type ; Inbox, Outbox, Sent, Drafts, Deleted, Other
+ * - folder type ; Inbox, Outbox, Sent, Drafts, Deleted, Other
* - message count
* - unread message count
- * - mailbox id
- * - parent folder
- *
+ * - mailbox id
+ * - parent folder
+ *
* @param aMailBoxId id of mailbox containing folder
* @param aFolderId folder id
*
@@ -386,7 +364,7 @@
/**
* create new folder
- *
+ *
* @param aMailBoxId id of the mailbox where folder is created
* @param aFolderId id of the parent folder where folder is created
* @param aFolderName name of the new folder
@@ -395,7 +373,7 @@
*
* @return new folder object CFSMailFolder to be owned by user
*/
- virtual CFSMailFolder* CreateFolderL( const TFSMailMsgId& aMailBoxId,
+ virtual CFSMailFolder* CreateFolderL( const TFSMailMsgId& aMailBoxId,
const TFSMailMsgId& aParentFolderId,
const TDesC& aFolderName,
const TBool aSync ) = 0;
@@ -409,47 +387,47 @@
virtual void DeleteFolderByUidL( const TFSMailMsgId& aMailBoxId,
const TFSMailMsgId& aFolderId) = 0;
- /**
- * Lists subfolders of given folder.
- * Only direct subfolders of given folder are returned.
- * Folder data :
+ /**
+ * Lists subfolders of given folder.
+ * Only direct subfolders of given folder are returned.
+ * Folder data :
+ * - folder id
+ * - folder name
+ * - folder type ; Inbox, Outbox, Sent, Drafts, Deleted, Other
+ * - message count
+ * - unread message count
+ * - mailbox id
+ * - parent folder
+ * - subfolder count
+ *
+ * @param aMailBoxId id of the mailbox where parent folder is located
+ * @param aFolderId parent folder id. TFSMailId::NullId() for root level list.
+ * @param aFolderList plugin writes results in this array owned by user
+ */
+ virtual void ListFoldersL( const TFSMailMsgId& aMailBoxId,
+ const TFSMailMsgId& aParentFolderId,
+ RPointerArray<CFSMailFolder>& aFolderList) = 0;
+
+ /**
+ * List all subfolders of given mailbox.
+ * folder data :
* - folder id
* - folder name
* - folder type ; Inbox, Outbox, Sent, Drafts, Deleted, Other
* - message count
* - unread message count
- * - mailbox id
- * - parent folder
- * - subfolder count
- *
- * @param aMailBoxId id of the mailbox where parent folder is located
- * @param aFolderId parent folder id. TFSMailId::NullId() for root level list.
- * @param aFolderList plugin writes results in this array owned by user
- */
- virtual void ListFoldersL( const TFSMailMsgId& aMailBoxId,
- const TFSMailMsgId& aParentFolderId,
- RPointerArray<CFSMailFolder>& aFolderList) = 0;
-
- /**
- * List all subfolders of given mailbox.
- * folder data :
- * - folder id
- * - folder name
- * - folder type ; Inbox, Outbox, Sent, Drafts, Deleted, Other
- * - message count
- * - unread message count
- * - mailbox id
+ * - mailbox id
* - parent folder
* - subfolder count
*
* @param aMailBoxId mailbox id
* @param aFolderList plugin writes results in this array owned by user.
- * Caller must determine tree structure by examining parent id of each
+ * Caller must determine tree structure by examining parent id of each
* returned folder.
*/
- virtual void ListFoldersL( const TFSMailMsgId& aMailBoxId,
- RPointerArray<CFSMailFolder>& aFolderList) = 0;
-
+ virtual void ListFoldersL( const TFSMailMsgId& aMailBoxId,
+ RPointerArray<CFSMailFolder>& aFolderList) = 0;
+
/**
* returns folder id of given standard folder
*
@@ -459,57 +437,57 @@
* return folder id
*/
virtual TFSMailMsgId GetStandardFolderIdL( const TFSMailMsgId& aMailBoxId,
- const TFSFolderType aFolderType ) = 0;
+ const TFSFolderType aFolderType ) = 0;
- /** MESSAGE FETCH AND STORE */
+ /** MESSAGE FETCH AND STORE */
/**
- * List messages contained by given folder.
+ * List messages contained by given folder.
* Returns email list iterator to user.
*
* @param aMailBoxId id of the mailbox where parent folder is located
* @param aFolderId folder id of given folder
* @param aDetails defines which message details are included in messages
- * EFSMsgDataIdOnly -> Doesn't get any data. The object just contains the ID.
- * EFSMsgDataDate -> Get received date only. To be used when showing messages sorted by date.
+ * EFSMsgDataIdOnly -> Doesn't get any data. The object just contains the ID.
+ * EFSMsgDataDate -> Get received date only. To be used when showing messages sorted by date.
* The rest would be retreived when needed but date is needed to build the list.
- * EFSMsgDataSubject -> Like above but when sorting by subject
- * EFSMsgDataSender -> Likewise for sender address.
- * EFSMsgDataEnvelope, EFSMsgDataStructure -> email content type is returned by plugin
+ * EFSMsgDataSubject -> Like above but when sorting by subject
+ * EFSMsgDataSender -> Likewise for sender address.
+ * EFSMsgDataEnvelope, EFSMsgDataStructure -> email content type is returned by plugin
* @param aSorting describes requested sort criteria (owned by user).
* First item in array is primary sort criteria.
*
* @return Email list iterator, ownership is transferred to user.
- */
- virtual MFSMailIterator* ListMessagesL( const TFSMailMsgId& aMailBoxId,
- const TFSMailMsgId& aFolderId,
- const TFSMailDetails aDetails,
- const RArray<TFSMailSortCriteria>& aSorting ) = 0;
-
+ */
+ virtual MFSMailIterator* ListMessagesL( const TFSMailMsgId& aMailBoxId,
+ const TFSMailMsgId& aFolderId,
+ const TFSMailDetails aDetails,
+ const RArray<TFSMailSortCriteria>& aSorting ) = 0;
+
/**
* returns email object related to given message id
*
* message info set by plugin :
- * - message id
+ * - message id
* - mailbox
- * - parent folder
+ * - parent folder
* - message size
- * - the rest is defined by message attributes ;
+ * - the rest is defined by message attributes ;
* @param aMailBoxId id of the mailbox containing email
* @param aFolderId parent folder id containing email
* @param aMessageId email message id
*
* @param aDetails defines which message parts are included in message
- * EFSMsgDataIdOnly -> Doesn't get any data. The object just contains the ID.
- * EFSMsgDataDate -> Get received date only. To be used when showing messages sorted by date.
+ * EFSMsgDataIdOnly -> Doesn't get any data. The object just contains the ID.
+ * EFSMsgDataDate -> Get received date only. To be used when showing messages sorted by date.
* The rest would be retreived when needed but date is needed to build the list.
- * EFSMsgDataSubject -> Like above but when sorting by subject
- * EFSMsgDataSender -> Likewise for sender address.
- * EFSMsgDataEnvelope, EFSMsgDataStructure ->
- * email content type is evaluated and returned by plugin
+ * EFSMsgDataSubject -> Like above but when sorting by subject
+ * EFSMsgDataSender -> Likewise for sender address.
+ * EFSMsgDataEnvelope, EFSMsgDataStructure ->
+ * email content type is evaluated and returned by plugin
*
* @return email object (CFSMailMessage), ownership is transferred to user
*/
- virtual CFSMailMessage* GetMessageByUidL( const TFSMailMsgId& aMailBoxId,
+ virtual CFSMailMessage* GetMessageByUidL( const TFSMailMsgId& aMailBoxId,
const TFSMailMsgId& aParentFolderId,
const TFSMailMsgId& aMessageId,
const TFSMailDetails aDetails) = 0;
@@ -524,7 +502,7 @@
virtual void DeleteMessagesByUidL( const TFSMailMsgId& aMailBoxId,
const TFSMailMsgId& aFolderId,
const RArray<TFSMailMsgId>& aMessages ) = 0;
-
+
/**
* creates new email template into drafts folder
*
@@ -533,6 +511,28 @@
*/
virtual CFSMailMessage* CreateMessageToSendL( const TFSMailMsgId& aMailBoxId ) = 0;
+// <qmail>
+ /**
+ * Asynchronous creation of new email template into drafts folder. When the operation
+ * finishes, RequestResponseL is called on the observer and the created message is
+ * passed along with the TFSProgress data. It is not necessary for a plugin to
+ * implement this method if using the synchronous version does not cause performance
+ * problems for the UI or general problems for the application. UI uses these methods
+ * via an operation class NmMessageCreationOperation (see NmailUiEngine). If a plugin
+ * doesn't implement this method the operation class automatically selects the
+ * synchronous version.
+ *
+ * @param aMailBoxId id of the mailbox where new email is created
+ * @param aOperationObserver Observer for the operation
+ * @param aRequestId id of the operation
+ * @return KErrNone if this method is supported, KErrNotSupported if not
+ */
+ virtual void CreateMessageToSendL(
+ const TFSMailMsgId& aMailBoxId,
+ MFSMailRequestObserver& aOperationObserver,
+ const TInt aRequestId );
+// </qmail>
+
/**
* creates new email template to drafts folder to be forwarded
*
@@ -543,23 +543,68 @@
virtual CFSMailMessage* CreateForwardMessageL( const TFSMailMsgId& aMailBoxId,
const TFSMailMsgId& aOriginalMessageId,
const TDesC& aHeaderDescriptor = KNullDesC ) = 0;
+
+// <qmail>
+ /**
+ * Asynchronous creation of new forwarded email into drafts folder. When the operation
+ * finishes, RequestResponseL is called on the observer and the created message is
+ * passed along with the TFSProgress data.
+ *
+ * @param aMailBoxId id of the mailbox where new email is created
+ * @param aOriginalMessageId if of the (original) message,which is forwarded
+ * @param aOperationObserver Observer for the operation
+ * @param aRequestId id of the operation
+ * @param aHeaderDescriptor user can give quote headers data to plugin as
+ * parameter if needed
+ * @return email object to be modified by user, ownership is transferred to user
+ */
+ virtual void CreateForwardMessageL( const TFSMailMsgId& aMailBoxId,
+ const TFSMailMsgId& aOriginalMessageId,
+ MFSMailRequestObserver& aOperationObserver,
+ const TInt aRequestId,
+ const TDesC& aHeaderDescriptor = KNullDesC );
+// </qmail>
- /**
- * creates new email template to drafts folder to be replied
- *
- * @param aMailBoxId id of the mailbox where new email is created
- * @param aOriginalMessageId id of original email,which is replied to
- * @param aReplyToAll true if reply to all is wanted
- * @param aHeaderDescriptor user can give quote headers data to plugin as
- * parameter if needed
- *
- * @return email object to be modified by user, ownership is transferred to user
- */
+ /**
+ * creates new email template to drafts folder to be replied
+ *
+ * @param aMailBoxId id of the mailbox where new email is created
+ * @param aOriginalMessageId id of original email,which is replied to
+ * @param aReplyToAll true if reply to all is wanted
+ * @param aHeaderDescriptor user can give quote headers data to plugin as
+ * parameter if needed
+ *
+ * @return email object to be modified by user, ownership is transferred to user
+ */
virtual CFSMailMessage* CreateReplyMessageL( const TFSMailMsgId& aMailBoxId,
const TFSMailMsgId& aOriginalMessageId,
const TBool aReplyToAll,
const TDesC& aHeaderDescriptor = KNullDesC) = 0;
+// <qmail>
+ /**
+ * Asynchronous creation of new mail template to drafts folder to be replied. When the operation
+ * finishes, RequestResponseL is called on the observer and the created message is
+ * passed along with the TFSProgress data.
+ *
+ * @param aMailBoxId id of the mailbox where new email is created
+ * @param aOriginalMessageId id of original email,which is replied to
+ * @param aReplyToAll true if reply to all is wanted
+ * @param aOperationObserver Observer for the operation
+ * @param aRequestId id of the operation
+ * @param aHeaderDescriptor user can give quote headers data to plugin as
+ * parameter if needed
+ *
+ * @return email object to be modified by user, ownership is transferred to user
+ */
+ virtual void CreateReplyMessageL( const TFSMailMsgId& aMailBoxId,
+ const TFSMailMsgId& aOriginalMessageId,
+ const TBool aReplyToAll,
+ MFSMailRequestObserver& aOperationObserver,
+ const TInt aRequestId,
+ const TDesC& aHeaderDescriptor = KNullDesC);
+// </qmail>
+
/**
* stores email object data to message store after modifications (commit)
*
@@ -569,21 +614,37 @@
virtual void StoreMessageL( const TFSMailMsgId& aMailBoxId,
CFSMailMessage& aMessage ) = 0;
+
+ // <qmail>
+ /**
+ * Asynchronous message storing
+ *
+ * @param aMailBoxId id of the mailbox where the messages are
+ * @param aOperationObserver Observer for the operation
+ * @param aRequestId id of the operation
+ */
+ virtual void StoreMessagesL(
+ const TFSMailMsgId& aMailBoxId,
+ RPointerArray<CFSMailMessage> &messages,
+ MFSMailRequestObserver& aOperationObserver,
+ const TInt aRequestId ) = 0;
+ // </qmail>
+
/**
* starts email fetching from email server
- *
+ *
* @param aMailBoxId id of the mailbox where email is located
* @param aFolderId id of the parent folder containing email
* @param aMessageIds ids of email to be fetched
* @param aDetails defines which details are included in email
- * EFSMsgDataIdOnly -> Doesn't get any data. The object just contains the ID.
- * EFSMsgDataDate -> Get received date only. To be used when showing messages sorted by date.
+ * EFSMsgDataIdOnly -> Doesn't get any data. The object just contains the ID.
+ * EFSMsgDataDate -> Get received date only. To be used when showing messages sorted by date.
* The rest would be retreived when needed but date is needed to build the list.
- * EFSMsgDataSubject -> Like above but when sorting by subject
- * EFSMsgDataSender -> Likewise for sender address.
- * EFSMsgDataEnvelope -> Date, subject, Sender, To, Cc at least.
- * EFSMsgDataStructure -> the part structure including mime type, size and name headers.
- *
+ * EFSMsgDataSubject -> Like above but when sorting by subject
+ * EFSMsgDataSender -> Likewise for sender address.
+ * EFSMsgDataEnvelope -> Date, subject, Sender, To, Cc at least.
+ * EFSMsgDataStructure -> the part structure including mime type, size and name headers.
+ *
* @param aObserver observer (callback medhod), which plugin calls to pass progress
* events to user (like fetching has completed)
* @param aRequestId asynchronous request id
@@ -594,10 +655,10 @@
TFSMailDetails aDetails,
MFSMailRequestObserver& aObserver,
TInt aRequestId) = 0;
-
+
/**
* starts email parts fetching from email server
- *
+ *
* @param aMailBoxId id of the mailbox where email is located
* @param aFolderId id of the parent folder containing email
* @param aMessagePartIds part ids of email parts, which are to be fetched
@@ -616,31 +677,31 @@
MFSMailRequestObserver& aOperationObserver,
const TInt aRequestId,
const TUint aPreferredByteCount) = 0;
-
+
/* reads email objects from plugin store
- *
+ *
* @param aMailBoxId id of the mailbox where email are located
* @param aParentFolderId parent folder id containing emails
* @param aMessageIds ids of emails to be read from plugin store
- * @param aMessageList plugin writes results into this table owned by user
+ * @param aMessageList plugin writes results into this table owned by user
* @param aDetails defines which email details are included in each email object
- * EFSMsgDataIdOnly -> Doesn't get any data. The object just contains the ID.
- * EFSMsgDataDate -> Get received date only. To be used when showing
- * messages sorted by date. The rest would be retreived when needed but
- * date is needed to build the list.
- * EFSMsgDataSubject -> Like above but when sorting by subject
- * EFSMsgDataSender -> Likewise for sender address.
- * EFSMsgDataEnvelope -> Date, subject, Sender, To, Cc at least.
- * EFSMsgDataStructure -> the part structure including mime type,
- * size and name headers.
- */
- virtual void GetMessagesL( const TFSMailMsgId& aMailBoxId,
- const TFSMailMsgId& aParentFolderId,
- const RArray<TFSMailMsgId>& aMessageIds,
- RPointerArray<CFSMailMessage>& aMessageList,
- const TFSMailDetails aDetails ) = 0;
-
+ * EFSMsgDataIdOnly -> Doesn't get any data. The object just contains the ID.
+ * EFSMsgDataDate -> Get received date only. To be used when showing
+ * messages sorted by date. The rest would be retreived when needed but
+ * date is needed to build the list.
+ * EFSMsgDataSubject -> Like above but when sorting by subject
+ * EFSMsgDataSender -> Likewise for sender address.
+ * EFSMsgDataEnvelope -> Date, subject, Sender, To, Cc at least.
+ * EFSMsgDataStructure -> the part structure including mime type,
+ * size and name headers.
+ */
+ virtual void GetMessagesL( const TFSMailMsgId& aMailBoxId,
+ const TFSMailMsgId& aParentFolderId,
+ const RArray<TFSMailMsgId>& aMessageIds,
+ RPointerArray<CFSMailMessage>& aMessageList,
+ const TFSMailDetails aDetails ) = 0;
+
/**
* Returns child part objects for given email part. Ownership of objects
* is transferred to user.
@@ -659,7 +720,7 @@
/**
* Creates and adds a new child part to given email part.
- *
+ *
* @param aMailBoxId id of the mailbox where email is located
* @param aParentFolderId id of the parent folder where email is located
* @param aMessageId id of the email email belongs to
@@ -669,7 +730,7 @@
* @param aContentType content type of the new message part
*
* return new child part object, ownership is transferred to user
- */
+ */
virtual CFSMailMessagePart* NewChildPartL( const TFSMailMsgId& aMailBoxId,
const TFSMailMsgId& aParentFolderId,
const TFSMailMsgId& aMessageId,
@@ -679,7 +740,7 @@
/**
* Creates and adds a new child part from file to given email part.
- *
+ *
* @param aMailBoxId id of the mailbox where parent part is located
* @param aParentFolderId id of the parent folder where email is located
* @param aMessageId id of the email parent part belongs to
@@ -690,41 +751,65 @@
* @param aFilePath file containing new child part contents
*
* return new child part object, ownership is transferred to user
- */
- virtual CFSMailMessagePart* NewChildPartFromFileL( const TFSMailMsgId& aMailBoxId,
- const TFSMailMsgId& aParentFolderId,
- const TFSMailMsgId& aMessageId,
- const TFSMailMsgId& aParentPartId,
- const TDesC& aContentType,
- const TDesC& aFilePath) = 0;
-
+ */
+ virtual CFSMailMessagePart* NewChildPartFromFileL( const TFSMailMsgId& aMailBoxId,
+ const TFSMailMsgId& aParentFolderId,
+ const TFSMailMsgId& aMessageId,
+ const TFSMailMsgId& aParentPartId,
+ const TDesC& aContentType,
+ const TDesC& aFilePath) = 0;
- /**
- * Creates and adds a new child part from file to given email part.
- *
- * @param aMailBoxId id of the mailbox where parent part is located
- * @param aParentFolderId id of the parent folder where email is located
- * @param aMessageId id of the email parent part belongs to
- * @param aParentPartId id of the parent part of the new part
- * @param aInsertBefore id of existing part that new part should precede.
- * If aInsertBefore is NULL id then new part is added as last.
- * @param aContentType content type of the new message part
- * @param aFile access to file containing new child part contents,
- * ownership is transferred
- *
- * return new child part object, ownership is transferred to user
- */
- virtual CFSMailMessagePart* NewChildPartFromFileL( const TFSMailMsgId& aMailBoxId,
- const TFSMailMsgId& aParentFolderId,
- const TFSMailMsgId& aMessageId,
- const TFSMailMsgId& aParentPartId,
- const TDesC& aContentType,
- RFile& aFile ) = 0;
+ // <qmail>
+ /**
+ * Creates and adds a new child part from file to given email part.
+ *
+ * @param aMailBoxId id of the mailbox where parent part is located
+ * @param aParentFolderId id of the parent folder where email is located
+ * @param aMessageId id of the email parent part belongs to
+ * @param aParentPartId id of the parent part of the new part
+ * @param aInsertBefore id of existing part that new part should precede.
+ * If aInsertBefore is NULL id then new part is added as last.
+ * @param aContentType content type of the new message part
+ * @param aFilePath file containing new child part contents
+ *
+ * return new child part object, ownership is transferred to user
+ */
+ virtual void NewChildPartFromFileL( const TFSMailMsgId& aMailBoxId,
+ const TFSMailMsgId& aParentFolderId,
+ const TFSMailMsgId& aMessageId,
+ const TFSMailMsgId& aParentPartId,
+ const TDesC& aContentType,
+ const TDesC& aFilePath,
+ MFSMailRequestObserver& aOperationObserver,
+ const TInt aRequestId );
+ // </qmail>
+
+ /**
+ * Creates and adds a new child part from file to given email part.
+ *
+ * @param aMailBoxId id of the mailbox where parent part is located
+ * @param aParentFolderId id of the parent folder where email is located
+ * @param aMessageId id of the email parent part belongs to
+ * @param aParentPartId id of the parent part of the new part
+ * @param aInsertBefore id of existing part that new part should precede.
+ * If aInsertBefore is NULL id then new part is added as last.
+ * @param aContentType content type of the new message part
+ * @param aFile access to file containing new child part contents,
+ * ownership is transferred
+ *
+ * return new child part object, ownership is transferred to user
+ */
+ virtual CFSMailMessagePart* NewChildPartFromFileL( const TFSMailMsgId& aMailBoxId,
+ const TFSMailMsgId& aParentFolderId,
+ const TFSMailMsgId& aMessageId,
+ const TFSMailMsgId& aParentPartId,
+ const TDesC& aContentType,
+ RFile& aFile ) = 0;
-
+
/**
* Copies given email as new child part to given email part.
- *
+ *
* @param aMailBoxId id of the mailbox where email is located
* @param aParentFolderId id of the parent folder where email is located
* @param aMessageId id of the email parent part belongs to
@@ -734,7 +819,7 @@
* @param aMessage id of the email that is copied as child part
*
* return new child part object, ownership is transferred to user
- */
+ */
virtual CFSMailMessagePart* CopyMessageAsChildPartL( const TFSMailMsgId& aMailBoxId,
const TFSMailMsgId& aParentFolderId,
const TFSMailMsgId& aMessageId,
@@ -744,14 +829,14 @@
/**
* Removes child part (and its children, if any) from given email part
- *
+ *
* @param aMailBoxId id of the mailbox where email is located
* @param aParentFolderId id of the parent folder where email is located
* @param aMessageId id of the email parent part belongs to
* @param aParentPartId id of the parent of the part
* @param aPartId id of the part to removed
- */
- virtual void RemoveChildPartL( const TFSMailMsgId& aMailBoxId,
+ */
+ virtual void RemoveChildPartL( const TFSMailMsgId& aMailBoxId,
const TFSMailMsgId& aParentFolderId,
const TFSMailMsgId& aMessageId,
const TFSMailMsgId& aParentPartId,
@@ -793,12 +878,12 @@
/**
* copies contents of this message part to given file
- *
+ *
* @param aMailBoxId id of the mailbox where email is located
* @param aParentFolderId id of the parent folder where email is located
* @param aMessageId id of the email part belongs to
* @param aMessagePartId id of the message part
- * @param aContentLocation defines file location as
+ * @param aContentLocation defines file location as
* a) directory, when plugin finds out corresponding file name
* related to this part id, in this case last character should
* be '/'
@@ -827,7 +912,7 @@
const TFSMailMsgId& aMessagePartId,
TDes& aBuffer,
const TUint aStartOffset) = 0;
-
+
/**
* stores email part content
*
@@ -837,12 +922,12 @@
* @param aMessageId id of the email part belongs to
* @param aMessagePartId id of the message part
*/
- virtual void SetContentL( const TDesC& aBuffer,
- const TFSMailMsgId& aMailBoxId,
- const TFSMailMsgId& aParentFolderId,
- const TFSMailMsgId& aMessageId,
- const TFSMailMsgId& aMessagePartId) = 0;
-
+ virtual void SetContentL( const TDesC& aBuffer,
+ const TFSMailMsgId& aMailBoxId,
+ const TFSMailMsgId& aParentFolderId,
+ const TFSMailMsgId& aMessageId,
+ const TFSMailMsgId& aMessagePartId) = 0;
+
/**
* Removes fetched contents of these parts.
*
@@ -850,16 +935,16 @@
* @param aParentFolderId defines parent folder where message is located
* @param aMessageId gives the id of the message that message part belongs to
* @param aPartIds message part ids to be removed
- */
- virtual void RemovePartContentL( const TFSMailMsgId& aMailBoxId,
- const TFSMailMsgId& aParentFolderId,
- const TFSMailMsgId& aMessageId,
- const RArray<TFSMailMsgId>& aPartIds) = 0;
-
+ */
+ virtual void RemovePartContentL( const TFSMailMsgId& aMailBoxId,
+ const TFSMailMsgId& aParentFolderId,
+ const TFSMailMsgId& aMessageId,
+ const RArray<TFSMailMsgId>& aPartIds) = 0;
+
/**
* Sets email part contents from given file.
* Possible old contents are replaced.
- *
+ *
* @param aMailBoxId id of the mailbox where email is located
* @param aParentFolderId id of the parent folder where email is located
* @param aMessageId id of the email part belongs to
@@ -881,17 +966,30 @@
* @param aMessagePart email part data to be stored
*/
virtual void StoreMessagePartL( const TFSMailMsgId& aMailBoxId,
- const TFSMailMsgId& aParentFolderId,
- const TFSMailMsgId& aMessageId,
- CFSMailMessagePart& aMessagePart) = 0;
+ const TFSMailMsgId& aParentFolderId,
+ const TFSMailMsgId& aMessageId,
+ CFSMailMessagePart& aMessagePart) = 0;
+
+ // <qmail>
+ /**
+ * Asynchronous message parts storing
+ *
+ * @param aMessagePart email parts data to be stored
+ * @param aOperationObserver Observer for the operation
+ * @param aRequestId id of the operation
+ */
+ virtual void StoreMessagePartsL( RPointerArray<CFSMailMessagePart>& aMessagePart,
+ MFSMailRequestObserver& aOperationObserver,
+ const TInt aRequestId ) = 0;
+ // <//qmail>
/**
- * unregisters request observer to cancel pending events
+ * unregisters request observer to cancel pending events
*
* @param aRequestId request id of the pending asynchronous request
*/
virtual void UnregisterRequestObserver(TInt aRequestId) = 0;
-
+
/**
* Launches email sending in plugin,
* cancellation is deleting the message from outbox.
@@ -900,10 +998,22 @@
*/
virtual void SendMessageL( CFSMailMessage& aMessage ) = 0;
+// <qmail>
+ /**
+ * Launches email sending in plugin,
+ * @param aMessage email to be sent
+ * @param aOperationObserver Operation observer
+ * @param aRequestId Request id
+ */
+ virtual void SendMessageL( CFSMailMessage& aMessage,
+ MFSMailRequestObserver& aOperationObserver,
+ const TInt aRequestId );
+// </qmail>
+
/**
* Returns pending asynchronous request status, request is identified
- * by request id if parallel requests exists
- *
+ * by request id if parallel requests exists
+ *
* @param aRequestId request id
*
* @return pending request status
@@ -914,11 +1024,11 @@
* cancels pending request
*
* @param aRequestId identifies request if parallel requests exists
- */
+ */
virtual void CancelL( const TInt aRequestId ) = 0;
-
- /** Search API */
-
+
+ /** Search API */
+
/**
* Asyncronous call for starting search for given string. Only one search can be
* performed at a time.
@@ -927,54 +1037,54 @@
* This function will search for message's containing the given search string.
* The search will be performed on the all message fields: To, Cc, Bcc, subject, body.
* The search client will be notified of each found message,
- * and upon completion of the search. Only one search can be performed at a time.
- *
+ * and upon completion of the search. Only one search can be performed at a time.
+ *
* To change the sort order in the search result, use the same search string in the
* but change the aSortCriteria parameter. The store "caches" the search
* results generated by the same search string.
- *
+ *
* The function will leave with KErrInUse if a search is already in progress.
- *
+ *
* /note Only works if the store is in an authenticated state,
* otherwise this function leaves with KErrNotReady
- *
+ *
* @paran aMailBoxId id of the mailbox where messages are to be searched
* @param aFolderIds list of folders where messages are to be searched
- * global or folder specific search depends on the size of array is 0 or not.
+ * global or folder specific search depends on the size of array is 0 or not.
* @param aSearchStrings text strings that will be searched from different message fields.
- * @param aSortCriteria sort criteria for the results
+ * @param aSortCriteria sort criteria for the results
* @param aSearchObserver client observer that will be notified about search status.
*
- */
+ */
virtual void SearchL( const TFSMailMsgId& aMailBoxId,
const RArray<TFSMailMsgId>& aFolderIds,
const RPointerArray<TDesC>& aSearchStrings,
const TFSMailSortCriteria& aSortCriteria,
MFSMailBoxSearchObserver& aSearchObserver ) = 0;
-
+
/**
* Cancels current search. Does nothing if there is not any search.
* The search client will not be called back after this function is called.
- *
- * \note CancelSearch() method does NOT clear the search result cached in the store.
- * A different sort order can be used for the same search string, and the
+ *
+ * \note CancelSearch() method does NOT clear the search result cached in the store.
+ * A different sort order can be used for the same search string, and the
* cache will be utilized. Only by using a different search string can the
* cache be cleaned.
- *
+ *
* @paran aMailBoxId id of the mailbox where the search should be cancelled
*/
virtual void CancelSearch( const TFSMailMsgId& aMailBoxId ) = 0;
- /**
+ /**
* Inform the store to clean up its cache for search results.
- *
+ *
* This method cancels the the ongoing search (if exists), and then clean ups store's cache.
- *
+ *
* This function should be called when search results are no longer in display.
- *
+ *
* @paran aMailBoxId id of the mailbox where the search cache should be cleared
- */
+ */
virtual void ClearSearchResultCache( const TFSMailMsgId& aMailBoxId ) = 0;
/**
@@ -1003,7 +1113,7 @@
virtual void AuthenticateL(MFSMailRequestObserver& aOperationObserver, TInt aRequestId) = 0;
/**
- * sets authentication popup data
+ * sets authentication popup data
* @param aMailBoxId id of the mailbox
* @param aUsername email account user name
* @param aPassword email account password
@@ -1011,9 +1121,9 @@
virtual void SetCredentialsL( const TFSMailMsgId& aMailBoxId,
const TDesC& aUsername,
const TDesC& aPassword ) = 0;
-
+
/**
- * Sets the mailbox name for this mailbox.
+ * Sets the mailbox name for this mailbox.
*
* @param aMailboxId id of target mailbox
* @param aMailboxName new name for the mailbox
@@ -1029,7 +1139,7 @@
private:
- /**
+ /**
* Two-phased constructor
*/
void ConstructL();
@@ -1037,16 +1147,16 @@
private: // data
/**
- * instance identifier key for destructor
+ * instance identifier key for destructor
*/
- TUid iDtor_ID_Key;
-
+ TUid iDtor_ID_Key;
+
};
//<cmail>
-#include "cfsmailplugin.inl"
+#include "CFSMailPlugin.inl"
//</cmail>
#endif // CFSFW_MAIL_PLUGIN_H
-
+
// End of File