From 32396986182c0939af3988a78a69859700d7b546 Mon Sep 17 00:00:00 2001 From: "jefft%netscape.com" Date: Tue, 13 Jul 1999 20:03:57 +0000 Subject: [PATCH] remove listenerData from CopyMessages(), CopyFileMessage() method --- mailnews/base/public/nsIMsgCopyService.idl | 4 +-- .../base/public/nsIMsgCopyServiceListener.idl | 32 +++++++++++++++---- mailnews/base/public/nsIMsgFolder.idl | 8 +++-- 3 files changed, 31 insertions(+), 13 deletions(-) diff --git a/mailnews/base/public/nsIMsgCopyService.idl b/mailnews/base/public/nsIMsgCopyService.idl index bcdaa5c3ff28..940c8adb0728 100644 --- a/mailnews/base/public/nsIMsgCopyService.idl +++ b/mailnews/base/public/nsIMsgCopyService.idl @@ -41,7 +41,6 @@ interface nsIMsgCopyService : nsISupports { in nsIMsgFolder dstFolder, in boolean isMove, in nsIMsgCopyServiceListener listener, - in nsISupports listenerData, in nsITransactionManager txnMgr); /** @@ -50,9 +49,8 @@ interface nsIMsgCopyService : nsISupports { void CopyFileMessage(in nsIFileSpec fileSpec, in nsIMsgFolder dstFolder, in nsIMessage msgToReplace, - in boolean isDraft, + in boolean isDraftOrTemplate, in nsIMsgCopyServiceListener listener, - in nsISupports listenerData, in nsITransactionManager txnMgr); /** diff --git a/mailnews/base/public/nsIMsgCopyServiceListener.idl b/mailnews/base/public/nsIMsgCopyServiceListener.idl index 1dd64983b369..803361f2dfdf 100644 --- a/mailnews/base/public/nsIMsgCopyServiceListener.idl +++ b/mailnews/base/public/nsIMsgCopyServiceListener.idl @@ -19,6 +19,8 @@ #include "nsrootidl.idl" #include "nsISupports.idl" +interface nsString2; + [scriptable, uuid(1caa10b6-29a6-11d3-afb2-001083002da8)] interface nsIMsgCopyServiceListener : nsISupports { @@ -26,28 +28,44 @@ interface nsIMsgCopyServiceListener : nsISupports { * Notify the observer that the message has started to be copied. This * method is called only once, at the beginning of a message * copyoperation. - * listenerData - */ - void OnStartCopy(in nsISupports listenerData); + void OnStartCopy(); /** * Notify the observer that progress as occurred for the message copy * aProgress - * aProgressMax - - * listenerData - */ void OnProgress(in PRUint32 aProgress, - in PRUint32 aProgressMax, - in nsISupports listenerData); + in PRUint32 aProgressMax); + + /** + * Setting newly created message key. This method is taylored specifically + * for nsIMsgCopyService::CopyFileMessage() when saveing Drafts/Templates. + * We need to have a way to inform the client what's the key of the newly + * created message. + * aKey - + */ + void SetMessageKey(in PRUInt32 aKey); + + /** + * Getting the file message message ID. This method is taylored + * specifically for nsIMsgCopyService::CopyFileMessage() when saving + * Drafts/Templates. In order to work with imap server which doesn't + * support uidplus we have to use search comman to retrieve the key of + * newly created message. Message ID generated by the compose gurantee its + * uniqueness. + * aMessageId - + */ + void GetMessageId(in nsString2 aMessageId); /** * Notify the observer that the message copied operation has completed. * This method is called regardless of whether the the operation was * successful. * aStatus - indicate whether the operation was succeeded - * listenerData - */ - void OnStopCopy(in nsresult aStatus, in nsISupports listenerData); + void OnStopCopy(in nsresult aStatus); }; diff --git a/mailnews/base/public/nsIMsgFolder.idl b/mailnews/base/public/nsIMsgFolder.idl index c4c41074036e..0e47ff61d5b7 100644 --- a/mailnews/base/public/nsIMsgFolder.idl +++ b/mailnews/base/public/nsIMsgFolder.idl @@ -22,6 +22,7 @@ #include "nsIMsgIncomingServer.idl" #include "nsIFileSpec.idl" #include "nsISupportsArray.idl" +#include "nsIMsgCopyServiceListener.idl" %{ C++ #include "nsIMessage.h" @@ -125,11 +126,12 @@ interface nsIMsgFolder : nsIFolder { txnMgr,in boolean deleteStorage); void CopyMessages(in nsIMsgFolder srcFolder, in nsISupportsArray messages, - in boolean isMove, in nsITransactionManager txnMgr); + in boolean isMove, in nsITransactionManager txnMgr, + in nsIMsgCopyServiceListener listener); void CopyFileMessage(in nsIFileSpec fileSpec, in nsIMessage msgToReplace, - in boolean isDraft, in nsISupports aSupport, - in nsITransactionManager txnMgr); + in boolean isDraft, in nsITransactionManager txnMgr, + in nsIMsgCopyServiceListener listener); void AcquireSemaphore (in nsISupports semHolder); void ReleaseSemaphore (in nsISupports semHolder);