diff --git a/mailnews/base/public/nsIMsgFolder.idl b/mailnews/base/public/nsIMsgFolder.idl index 0c265f177c3..15c71b38aa6 100644 --- a/mailnews/base/public/nsIMsgFolder.idl +++ b/mailnews/base/public/nsIMsgFolder.idl @@ -55,7 +55,7 @@ interface nsIMsgFolder : nsIFolder { void endFolderLoading(); /* get new headers for db */ - void updateFolder(); + void updateFolder(in nsIMsgWindow aWindow); nsIMsgThread getThreadForMessage(in nsIMessage message); boolean hasMessage(in nsIMessage message); @@ -153,7 +153,7 @@ interface nsIMsgFolder : nsIFolder { readonly attribute boolean locked; nsIMessage createMessageFromMsgDBHdr(in nsIMsgDBHdr msgDBHdr); - void getNewMessages(); + void getNewMessages(in nsIMsgWindow aWindow); void writeToFolderCache(in nsIMsgFolderCache folderCache); attribute wstring charset; diff --git a/mailnews/base/public/nsIMsgMailNewsUrl.idl b/mailnews/base/public/nsIMsgMailNewsUrl.idl index aa79908d8d2..248c713f4fa 100644 --- a/mailnews/base/public/nsIMsgMailNewsUrl.idl +++ b/mailnews/base/public/nsIMsgMailNewsUrl.idl @@ -24,6 +24,7 @@ interface nsIUrlListener; interface nsIMsgStatusFeedback; interface nsIMsgIncomingServer; interface nsIMsgWindow; +interface nsILoadGroup; [scriptable, uuid(6CFFCEB0-CB8C-11d2-8065-006008128C4E)] interface nsIMsgMailNewsUrl : nsIURL { @@ -55,6 +56,8 @@ interface nsIMsgMailNewsUrl : nsIURL { void SetMsgWindow(in nsIMsgWindow aMsgWindow); void GetMsgWindow(out nsIMsgWindow aMsgWindow); + // the load group is computed from the msgWindow + readonly attribute nsILoadGroup loadGroup; attribute boolean updatingFolder; }; diff --git a/mailnews/base/resources/content/commandglue.js b/mailnews/base/resources/content/commandglue.js index 81308743963..2e3f85532ae 100644 --- a/mailnews/base/resources/content/commandglue.js +++ b/mailnews/base/resources/content/commandglue.js @@ -214,7 +214,7 @@ function ChangeFolderByURI(uri) { gCurrentLoadingFolderURI = uri; msgfolder.startFolderLoading(); - msgfolder.updateFolder(); + msgfolder.updateFolder(msgWindow); } catch(ex) { @@ -223,7 +223,7 @@ function ChangeFolderByURI(uri) else { gCurrentLoadingFolderURI = ""; - msgfolder.updateFolder(); + msgfolder.updateFolder(msgWindow); RerootFolder(uri, msgfolder); } } diff --git a/mailnews/base/src/nsMsgCopyService.cpp b/mailnews/base/src/nsMsgCopyService.cpp index 9e700852843..8be25838576 100644 --- a/mailnews/base/src/nsMsgCopyService.cpp +++ b/mailnews/base/src/nsMsgCopyService.cpp @@ -289,7 +289,7 @@ nsMsgCopyService::FindRequest(nsISupports* aSupport, NS_IMPL_THREADSAFE_ISUPPORTS(nsMsgCopyService, nsCOMTypeInfo::GetIID()) NS_IMETHODIMP -nsMsgCopyService::CopyMessages(nsIMsgFolder* srcFolder, /* UI src foler */ +nsMsgCopyService::CopyMessages(nsIMsgFolder* srcFolder, /* UI src folder */ nsISupportsArray* messages, nsIMsgFolder* dstFolder, PRBool isMove, diff --git a/mailnews/base/src/nsMsgFolderDataSource.cpp b/mailnews/base/src/nsMsgFolderDataSource.cpp index 12608ed0103..a914c06c59f 100644 --- a/mailnews/base/src/nsMsgFolderDataSource.cpp +++ b/mailnews/base/src/nsMsgFolderDataSource.cpp @@ -599,7 +599,7 @@ nsMsgFolderDataSource::DoCommand(nsISupportsArray/**/* aSources, } else if((aCommand == kNC_GetNewMessages)) { - rv = folder->GetNewMessages(); + rv = folder->GetNewMessages(mWindow); } else if((aCommand == kNC_Copy)) { diff --git a/mailnews/base/src/nsMsgStatusFeedback.cpp b/mailnews/base/src/nsMsgStatusFeedback.cpp index 736bf357916..5fb9550923e 100644 --- a/mailnews/base/src/nsMsgStatusFeedback.cpp +++ b/mailnews/base/src/nsMsgStatusFeedback.cpp @@ -201,7 +201,7 @@ nsMsgStatusFeedback::StartMeteors() if (!m_meteorsSpinning) { // meteors are horribly slow, so turn them off for now -// setAttribute( mWebShell, "Messenger:Throbber", "busy", "true" ); + setAttribute( mWebShell, "Messenger:Throbber", "busy", "true" ); m_meteorsSpinning = PR_TRUE; } return NS_OK; @@ -214,7 +214,7 @@ nsMsgStatusFeedback::StopMeteors() if (m_meteorsSpinning) { // meteors are horribly slow, so turn them off for now -// setAttribute( mWebShell, "Messenger:Throbber", "busy", "false" ); + setAttribute( mWebShell, "Messenger:Throbber", "busy", "false" ); m_meteorsSpinning = PR_FALSE; } return NS_OK; diff --git a/mailnews/base/util/nsMsgMailNewsUrl.cpp b/mailnews/base/util/nsMsgMailNewsUrl.cpp index 8c1f32dd4c9..735778335d0 100644 --- a/mailnews/base/util/nsMsgMailNewsUrl.cpp +++ b/mailnews/base/util/nsMsgMailNewsUrl.cpp @@ -21,6 +21,9 @@ #include "nsMsgBaseCID.h" #include "nsIMsgMailSession.h" #include "nsXPIDLString.h" +#include "nsIDocumentLoader.h" +#include "nsILoadGroup.h" +#include "nsIWebShell.h" static NS_DEFINE_CID(kUrlListenerManagerCID, NS_URLLISTENERMANAGER_CID); static NS_DEFINE_CID(kStandardUrlCID, NS_STANDARDURL_CID); @@ -249,6 +252,37 @@ NS_IMETHODIMP nsMsgMailNewsUrl::GetStatusFeedback(nsIMsgStatusFeedback **aMsgFee return rv; } +NS_IMETHODIMP nsMsgMailNewsUrl::GetLoadGroup(nsILoadGroup **aLoadGroup) +{ + nsresult rv = NS_OK; + // note: it is okay to return a null load group and not return an error + // it's possible the url really doesn't have load group + if (!m_loadGroup) + { + if (m_msgWindow) + { + nsCOMPtr webShell; + m_msgWindow->GetRootWebShell(getter_AddRefs(webShell)); + if (webShell) + { + nsCOMPtr docLoader; + webShell->GetDocumentLoader(*getter_AddRefs(docLoader)); + if (docLoader) + docLoader->GetLoadGroup(getter_AddRefs(m_loadGroup)); + } + } + } + + if (aLoadGroup) + { + *aLoadGroup = m_loadGroup; + NS_IF_ADDREF(*aLoadGroup); + } + else + rv = NS_ERROR_NULL_POINTER; + return rv; + +} NS_IMETHODIMP nsMsgMailNewsUrl::GetUpdatingFolder(PRBool *aResult) { diff --git a/mailnews/base/util/nsMsgMailNewsUrl.h b/mailnews/base/util/nsMsgMailNewsUrl.h index fdb2d414a73..d2ac6d8f290 100644 --- a/mailnews/base/util/nsMsgMailNewsUrl.h +++ b/mailnews/base/util/nsMsgMailNewsUrl.h @@ -28,6 +28,7 @@ #include "nsCOMPtr.h" #include "nsIMsgMailNewsUrl.h" #include "nsIURL.h" +#include "nsILoadGroup.h" /////////////////////////////////////////////////////////////////////////////////// // Okay, I found that all of the mail and news url interfaces needed to support @@ -56,6 +57,8 @@ protected: nsCOMPtr m_baseURL; nsCOMPtr m_statusFeedback; nsCOMPtr m_msgWindow; + nsCOMPtr m_loadGroup; + char *m_errorMessage; PRBool m_runningUrl; PRBool m_updatingFolder; diff --git a/mailnews/imap/public/nsIImapService.h b/mailnews/imap/public/nsIImapService.h index ac3d64bf8ee..ae905dc1630 100644 --- a/mailnews/imap/public/nsIImapService.h +++ b/mailnews/imap/public/nsIImapService.h @@ -45,7 +45,7 @@ class nsIUrlListener; class nsIURI; class nsIEventQueue; class nsIMsgFolder; -class nsIMsgStatusFeedback; +class nsIMsgWindow; class nsIImapService : public nsISupports { @@ -59,7 +59,7 @@ public: NS_IMETHOD SelectFolder(nsIEventQueue * aClientEventQueue, nsIMsgFolder * aImapMailFolder, nsIUrlListener * aUrlListener, - nsIMsgStatusFeedback *aMsgStatusFeedback, + nsIMsgWindow *aMsgWindow, nsIURI ** aURL) = 0; NS_IMETHOD LiteSelectFolder(nsIEventQueue * aClientEventQueue, nsIMsgFolder * aImapMailFolder, diff --git a/mailnews/imap/public/nsIImapUrl.h b/mailnews/imap/public/nsIImapUrl.h index d51658221cb..9ac596b7d10 100644 --- a/mailnews/imap/public/nsIImapUrl.h +++ b/mailnews/imap/public/nsIImapUrl.h @@ -183,6 +183,8 @@ public: NS_IMETHOD GetMockChannel(nsIImapMockChannel ** aChannel) = 0; NS_IMETHOD SetMockChannel(nsIImapMockChannel * aChannel) = 0; + + NS_IMETHOD AddChannelToLoadGroup() = 0; }; #endif /* nsIImapUrl_h___ */ diff --git a/mailnews/imap/src/nsImapIncomingServer.cpp b/mailnews/imap/src/nsImapIncomingServer.cpp index 73a362e6d52..53afc87df77 100644 --- a/mailnews/imap/src/nsImapIncomingServer.cpp +++ b/mailnews/imap/src/nsImapIncomingServer.cpp @@ -471,7 +471,7 @@ NS_IMETHODIMP nsImapIncomingServer::PerformBiff() { nsCOMPtr rootMsgFolder = do_QueryInterface(rootFolder); if(rootMsgFolder) - rv = rootMsgFolder->GetNewMessages(); + rv = rootMsgFolder->GetNewMessages(nsnull); } return rv; diff --git a/mailnews/imap/src/nsImapMailFolder.cpp b/mailnews/imap/src/nsImapMailFolder.cpp index 87e397a2870..92bf138c654 100644 --- a/mailnews/imap/src/nsImapMailFolder.cpp +++ b/mailnews/imap/src/nsImapMailFolder.cpp @@ -419,7 +419,7 @@ nsresult nsImapMailFolder::GetDatabase() } NS_IMETHODIMP -nsImapMailFolder::UpdateFolder() +nsImapMailFolder::UpdateFolder(nsIMsgWindow *msgWindow) { nsresult rv = NS_ERROR_NULL_POINTER; PRBool selectFolder = PR_FALSE; @@ -1162,7 +1162,7 @@ nsImapMailFolder::DeleteSubFolders(nsISupportsArray* folders) return nsMsgFolder::DeleteSubFolders(folders); } -NS_IMETHODIMP nsImapMailFolder::GetNewMessages() +NS_IMETHODIMP nsImapMailFolder::GetNewMessages(nsIMsgWindow *aWindow) { nsresult rv = NS_ERROR_FAILURE; NS_WITH_SERVICE(nsIImapService, imapService, kCImapService, &rv); @@ -1180,7 +1180,7 @@ NS_IMETHODIMP nsImapMailFolder::GetNewMessages() if (NS_SUCCEEDED(rv) && pEventQService) pEventQService->GetThreadEventQueue(PR_GetCurrentThread(), getter_AddRefs(eventQ)); - rv = imapService->SelectFolder(eventQ, inbox, this, nsnull, nsnull); + rv = imapService->SelectFolder(eventQ, inbox, this, aWindow, nsnull); return rv; } @@ -2511,7 +2511,11 @@ nsImapMailFolder::OnStopRunningUrl(nsIURI *aUrl, nsresult aExitCode) NS_WITH_SERVICE(nsIMsgMailSession, session, kMsgMailSessionCID, &rv); if (aUrl) { + nsCOMPtr aWindow; + nsCOMPtr mailUrl = do_QueryInterface(aUrl); nsCOMPtr imapUrl = do_QueryInterface(aUrl); + if (mailUrl) + mailUrl->GetMsgWindow(getter_AddRefs(aWindow)); if (imapUrl) { nsIImapUrl::nsImapAction imapAction = nsIImapUrl::nsImapTest; @@ -2556,7 +2560,7 @@ nsImapMailFolder::OnStopRunningUrl(nsIURI *aUrl, nsresult aExitCode) PRBool folderOpen = PR_FALSE; session->IsFolderOpenInWindow(this, &folderOpen); if (folderOpen) - UpdateFolder(); + UpdateFolder(aWindow); else UpdatePendingCounts(PR_TRUE, PR_FALSE); } @@ -2573,7 +2577,7 @@ nsImapMailFolder::OnStopRunningUrl(nsIURI *aUrl, nsresult aExitCode) ClearCopyState(aExitCode); } } - UpdateFolder(); + UpdateFolder(aWindow); break; default: break; @@ -2582,7 +2586,6 @@ nsImapMailFolder::OnStopRunningUrl(nsIURI *aUrl, nsresult aExitCode) // give base class a chance to send folder loaded notification... rv = nsMsgDBFolder::OnStopRunningUrl(aUrl, aExitCode); // query it for a mailnews interface for now.... - nsCOMPtr mailUrl = do_QueryInterface(aUrl); if (mailUrl) rv = mailUrl->UnRegisterListener(this); } diff --git a/mailnews/imap/src/nsImapMailFolder.h b/mailnews/imap/src/nsImapMailFolder.h index 7c3f0671023..1dec705da19 100644 --- a/mailnews/imap/src/nsImapMailFolder.h +++ b/mailnews/imap/src/nsImapMailFolder.h @@ -105,7 +105,7 @@ public: NS_IMETHOD AddUnique(nsISupports* element); NS_IMETHOD ReplaceElement(nsISupports* element, nsISupports* newElement); NS_IMETHOD GetMessages(nsISimpleEnumerator* *result); - NS_IMETHOD UpdateFolder(); + NS_IMETHOD UpdateFolder(nsIMsgWindow *aWindow); NS_IMETHOD CreateSubfolder(const char *folderName); @@ -155,7 +155,7 @@ public: nsIMsgCopyServiceListener* listener); NS_IMETHOD CreateMessageFromMsgDBHdr(nsIMsgDBHdr *msgHdr, nsIMessage **message); - NS_IMETHOD GetNewMessages(); + NS_IMETHOD GetNewMessages(nsIMsgWindow *aWindow); NS_IMETHOD GetPath(nsIFileSpec** aPathName); diff --git a/mailnews/imap/src/nsImapProtocol.cpp b/mailnews/imap/src/nsImapProtocol.cpp index f9cee2283d3..f95c81ef18e 100644 --- a/mailnews/imap/src/nsImapProtocol.cpp +++ b/mailnews/imap/src/nsImapProtocol.cpp @@ -6323,6 +6323,12 @@ NS_IMETHODIMP nsImapMockChannel::IsPending(PRBool *result) NS_IMETHODIMP nsImapMockChannel::Cancel() { + if (m_channelContext) + { + nsCOMPtr protocol = do_QueryInterface(m_channelContext); + if (protocol) + protocol->TellThreadToDie(PR_TRUE); + } return NS_ERROR_NOT_IMPLEMENTED; } diff --git a/mailnews/imap/src/nsImapService.cpp b/mailnews/imap/src/nsImapService.cpp index ba4ed7d1e2a..7e9131c2fed 100644 --- a/mailnews/imap/src/nsImapService.cpp +++ b/mailnews/imap/src/nsImapService.cpp @@ -39,7 +39,7 @@ #include "nsEscape.h" #include "nsIMsgStatusFeedback.h" #include "nsIPref.h" - +#include "nsILoadGroup.h" #include "nsIFileLocator.h" #include "nsFileLocations.h" @@ -98,7 +98,7 @@ NS_IMETHODIMP nsImapService::SelectFolder(nsIEventQueue * aClientEventQueue, nsIMsgFolder * aImapMailFolder, nsIUrlListener * aUrlListener, - nsIMsgStatusFeedback *aStatusFeedback, + nsIMsgWindow *aMsgWindow, nsIURI ** aURL) { @@ -123,8 +123,9 @@ nsImapService::SelectFolder(nsIEventQueue * aClientEventQueue, rv = imapUrl->SetImapAction(nsIImapUrl::nsImapSelectFolder); nsCOMPtr mailNewsUrl = do_QueryInterface(imapUrl); - mailNewsUrl->SetStatusFeedback(aStatusFeedback); + mailNewsUrl->SetMsgWindow(aMsgWindow); mailNewsUrl->SetUpdatingFolder(PR_TRUE); + imapUrl->AddChannelToLoadGroup(); rv = SetImapUrlSink(aImapMailFolder, imapUrl); if (NS_SUCCEEDED(rv)) @@ -435,7 +436,12 @@ nsImapService::FetchMessage(nsIImapUrl * aImapUrl, if (NS_SUCCEEDED(rv) && aStreamListener) { nsCOMPtr aChannel; - rv = NewChannel(nsnull, url, nsnull, nsnull, nsnull, getter_AddRefs(aChannel)); + nsCOMPtr aLoadGroup; + nsCOMPtr mailnewsUrl = do_QueryInterface(aImapUrl, &rv); + if (NS_SUCCEEDED(rv) && mailnewsUrl) + mailnewsUrl->GetLoadGroup(getter_AddRefs(aLoadGroup)); + + rv = NewChannel(nsnull, url, aLoadGroup, nsnull, nsnull, getter_AddRefs(aChannel)); if (NS_FAILED(rv)) return rv; nsCOMPtr aCtxt = do_QueryInterface(url); diff --git a/mailnews/imap/src/nsImapService.h b/mailnews/imap/src/nsImapService.h index 4b56ad84a72..3b0d532eb35 100644 --- a/mailnews/imap/src/nsImapService.h +++ b/mailnews/imap/src/nsImapService.h @@ -53,7 +53,7 @@ public: NS_IMETHOD SelectFolder(nsIEventQueue * aClientEventQueue, nsIMsgFolder *aImapMailFolder, nsIUrlListener * aUrlListener, - nsIMsgStatusFeedback *aMsgStatusFeedback, + nsIMsgWindow *aMsgWindow, nsIURI ** aURL); NS_IMETHOD LiteSelectFolder(nsIEventQueue * aClientEventQueue, nsIMsgFolder * aImapMailFolder, diff --git a/mailnews/imap/src/nsImapUrl.cpp b/mailnews/imap/src/nsImapUrl.cpp index 0c43ea7a0e0..87ebb3080bf 100644 --- a/mailnews/imap/src/nsImapUrl.cpp +++ b/mailnews/imap/src/nsImapUrl.cpp @@ -932,6 +932,20 @@ NS_IMETHODIMP nsImapUrl::SetMockChannel(nsIImapMockChannel * aChannel) return rv; } +NS_IMETHODIMP nsImapUrl::AddChannelToLoadGroup() +{ + nsCOMPtr aLoadGroup; + if (m_mockChannel) + { + GetLoadGroup(getter_AddRefs(aLoadGroup)); + if (aLoadGroup) + { + aLoadGroup->AddChannel(m_mockChannel, nsnull /* context isupports */); + } + } + return NS_OK; +} + NS_IMETHODIMP nsImapUrl::GetAllowContentChange(PRBool *result) { if (!result) diff --git a/mailnews/imap/src/nsImapUrl.h b/mailnews/imap/src/nsImapUrl.h index 62d9b319c45..fb57d0940c1 100644 --- a/mailnews/imap/src/nsImapUrl.h +++ b/mailnews/imap/src/nsImapUrl.h @@ -94,6 +94,7 @@ public: NS_IMETHOD GetMockChannel(nsIImapMockChannel ** aChannel); NS_IMETHOD SetMockChannel(nsIImapMockChannel * aChannel); + NS_IMETHOD AddChannelToLoadGroup(); // nsIMsgMessageUrl NS_DECL_NSIMSGMESSAGEURL diff --git a/mailnews/local/src/nsLocalMailFolder.cpp b/mailnews/local/src/nsLocalMailFolder.cpp index 9da1b15cf5b..5b9fc2b4349 100644 --- a/mailnews/local/src/nsLocalMailFolder.cpp +++ b/mailnews/local/src/nsLocalMailFolder.cpp @@ -513,7 +513,7 @@ nsresult nsMsgLocalMailFolder::GetDatabase() } NS_IMETHODIMP -nsMsgLocalMailFolder::UpdateFolder() +nsMsgLocalMailFolder::UpdateFolder(nsIMsgWindow *aWindow) { return GetDatabase(); // this will cause a reparse, if needed. } @@ -1492,7 +1492,7 @@ nsMsgLocalMailFolder::CreateMessageFromMsgDBHdr(nsIMsgDBHdr *msgDBHdr, return rv; } -NS_IMETHODIMP nsMsgLocalMailFolder::GetNewMessages() +NS_IMETHODIMP nsMsgLocalMailFolder::GetNewMessages(nsIMsgWindow *aWindow) { nsresult rv = NS_OK; diff --git a/mailnews/local/src/nsLocalMailFolder.h b/mailnews/local/src/nsLocalMailFolder.h index 320db845f13..b9634b2598c 100644 --- a/mailnews/local/src/nsLocalMailFolder.h +++ b/mailnews/local/src/nsLocalMailFolder.h @@ -86,7 +86,7 @@ public: NS_IMETHOD AddUnique(nsISupports* element); NS_IMETHOD ReplaceElement(nsISupports* element, nsISupports* newElement); NS_IMETHOD GetMessages(nsISimpleEnumerator* *result); - NS_IMETHOD UpdateFolder(); + NS_IMETHOD UpdateFolder(nsIMsgWindow *aWindow); NS_IMETHOD CreateSubfolder(const char *folderName); @@ -125,7 +125,7 @@ public: nsIMsgWindow *msgWindow, nsIMsgCopyServiceListener* listener); NS_IMETHOD CreateMessageFromMsgDBHdr(nsIMsgDBHdr *msgDBHdr, nsIMessage **message); - NS_IMETHOD GetNewMessages(); + NS_IMETHOD GetNewMessages(nsIMsgWindow *aWindow); // nsIMsgMailFolder NS_IMETHOD GetPath(nsIFileSpec ** aPathName); diff --git a/mailnews/news/src/nsNewsFolder.cpp b/mailnews/news/src/nsNewsFolder.cpp index fe54ff528d7..c29ef258bae 100644 --- a/mailnews/news/src/nsNewsFolder.cpp +++ b/mailnews/news/src/nsNewsFolder.cpp @@ -376,10 +376,10 @@ nsresult nsMsgNewsFolder::GetDatabase() NS_IMETHODIMP -nsMsgNewsFolder::UpdateFolder() +nsMsgNewsFolder::UpdateFolder(nsIMsgWindow *aWindow) { GetDatabase(); // want this cached... - return GetNewMessages(); + return GetNewMessages(aWindow); } NS_IMETHODIMP @@ -892,7 +892,7 @@ NS_IMETHODIMP nsMsgNewsFolder::DeleteMessages(nsISupportsArray *messages, return rv; } -NS_IMETHODIMP nsMsgNewsFolder::GetNewMessages() +NS_IMETHODIMP nsMsgNewsFolder::GetNewMessages(nsIMsgWindow *aWindow) { nsresult rv = NS_OK; diff --git a/mailnews/news/src/nsNewsFolder.h b/mailnews/news/src/nsNewsFolder.h index 5d36d746f1c..e037b80f13c 100644 --- a/mailnews/news/src/nsNewsFolder.h +++ b/mailnews/news/src/nsNewsFolder.h @@ -55,7 +55,7 @@ public: NS_IMETHOD AddUnique(nsISupports* element); NS_IMETHOD ReplaceElement(nsISupports* element, nsISupports* newElement); NS_IMETHOD GetMessages(nsISimpleEnumerator* *result); - NS_IMETHOD UpdateFolder(); + NS_IMETHOD UpdateFolder(nsIMsgWindow *aWindow); NS_IMETHOD CreateSubfolder(const char *folderName); @@ -87,7 +87,7 @@ public: NS_IMETHOD DeleteMessages(nsISupportsArray *messages, nsIMsgWindow *msgWindow, PRBool deleteStorage); NS_IMETHOD CreateMessageFromMsgDBHdr(nsIMsgDBHdr *msgDBHdr, nsIMessage **message); - NS_IMETHOD GetNewMessages(); + NS_IMETHOD GetNewMessages(nsIMsgWindow *aWindow); NS_IMETHOD GetPath(nsIFileSpec** aPathName);