rename nsIImapMailFolder, nsIImapMessage, nsIImapExtension, nsIImapMiscellaneous to nsIImapMailFolderSink, nsIImapMessageSink, nsIImapExtensionSink, nsIImapMiscellaneousSink

This commit is contained in:
jefft%netscape.com 1999-04-19 18:41:43 +00:00
Родитель b8b86e2425
Коммит 9ffa76ce11
17 изменённых файлов: 713 добавлений и 713 удалений

Просмотреть файл

@ -27,10 +27,10 @@ EXPORTS= \
nsIImapProtocol.h \
nsIImapLog.h \
nsIIMAPHostSessionList.h \
nsIImapMailfolder.h \
nsIImapMessage.h \
nsIImapExtension.h \
nsIImapMiscellaneous.h \
nsIImapMailfolderSink.h \
nsIImapMessageSink.h \
nsIImapExtensionSink.h \
nsIImapMiscellaneousSink.h \
$(NULL)
include $(topsrcdir)/config/config.mk

Просмотреть файл

@ -23,10 +23,10 @@ EXPORTS = \
nsIImapProtocol.h \
nsIImapLog.h \
nsIIMAPHostSessionList.h \
nsIImapMailfolder.h \
nsIImapMessage.h \
nsIImapExtension.h \
nsIImapMiscellaneous.h \
nsIImapMailfolderSink.h \
nsIImapMessageSink.h \
nsIImapExtensionSink.h \
nsIImapMiscellaneousSink.h \
nsIImapService.h \
nsIImapIncomingServer.h \
nsIImapFlagAndUidState.h \

Просмотреть файл

@ -15,8 +15,8 @@
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
#ifndef nsIImapExtension_h__
#define nsIImapExtension_h__
#ifndef nsIImapExtensionSink_h__
#define nsIImapExtensionSink_h__
#include "nscore.h"
#include "nsISupports.h"
@ -25,16 +25,16 @@
/* 44ede08e-e77f-11d2-af83-001083002da8 */
#define NS_IIMAPEXTENSION_IID \
#define NS_IIMAPEXTENSIONSINK_IID \
{ 0x44ede08e, 0xe77f, 0x11d2, \
{ 0xaf, 0x83, 0x00, 0x10, 0x83, 0x00, 0x2d, 0xa8 } }
class nsIImapExtension : public nsISupports
class nsIImapExtensionSink : public nsISupports
{
public:
static const nsIID& GetIID()
{
static nsIID iid = NS_IIMAPEXTENSION_IID;
static nsIID iid = NS_IIMAPEXTENSIONSINK_IID;
return iid;
}

Просмотреть файл

@ -15,8 +15,8 @@
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
#ifndef nsIImapMailfolder_h__
#define nsIImapMailfolder_h__
#ifndef nsIImapMailFolderSink_h__
#define nsIImapMailFolderSink_h__
#include "nscore.h"
#include "nsISupports.h"
@ -25,16 +25,16 @@
/* 3b2dd7e0-e72c-11d2-ab7b-00805f8ac968 */
#define NS_IIMAPMAILFOLDER_IID \
#define NS_IIMAPMAILFOLDERSINK_IID \
{ 0x3b2dd7e0, 0xe72c, 0x11d2, \
{ 0xab, 0x7b, 0x00, 0x80, 0x5f, 0x8a, 0xc9, 0x68 } }
class nsIImapMailFolder : public nsISupports
class nsIImapMailFolderSink : public nsISupports
{
public:
static const nsIID& GetIID()
{
static nsIID iid = NS_IIMAPMAILFOLDER_IID;
static nsIID iid = NS_IIMAPMAILFOLDERSINK_IID;
return iid;
}

Просмотреть файл

@ -15,8 +15,8 @@
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
#ifndef nsIImapMessage_h__
#define nsIImapMessage_h__
#ifndef nsIImapMessageSink_h__
#define nsIImapMessageSink_h__
#include "nscore.h"
#include "nsISupports.h"
@ -25,16 +25,16 @@
/* f8abba00-e70e-11d2-ab7a-00805f8ac968 */
#define NS_IIMAPMESSAGE_IID \
#define NS_IIMAPMESSAGESINK_IID \
{ 0xf8abba00, 0xe70e, 0x11d2, \
{ 0xab, 0x7a, 0x00, 0x80, 0x5f, 0x8a, 0xc9, 0x68 } }
class nsIImapMessage : public nsISupports
class nsIImapMessageSink : public nsISupports
{
public:
static const nsIID& GetIID()
{
static nsIID iid = NS_IIMAPMESSAGE_IID;
static nsIID iid = NS_IIMAPMESSAGESINK_IID;
return iid;
}

Просмотреть файл

@ -15,8 +15,8 @@
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
#ifndef nsIImapMiscellaneous_h__
#define nsIImapMiscellaneous_h__
#ifndef nsIImapMiscellaneousSink_h__
#define nsIImapMiscellaneousSink_h__
#include "nscore.h"
#include "nsISupports.h"
@ -26,16 +26,16 @@
/* 22e3e664-e789-11d2-af83-001083002da8 */
#define NS_IIMAPMISCELLANEOUS_IID \
#define NS_IIMAPMISCELLANEOUSSINK_IID \
{ 0x22e3e664, 0xe789, 0x11d2, \
{ 0xaf, 0x83, 0x00, 0x10, 0x83, 0x00, 0x2d, 0xa8 } }
class nsIImapMiscellaneous : public nsISupports
class nsIImapMiscellaneousSink : public nsISupports
{
public:
static const nsIID& GetIID()
{
static nsIID iid = NS_IIMAPMISCELLANEOUS_IID;
static nsIID iid = NS_IIMAPMISCELLANEOUSSINK_IID;
return iid;
}

Просмотреть файл

@ -44,7 +44,7 @@
////////////////////////////////////////////////////////////////////////////////////////
class nsIImapProtocol;
class nsIImapMailFolder;
class nsIImapMailFolderSink;
class nsIUrlListener;
class nsIURL;
struct PLEventQueue;
@ -68,7 +68,7 @@ public:
// aClientEventQueue is the event queue of the event sinks. We post events into this queue.
// mscott -- eventually this function will take in the account (identity/incoming server) associated with
// the request
NS_IMETHOD SelectFolder(PLEventQueue * aClientEventQueue, nsIImapMailFolder * aImapUrl, nsIUrlListener * aUrlListener, nsIURL ** aURL) = 0;
NS_IMETHOD SelectFolder(PLEventQueue * aClientEventQueue, nsIImapMailFolderSink * aImapUrl, nsIUrlListener * aUrlListener, nsIURL ** aURL) = 0;
};

Просмотреть файл

@ -28,10 +28,10 @@
/* include all of our event sink interfaces */
#include "nsIImapLog.h"
#include "nsIImapMailfolder.h"
#include "nsIImapMessage.h"
#include "nsIImapExtension.h"
#include "nsIImapMiscellaneous.h"
#include "nsIImapMailFolderSink.h"
#include "nsIImapMessageSink.h"
#include "nsIImapExtensionSink.h"
#include "nsIImapMiscellaneousSink.h"
/* 21A89610-DC0D-11d2-806C-006008128C4E */
@ -131,17 +131,17 @@ public:
NS_IMETHOD GetImapLog(nsIImapLog ** aImapLog) = 0;
NS_IMETHOD SetImapLog(nsIImapLog * aImapLog) = 0;
NS_IMETHOD GetImapMailFolder(nsIImapMailFolder** aImapMailFolder) = 0;
NS_IMETHOD SetImapMailFolder(nsIImapMailFolder* aImapMailFolder) = 0;
NS_IMETHOD GetImapMailFolderSink(nsIImapMailFolderSink** aImapMailFolderSink) = 0;
NS_IMETHOD SetImapMailFolderSink(nsIImapMailFolderSink* aImapMailFolderSink) = 0;
NS_IMETHOD GetImapMessage(nsIImapMessage** aImapMessage) = 0;
NS_IMETHOD SetImapMessage(nsIImapMessage* aImapMessage) = 0;
NS_IMETHOD GetImapMessageSink(nsIImapMessageSink** aImapMessageSink) = 0;
NS_IMETHOD SetImapMessageSink(nsIImapMessageSink* aImapMessageSink) = 0;
NS_IMETHOD GetImapExtension(nsIImapExtension** aImapExtension) = 0;
NS_IMETHOD SetImapExtension(nsIImapExtension* aImapExtension) = 0;
NS_IMETHOD GetImapExtensionSink(nsIImapExtensionSink** aImapExtensionSink) = 0;
NS_IMETHOD SetImapExtensionSink(nsIImapExtensionSink* aImapExtensionSink) = 0;
NS_IMETHOD GetImapMiscellaneous(nsIImapMiscellaneous** aImapMiscellaneous) = 0;
NS_IMETHOD SetImapMiscellaneous(nsIImapMiscellaneous* aImapMiscellaneous) = 0;
NS_IMETHOD GetImapMiscellaneousSink(nsIImapMiscellaneousSink** aImapMiscellaneousSink) = 0;
NS_IMETHOD SetImapMiscellaneousSink(nsIImapMiscellaneousSink* aImapMiscellaneousSink) = 0;
///////////////////////////////////////////////////////////////////////////////
// Getters and Setters for the imap url state

Просмотреть файл

@ -185,10 +185,10 @@ nsImapProtocol::nsImapProtocol() :
// imap protocol sink interfaces
m_server = nsnull;
m_imapLog = nsnull;
m_imapMailFolder = nsnull;
m_imapMessage = nsnull;
m_imapExtension = nsnull;
m_imapMiscellaneous = nsnull;
m_imapMailFolderSink = nsnull;
m_imapMessageSink = nsnull;
m_imapExtensionSink = nsnull;
m_imapMiscellaneousSink = nsnull;
m_trackingTime = PR_FALSE;
m_startTime = 0;
@ -271,10 +271,10 @@ nsImapProtocol::~nsImapProtocol()
NS_IF_RELEASE(m_transport);
NS_IF_RELEASE(m_server);
NS_IF_RELEASE(m_imapLog);
NS_IF_RELEASE(m_imapMailFolder);
NS_IF_RELEASE(m_imapMessage);
NS_IF_RELEASE(m_imapExtension);
NS_IF_RELEASE(m_imapMiscellaneous);
NS_IF_RELEASE(m_imapMailFolderSink);
NS_IF_RELEASE(m_imapMessageSink);
NS_IF_RELEASE(m_imapExtensionSink);
NS_IF_RELEASE(m_imapMiscellaneousSink);
NS_IF_RELEASE(m_hostSessionList);
PR_FREEIF(m_dataOutputBuf);
@ -382,61 +382,61 @@ nsImapProtocol::SetupSinkProxy()
}
}
if (!m_imapMailFolder)
if (!m_imapMailFolderSink)
{
nsIImapMailFolder *aImapMailFolder;
res = m_runningUrl->GetImapMailFolder(&aImapMailFolder);
if (NS_SUCCEEDED(res) && aImapMailFolder)
nsIImapMailFolderSink *aImapMailFolderSink;
res = m_runningUrl->GetImapMailFolderSink(&aImapMailFolderSink);
if (NS_SUCCEEDED(res) && aImapMailFolderSink)
{
m_imapMailFolder = new nsImapMailFolderProxy(aImapMailFolder,
m_imapMailFolderSink = new nsImapMailFolderSinkProxy(aImapMailFolderSink,
this,
m_sinkEventQueue,
m_thread);
NS_IF_ADDREF(m_imapMailFolder);
NS_RELEASE(aImapMailFolder);
NS_IF_ADDREF(m_imapMailFolderSink);
NS_RELEASE(aImapMailFolderSink);
}
}
if (!m_imapMessage)
if (!m_imapMessageSink)
{
nsIImapMessage *aImapMessage;
res = m_runningUrl->GetImapMessage(&aImapMessage);
if (NS_SUCCEEDED(res) && aImapMessage)
nsIImapMessageSink *aImapMessageSink;
res = m_runningUrl->GetImapMessageSink(&aImapMessageSink);
if (NS_SUCCEEDED(res) && aImapMessageSink)
{
m_imapMessage = new nsImapMessageProxy(aImapMessage,
m_imapMessageSink = new nsImapMessageSinkProxy(aImapMessageSink,
this,
m_sinkEventQueue,
m_thread);
NS_IF_ADDREF (m_imapMessage);
NS_RELEASE(aImapMessage);
NS_IF_ADDREF (m_imapMessageSink);
NS_RELEASE(aImapMessageSink);
}
}
if (!m_imapExtension)
if (!m_imapExtensionSink)
{
nsIImapExtension *aImapExtension;
res = m_runningUrl->GetImapExtension(&aImapExtension);
if(NS_SUCCEEDED(res) && aImapExtension)
nsIImapExtensionSink *aImapExtensionSink;
res = m_runningUrl->GetImapExtensionSink(&aImapExtensionSink);
if(NS_SUCCEEDED(res) && aImapExtensionSink)
{
m_imapExtension = new nsImapExtensionProxy(aImapExtension,
m_imapExtensionSink = new nsImapExtensionSinkProxy(aImapExtensionSink,
this,
m_sinkEventQueue,
m_thread);
NS_IF_ADDREF(m_imapExtension);
NS_RELEASE(aImapExtension);
NS_IF_ADDREF(m_imapExtensionSink);
NS_RELEASE(aImapExtensionSink);
}
}
if (!m_imapMiscellaneous)
if (!m_imapMiscellaneousSink)
{
nsIImapMiscellaneous *aImapMiscellaneous;
res = m_runningUrl->GetImapMiscellaneous(&aImapMiscellaneous);
if (NS_SUCCEEDED(res) && aImapMiscellaneous)
nsIImapMiscellaneousSink *aImapMiscellaneousSink;
res = m_runningUrl->GetImapMiscellaneousSink(&aImapMiscellaneousSink);
if (NS_SUCCEEDED(res) && aImapMiscellaneousSink)
{
m_imapMiscellaneous = new
nsImapMiscellaneousProxy(aImapMiscellaneous,
m_imapMiscellaneousSink = new
nsImapMiscellaneousSinkProxy(aImapMiscellaneousSink,
this,
m_sinkEventQueue,
m_thread);
NS_IF_ADDREF(m_imapMiscellaneous);
NS_RELEASE(aImapMiscellaneous);
NS_IF_ADDREF(m_imapMiscellaneousSink);
NS_RELEASE(aImapMiscellaneousSink);
}
}
}
@ -1079,9 +1079,9 @@ void nsImapProtocol::ProcessSelectedStateURL()
uidStruct->returnValidity = kUidUnknown;
uidStruct->hostName = hostName;
m_runningUrl->CreateCanonicalSourceFolderPathString(&uidStruct->canonical_boxname);
if (m_imapMiscellaneous)
if (m_imapMiscellaneousSink)
{
m_imapMiscellaneous->GetStoredUIDValidity(this, uidStruct);
m_imapMiscellaneousSink->GetStoredUIDValidity(this, uidStruct);
WaitForFEEventCompletion();
@ -1106,9 +1106,9 @@ void nsImapProtocol::ProcessSelectedStateURL()
switch (imapAction)
{
case nsIImapUrl::nsImapLiteSelectFolder:
if (GetServerStateParser().LastCommandSuccessful() && m_imapMiscellaneous)
if (GetServerStateParser().LastCommandSuccessful() && m_imapMiscellaneousSink)
{
m_imapMiscellaneous->LiteSelectUIDValidity(this, GetServerStateParser().FolderUID());
m_imapMiscellaneousSink->LiteSelectUIDValidity(this, GetServerStateParser().FolderUID());
WaitForFEEventCompletion();
// need to update the mailbox count - is this a good place?
@ -1308,8 +1308,8 @@ void nsImapProtocol::ProcessSelectedStateURL()
deleteMsg->onlineFolderName = convertedCanonicalName;
deleteMsg->deleteAllMsgs = FALSE;
deleteMsg->msgIdString = messageIdString.ToNewCString(); // storage adopted, do not delete
if (m_imapMessage)
m_imapMessage->NotifyMessageDeleted(this, deleteMsg);
if (m_imapMessageSink)
m_imapMessageSink->NotifyMessageDeleted(this, deleteMsg);
// notice we don't wait for this to finish...
}
else
@ -1351,8 +1351,8 @@ void nsImapProtocol::ProcessSelectedStateURL()
deleteMsg->deleteAllMsgs = PR_TRUE;
deleteMsg->msgIdString = nil;
if (m_imapMessage)
m_imapMessage->NotifyMessageDeleted(this, deleteMsg);
if (m_imapMessageSink)
m_imapMessageSink->NotifyMessageDeleted(this, deleteMsg);
}
}
@ -1470,8 +1470,8 @@ void nsImapProtocol::ProcessSelectedStateURL()
else
copyState = GetServerStateParser().LastCommandSuccessful() ?
kSuccessfulCopy : kFailedCopy;
if (m_imapMessage)
m_imapMessage->OnlineCopyReport(this, &copyState);
if (m_imapMessageSink)
m_imapMessageSink->OnlineCopyReport(this, &copyState);
if (GetServerStateParser().LastCommandSuccessful() &&
(imapAction == nsIImapUrl::nsImapOnlineMove))
@ -1480,10 +1480,10 @@ void nsImapProtocol::ProcessSelectedStateURL()
PRBool storeSuccessful = GetServerStateParser().LastCommandSuccessful();
if (m_imapMessage)
if (m_imapMessageSink)
{
copyState = storeSuccessful ? kSuccessfulDelete : kFailedDelete;
m_imapMessage->OnlineCopyReport(this, &copyState);
m_imapMessageSink->OnlineCopyReport(this, &copyState);
}
}
}
@ -1604,12 +1604,12 @@ void nsImapProtocol::BeginMessageDownLoad(
if (GetServerStateParser().GetDownloadingHeaders())
{
if (m_imapMailFolder)
m_imapMailFolder->SetupHeaderParseStream(this, si);
if (m_imapMailFolderSink)
m_imapMailFolderSink->SetupHeaderParseStream(this, si);
}
else if (m_imapMessage)
else if (m_imapMessageSink)
{
m_imapMessage->SetupMsgWriteStream(this, si);
m_imapMessageSink->SetupMsgWriteStream(this, si);
WaitForFEEventCompletion();
}
PL_strfree(si->content_type);
@ -1632,9 +1632,9 @@ nsImapProtocol::GetShouldDownloadArbitraryHeaders()
aInfo->rv = PR_TRUE; // default
m_runningUrl->GetHost(&hostName);
aInfo->hostName = PL_strdup (hostName);
if (m_imapMiscellaneous)
if (m_imapMiscellaneousSink)
{
m_imapMiscellaneous->GetShouldDownloadArbitraryHeaders(this, aInfo);
m_imapMiscellaneousSink->GetShouldDownloadArbitraryHeaders(this, aInfo);
WaitForFEEventCompletion();
}
rv = aInfo->rv;
@ -1656,9 +1656,9 @@ nsImapProtocol::GetArbitraryHeadersToDownload()
aInfo->rv = PR_TRUE; // default
m_runningUrl->GetHost(&hostName);
aInfo->hostName = PL_strdup (hostName);
if (m_imapMiscellaneous)
if (m_imapMiscellaneousSink)
{
m_imapMiscellaneous->GetShouldDownloadArbitraryHeaders(this, aInfo);
m_imapMiscellaneousSink->GetShouldDownloadArbitraryHeaders(this, aInfo);
WaitForFEEventCompletion();
}
if (aInfo->hostName)
@ -2184,11 +2184,11 @@ nsImapProtocol::PostLineDownLoadEvent(msg_line_info *downloadLineDontDelete)
if (GetServerStateParser().GetDownloadingHeaders())
{
if (m_imapMailFolder && downloadLineDontDelete)
m_imapMailFolder->ParseAdoptedHeaderLine(this, downloadLineDontDelete);
if (m_imapMailFolderSink && downloadLineDontDelete)
m_imapMailFolderSink->ParseAdoptedHeaderLine(this, downloadLineDontDelete);
}
else if (m_imapMessage && downloadLineDontDelete)
m_imapMessage->ParseAdoptedMsgLine(this, downloadLineDontDelete);
else if (m_imapMessageSink && downloadLineDontDelete)
m_imapMessageSink->ParseAdoptedMsgLine(this, downloadLineDontDelete);
// ***** We need to handle the psuedo interrupt here *****
}
@ -2324,11 +2324,11 @@ void nsImapProtocol::NormalMessageEndDownload()
if (GetServerStateParser().GetDownloadingHeaders())
{
if (m_imapMailFolder)
m_imapMailFolder->NormalEndHeaderParseStream(this);
if (m_imapMailFolderSink)
m_imapMailFolderSink->NormalEndHeaderParseStream(this);
}
else if (m_imapMessage)
m_imapMessage->NormalEndMsgWriteStream(this);
else if (m_imapMessageSink)
m_imapMessageSink->NormalEndMsgWriteStream(this);
}
@ -2347,11 +2347,11 @@ void nsImapProtocol::AbortMessageDownLoad()
if (GetServerStateParser().GetDownloadingHeaders())
{
if (m_imapMailFolder)
m_imapMailFolder->AbortHeaderParseStream(this);
if (m_imapMailFolderSink)
m_imapMailFolderSink->AbortHeaderParseStream(this);
}
else if (m_imapMessage)
m_imapMessage->AbortMsgWriteStream(this);
else if (m_imapMessageSink)
m_imapMessageSink->AbortMsgWriteStream(this);
}
@ -2468,7 +2468,7 @@ void nsImapProtocol::ProcessMailboxUpdate(PRBool handlePossibleUndo)
void nsImapProtocol::UpdatedMailboxSpec(mailbox_spec *aSpec)
{
m_imapMailFolder->UpdateImapMailboxInfo(this, aSpec);
m_imapMailFolderSink->UpdateImapMailboxInfo(this, aSpec);
}
void nsImapProtocol::FolderHeaderDump(PRUint32 *msgUids, PRUint32 msgCount)
@ -2592,9 +2592,9 @@ void nsImapProtocol::FolderMsgDumpLoop(PRUint32 *msgUids, PRUint32 msgCount, nsI
void nsImapProtocol::HeaderFetchCompleted()
{
if (m_imapMiscellaneous)
if (m_imapMiscellaneousSink)
{
m_imapMiscellaneous->HeaderFetchCompleted(this);
m_imapMiscellaneousSink->HeaderFetchCompleted(this);
WaitForFEEventCompletion();
}
}
@ -2649,7 +2649,7 @@ void nsImapProtocol::PeriodicBiff()
void nsImapProtocol::SendSetBiffIndicatorEvent(nsMsgBiffState newState)
{
m_imapMiscellaneous->SetBiffStateAndUpdate(this, newState);
m_imapMiscellaneousSink->SetBiffStateAndUpdate(this, newState);
if (newState == nsMsgBiffState_NewMail)
m_mailToFetch = TRUE;
@ -2800,9 +2800,9 @@ PRUint32 nsImapProtocol::GetMessageSize(nsString2 &messageId,
if (sizeInfo->id && sizeInfo->folderName)
{
if (m_imapMessage)
if (m_imapMessageSink)
{
m_imapMessage->GetMessageSizeFromDB(this, sizeInfo);
m_imapMessageSink->GetMessageSizeFromDB(this, sizeInfo);
WaitForFEEventCompletion();
}
@ -2829,9 +2829,9 @@ PRBool nsImapProtocol::GetShowAttachmentsInline()
{
PRBool *rv = (PRBool*) new PRBool(PR_FALSE);
if (m_imapMiscellaneous && rv)
if (m_imapMiscellaneousSink && rv)
{
m_imapMiscellaneous->GetShowAttachmentsInline(this, rv);
m_imapMiscellaneousSink->GetShowAttachmentsInline(this, rv);
WaitForFEEventCompletion();
return *rv;
}
@ -3017,9 +3017,9 @@ void nsImapProtocol::AddFolderRightsForUser(const char *mailboxName, const char
aclRightsInfo->mailboxName && aclRightsInfo->rights &&
userName ? (aclRightsInfo->userName != NULL) : TRUE)
{
if (m_imapExtension)
if (m_imapExtensionSink)
{
m_imapExtension->AddFolderRights(this, aclRightsInfo);
m_imapExtensionSink->AddFolderRights(this, aclRightsInfo);
WaitForFEEventCompletion();
}
}
@ -3037,9 +3037,9 @@ void nsImapProtocol::AddFolderRightsForUser(const char *mailboxName, const char
void nsImapProtocol::CommitNamespacesForHostEvent()
{
if (m_imapMiscellaneous)
if (m_imapMiscellaneousSink)
{
m_imapMiscellaneous->CommitNamespaces(this, GetImapHostName());
m_imapMiscellaneousSink->CommitNamespaces(this, GetImapHostName());
WaitForFEEventCompletion();
}
}
@ -3047,9 +3047,9 @@ void nsImapProtocol::CommitNamespacesForHostEvent()
// notifies libmsg that we have new capability data for the current host
void nsImapProtocol::CommitCapabilityForHostEvent()
{
if (m_imapMiscellaneous)
if (m_imapMiscellaneousSink)
{
m_imapMiscellaneous->CommitCapabilityForHost(this, GetImapHostName());
m_imapMiscellaneousSink->CommitCapabilityForHost(this, GetImapHostName());
WaitForFEEventCompletion();
}
}
@ -3087,9 +3087,9 @@ void nsImapProtocol::ClearAllFolderRights(const char *mailboxName,
if (aclRightsInfo->hostName && aclRightsInfo->mailboxName)
{
if (m_imapExtension)
if (m_imapExtensionSink)
{
m_imapExtension->ClearFolderRights(this, aclRightsInfo);
m_imapExtensionSink->ClearFolderRights(this, aclRightsInfo);
WaitForFEEventCompletion();
}
}
@ -3155,15 +3155,15 @@ nsImapProtocol::NotifyMessageFlags(imapMessageFlagsType flags, nsMsgKey key)
FlagsKeyStruct aKeyStruct;
aKeyStruct.flags = flags;
aKeyStruct.key = key;
if (m_imapMessage)
m_imapMessage->NotifyMessageFlags(this, &aKeyStruct);
if (m_imapMessageSink)
m_imapMessageSink->NotifyMessageFlags(this, &aKeyStruct);
}
void
nsImapProtocol::NotifySearchHit(const char * hitLine)
{
if (m_imapMiscellaneous)
m_imapMiscellaneous->AddSearchResult(this, hitLine);
if (m_imapMiscellaneousSink)
m_imapMiscellaneousSink->AddSearchResult(this, hitLine);
}
void nsImapProtocol::SetMailboxDiscoveryStatus(EMailboxDiscoverStatus status)
@ -3286,9 +3286,9 @@ nsImapProtocol::DiscoverMailboxSpec(mailbox_spec * adoptedBoxSpec)
boxNameCopy = adoptedBoxSpec->allocatedPathName;
if (m_imapMailFolder)
if (m_imapMailFolderSink)
{
m_imapMailFolder->PossibleImapMailbox(this,
m_imapMailFolderSink->PossibleImapMailbox(this,
adoptedBoxSpec);
WaitForFEEventCompletion();
@ -3379,23 +3379,23 @@ nsImapProtocol::DiscoverMailboxSpec(mailbox_spec * adoptedBoxSpec)
void
nsImapProtocol::AlertUserEventUsingId(PRUint32 aMessageId)
{
if (m_imapMiscellaneous)
m_imapMiscellaneous->FEAlert(this,
if (m_imapMiscellaneousSink)
m_imapMiscellaneousSink->FEAlert(this,
"**** Fix me with real string ****\r\n");
}
void
nsImapProtocol::AlertUserEvent(const char * message)
{
if (m_imapMiscellaneous)
m_imapMiscellaneous->FEAlert(this, message);
if (m_imapMiscellaneousSink)
m_imapMiscellaneousSink->FEAlert(this, message);
}
void
nsImapProtocol::AlertUserEventFromServer(const char * aServerEvent)
{
if (m_imapMiscellaneous)
m_imapMiscellaneous->FEAlertFromServer(this, aServerEvent);
if (m_imapMiscellaneousSink)
m_imapMiscellaneousSink->FEAlertFromServer(this, aServerEvent);
}
void
@ -3406,23 +3406,23 @@ nsImapProtocol::ShowProgress()
aProgressInfo.message = "*** Fix me!! ***\r\n";
aProgressInfo.percent = 0;
if (m_imapMiscellaneous)
m_imapMiscellaneous->PercentProgress(this, &aProgressInfo);
if (m_imapMiscellaneousSink)
m_imapMiscellaneousSink->PercentProgress(this, &aProgressInfo);
}
void
nsImapProtocol::ProgressEventFunctionUsingId(PRUint32 aMsgId)
{
if (m_imapMiscellaneous)
m_imapMiscellaneous->ProgressStatus(this, "*** Fix me!! ***\r\n");
if (m_imapMiscellaneousSink)
m_imapMiscellaneousSink->ProgressStatus(this, "*** Fix me!! ***\r\n");
}
void
nsImapProtocol::ProgressEventFunctionUsingIdWithString(PRUint32 aMsgId, const
char * aExtraInfo)
{
if (m_imapMiscellaneous)
m_imapMiscellaneous->ProgressStatus(this, "*** Fix me!! ***\r\n");
if (m_imapMiscellaneousSink)
m_imapMiscellaneousSink->ProgressStatus(this, "*** Fix me!! ***\r\n");
}
void
@ -3431,8 +3431,8 @@ nsImapProtocol::PercentProgressUpdateEvent(char *message, PRInt32 percent)
ProgressInfo aProgressInfo;
aProgressInfo.message = message;
aProgressInfo.percent = percent;
if (m_imapMiscellaneous)
m_imapMiscellaneous->PercentProgress(this, &aProgressInfo);
if (m_imapMiscellaneousSink)
m_imapMiscellaneousSink->PercentProgress(this, &aProgressInfo);
}
// utility function calls made by the server
@ -3966,8 +3966,8 @@ void nsImapProtocol::OnStatusForFolder(const char *mailboxName)
ParseIMAPandCheckForNewMail();
mailbox_spec *new_spec = GetServerStateParser().CreateCurrentMailboxSpec(mailboxName);
if (new_spec && m_imapMailFolder)
m_imapMailFolder->UpdateImapMailboxStatus(this, new_spec);
if (new_spec && m_imapMailFolderSink)
m_imapMailFolderSink->UpdateImapMailboxStatus(this, new_spec);
}
@ -4270,7 +4270,7 @@ PRBool nsImapProtocol::FolderNeedsACLInitialized(const char *folderName)
}
// mscott - big hack...where do we get a IMAPACLRights object from??????
m_imapExtension->FolderNeedsACLInitialized(this, /* value */ nsnull);
m_imapExtensionSink->FolderNeedsACLInitialized(this, /* value */ nsnull);
WaitForFEEventCompletion();
//TImapFEEvent *folderACLInitEvent =
// new TImapFEEvent(MOZTHREAD_FolderNeedsACLInitialized, // function to call
@ -4342,7 +4342,7 @@ void nsImapProtocol::MailboxDiscoveryFinished()
m_hostSessionList->SetHaveWeEverDiscoveredFoldersForHost(GetImapHostName(), GetImapUserName(), PR_TRUE);
// notify front end that folder discovery is complete....
m_imapMailFolder->MailboxDiscoveryDone(this);
m_imapMailFolderSink->MailboxDiscoveryDone(this);
}
}
@ -4904,7 +4904,7 @@ PRBool nsImapProtocol::TryToLogon()
if (loginSucceeded && imapPasswordIsNew)
{
// let's record the user as authenticated.
m_imapExtension->SetUserAuthenticated(this, PR_TRUE);
m_imapExtensionSink->SetUserAuthenticated(this, PR_TRUE);
}
if (loginSucceeded)

Просмотреть файл

@ -293,11 +293,11 @@ private:
nsIMsgIncomingServer * m_server;
nsImapLogProxy *m_imapLog;
nsImapMailFolderProxy *m_imapMailFolder;
nsImapMessageProxy *m_imapMessage;
nsImapMailFolderSinkProxy *m_imapMailFolderSink;
nsImapMessageSinkProxy *m_imapMessageSink;
nsImapExtensionProxy *m_imapExtension;
nsImapMiscellaneousProxy *m_imapMiscellaneous;
nsImapExtensionSinkProxy *m_imapExtensionSink;
nsImapMiscellaneousSinkProxy *m_imapMiscellaneousSink;
// helper function to setup imap sink interface proxies
void SetupSinkProxy();
// End thread support stuff

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -24,10 +24,10 @@
#include "nsISupports.h"
#include "nsIURL.h"
#include "nsIImapLog.h"
#include "nsIImapMailfolder.h"
#include "nsIImapMessage.h"
#include "nsIImapExtension.h"
#include "nsIImapMiscellaneous.h"
#include "nsIImapMailFolderSink.h"
#include "nsIImapMessageSink.h"
#include "nsIImapExtensionSink.h"
#include "nsIImapMiscellaneousSink.h"
class nsImapProxyBase
{
@ -59,15 +59,15 @@ public:
nsIImapLog* m_realImapLog;
};
class nsImapMailFolderProxy : public nsIImapMailFolder,
class nsImapMailFolderSinkProxy : public nsIImapMailFolderSink,
public nsImapProxyBase
{
public:
nsImapMailFolderProxy(nsIImapMailFolder* aImapMailFolder,
nsImapMailFolderSinkProxy(nsIImapMailFolderSink* aImapMailFolderSink,
nsIImapProtocol* aProtocol,
PLEventQueue* aEventQ,
PRThread* aThread);
virtual ~nsImapMailFolderProxy();
virtual ~nsImapMailFolderSinkProxy();
NS_DECL_ISUPPORTS
@ -104,18 +104,18 @@ public:
NS_IMETHOD AbortHeaderParseStream(nsIImapProtocol* aProtocol);
nsIImapMailFolder* m_realImapMailFolder;
nsIImapMailFolderSink* m_realImapMailFolderSink;
};
class nsImapMessageProxy : public nsIImapMessage,
class nsImapMessageSinkProxy : public nsIImapMessageSink,
public nsImapProxyBase
{
public:
nsImapMessageProxy(nsIImapMessage* aImapMessage,
nsImapMessageSinkProxy(nsIImapMessageSink* aImapMessageSink,
nsIImapProtocol* aProtocol,
PLEventQueue* aEventQ,
PRThread* aThread);
virtual ~nsImapMessageProxy();
virtual ~nsImapMessageSinkProxy();
NS_DECL_ISUPPORTS
@ -147,18 +147,18 @@ public:
NS_IMETHOD GetMessageSizeFromDB(nsIImapProtocol* aProtocol,
MessageSizeInfo* sizeInfo);
nsIImapMessage* m_realImapMessage;
nsIImapMessageSink* m_realImapMessageSink;
};
class nsImapExtensionProxy : public nsIImapExtension,
class nsImapExtensionSinkProxy : public nsIImapExtensionSink,
public nsImapProxyBase
{
public:
nsImapExtensionProxy(nsIImapExtension* aImapExtension,
nsImapExtensionSinkProxy(nsIImapExtensionSink* aImapExtensionSink,
nsIImapProtocol* aProtocol,
PLEventQueue* aEventQ,
PRThread* aThread);
virtual ~nsImapExtensionProxy();
virtual ~nsImapExtensionSinkProxy();
NS_DECL_ISUPPORTS
@ -179,18 +179,18 @@ public:
NS_IMETHOD SetFolderAdminURL(nsIImapProtocol* aProtocol,
FolderQueryInfo* aInfo);
nsIImapExtension* m_realImapExtension;
nsIImapExtensionSink* m_realImapExtensionSink;
};
class nsImapMiscellaneousProxy : public nsIImapMiscellaneous,
class nsImapMiscellaneousSinkProxy : public nsIImapMiscellaneousSink,
public nsImapProxyBase
{
public:
nsImapMiscellaneousProxy (nsIImapMiscellaneous* aImapMiscellaneous,
nsImapMiscellaneousSinkProxy (nsIImapMiscellaneousSink* aImapMiscellaneousSink,
nsIImapProtocol* aProtocol,
PLEventQueue* aEventQ,
PRThread* aThread);
~nsImapMiscellaneousProxy ();
~nsImapMiscellaneousSinkProxy ();
NS_DECL_ISUPPORTS
@ -234,7 +234,7 @@ public:
NS_IMETHOD ProcessTunnel(nsIImapProtocol* aProtocol,
TunnelInfo *aInfo);
nsIImapMiscellaneous* m_realImapMiscellaneous;
nsIImapMiscellaneousSink* m_realImapMiscellaneousSink;
};
/* ******* Imap Base Event struct ******** */
@ -261,16 +261,16 @@ struct nsImapLogProxyEvent : public nsImapEvent
nsImapLogProxy *m_proxy;
};
struct nsImapMailFolderProxyEvent : public nsImapEvent
struct nsImapMailFolderSinkProxyEvent : public nsImapEvent
{
nsImapMailFolderProxyEvent(nsImapMailFolderProxy* aProxy);
virtual ~nsImapMailFolderProxyEvent();
nsImapMailFolderProxy* m_proxy;
nsImapMailFolderSinkProxyEvent(nsImapMailFolderSinkProxy* aProxy);
virtual ~nsImapMailFolderSinkProxyEvent();
nsImapMailFolderSinkProxy* m_proxy;
};
struct PossibleImapMailboxProxyEvent : public nsImapMailFolderProxyEvent
struct PossibleImapMailboxProxyEvent : public nsImapMailFolderSinkProxyEvent
{
PossibleImapMailboxProxyEvent(nsImapMailFolderProxy* aProxy,
PossibleImapMailboxProxyEvent(nsImapMailFolderSinkProxy* aProxy,
mailbox_spec* aSpec);
virtual ~PossibleImapMailboxProxyEvent();
NS_IMETHOD HandleEvent();
@ -278,68 +278,68 @@ struct PossibleImapMailboxProxyEvent : public nsImapMailFolderProxyEvent
mailbox_spec m_mailboxSpec;
};
struct MailboxDiscoveryDoneProxyEvent : public nsImapMailFolderProxyEvent
struct MailboxDiscoveryDoneProxyEvent : public nsImapMailFolderSinkProxyEvent
{
MailboxDiscoveryDoneProxyEvent(nsImapMailFolderProxy* aProxy);
MailboxDiscoveryDoneProxyEvent(nsImapMailFolderSinkProxy* aProxy);
virtual ~MailboxDiscoveryDoneProxyEvent();
NS_IMETHOD HandleEvent();
};
struct UpdateImapMailboxInfoProxyEvent : public nsImapMailFolderProxyEvent
struct UpdateImapMailboxInfoProxyEvent : public nsImapMailFolderSinkProxyEvent
{
UpdateImapMailboxInfoProxyEvent(nsImapMailFolderProxy* aProxy,
UpdateImapMailboxInfoProxyEvent(nsImapMailFolderSinkProxy* aProxy,
mailbox_spec* aSpec);
virtual ~UpdateImapMailboxInfoProxyEvent();
NS_IMETHOD HandleEvent();
mailbox_spec m_mailboxSpec;
};
struct UpdateImapMailboxStatusProxyEvent : public nsImapMailFolderProxyEvent
struct UpdateImapMailboxStatusProxyEvent : public nsImapMailFolderSinkProxyEvent
{
UpdateImapMailboxStatusProxyEvent(nsImapMailFolderProxy* aProxy,
UpdateImapMailboxStatusProxyEvent(nsImapMailFolderSinkProxy* aProxy,
mailbox_spec* aSpec);
virtual ~UpdateImapMailboxStatusProxyEvent();
NS_IMETHOD HandleEvent();
mailbox_spec m_mailboxSpec;
};
struct ChildDiscoverySucceededProxyEvent : public nsImapMailFolderProxyEvent
struct ChildDiscoverySucceededProxyEvent : public nsImapMailFolderSinkProxyEvent
{
ChildDiscoverySucceededProxyEvent(nsImapMailFolderProxy* aProxy);
ChildDiscoverySucceededProxyEvent(nsImapMailFolderSinkProxy* aProxy);
virtual ~ChildDiscoverySucceededProxyEvent();
NS_IMETHOD HandleEvent();
};
struct OnlineFolderDeleteProxyEvent : public nsImapMailFolderProxyEvent
struct OnlineFolderDeleteProxyEvent : public nsImapMailFolderSinkProxyEvent
{
OnlineFolderDeleteProxyEvent(nsImapMailFolderProxy* aProxy,
OnlineFolderDeleteProxyEvent(nsImapMailFolderSinkProxy* aProxy,
const char* folderName);
virtual ~OnlineFolderDeleteProxyEvent();
NS_IMETHOD HandleEvent();
char* m_folderName;
};
struct OnlineFolderCreateFailedProxyEvent : public nsImapMailFolderProxyEvent
struct OnlineFolderCreateFailedProxyEvent : public nsImapMailFolderSinkProxyEvent
{
OnlineFolderCreateFailedProxyEvent(nsImapMailFolderProxy* aProxy,
OnlineFolderCreateFailedProxyEvent(nsImapMailFolderSinkProxy* aProxy,
const char* folderName);
virtual ~OnlineFolderCreateFailedProxyEvent();
NS_IMETHOD HandleEvent();
char* m_folderName;
};
struct OnlineFolderRenameProxyEvent : public nsImapMailFolderProxyEvent
struct OnlineFolderRenameProxyEvent : public nsImapMailFolderSinkProxyEvent
{
OnlineFolderRenameProxyEvent(nsImapMailFolderProxy* aProxy,
OnlineFolderRenameProxyEvent(nsImapMailFolderSinkProxy* aProxy,
folder_rename_struct* aStruct);
virtual ~OnlineFolderRenameProxyEvent();
NS_IMETHOD HandleEvent();
folder_rename_struct m_folderRenameStruct;
};
struct SubscribeUpgradeFinishedProxyEvent : public nsImapMailFolderProxyEvent
struct SubscribeUpgradeFinishedProxyEvent : public nsImapMailFolderSinkProxyEvent
{
SubscribeUpgradeFinishedProxyEvent(nsImapMailFolderProxy* aProxy,
SubscribeUpgradeFinishedProxyEvent(nsImapMailFolderSinkProxy* aProxy,
EIMAPSubscriptionUpgradeState* aState);
virtual ~SubscribeUpgradeFinishedProxyEvent();
NS_IMETHOD HandleEvent();
@ -347,245 +347,245 @@ struct SubscribeUpgradeFinishedProxyEvent : public nsImapMailFolderProxyEvent
};
struct PromptUserForSubscribeUpdatePathProxyEvent :
public nsImapMailFolderProxyEvent
public nsImapMailFolderSinkProxyEvent
{
PromptUserForSubscribeUpdatePathProxyEvent(nsImapMailFolderProxy* aProxy,
PromptUserForSubscribeUpdatePathProxyEvent(nsImapMailFolderSinkProxy* aProxy,
PRBool* aBool);
virtual ~PromptUserForSubscribeUpdatePathProxyEvent();
NS_IMETHOD HandleEvent();
PRBool m_bool;
};
struct FolderIsNoSelectProxyEvent : public nsImapMailFolderProxyEvent
struct FolderIsNoSelectProxyEvent : public nsImapMailFolderSinkProxyEvent
{
FolderIsNoSelectProxyEvent(nsImapMailFolderProxy* aProxy,
FolderIsNoSelectProxyEvent(nsImapMailFolderSinkProxy* aProxy,
FolderQueryInfo* aInfo);
virtual ~FolderIsNoSelectProxyEvent();
NS_IMETHOD HandleEvent();
FolderQueryInfo m_folderQueryInfo;
};
struct SetupHeaderParseStreamProxyEvent : public nsImapMailFolderProxyEvent
struct SetupHeaderParseStreamProxyEvent : public nsImapMailFolderSinkProxyEvent
{
SetupHeaderParseStreamProxyEvent(nsImapMailFolderProxy* aProxy,
SetupHeaderParseStreamProxyEvent(nsImapMailFolderSinkProxy* aProxy,
StreamInfo* aStreamInfo);
virtual ~SetupHeaderParseStreamProxyEvent();
NS_IMETHOD HandleEvent();
StreamInfo m_streamInfo;
};
struct NormalEndHeaderParseStreamProxyEvent : public nsImapMailFolderProxyEvent
struct NormalEndHeaderParseStreamProxyEvent : public nsImapMailFolderSinkProxyEvent
{
NormalEndHeaderParseStreamProxyEvent(nsImapMailFolderProxy* aProxyo);
NormalEndHeaderParseStreamProxyEvent(nsImapMailFolderSinkProxy* aProxyo);
virtual ~NormalEndHeaderParseStreamProxyEvent();
NS_IMETHOD HandleEvent();
};
struct ParseAdoptedHeaderLineProxyEvent : public nsImapMailFolderProxyEvent
struct ParseAdoptedHeaderLineProxyEvent : public nsImapMailFolderSinkProxyEvent
{
ParseAdoptedHeaderLineProxyEvent(nsImapMailFolderProxy* aProxy,
ParseAdoptedHeaderLineProxyEvent(nsImapMailFolderSinkProxy* aProxy,
msg_line_info* aMsgLineInfo);
virtual ~ParseAdoptedHeaderLineProxyEvent();
NS_IMETHOD HandleEvent();
msg_line_info m_msgLineInfo;
};
struct AbortHeaderParseStreamProxyEvent : public nsImapMailFolderProxyEvent
struct AbortHeaderParseStreamProxyEvent : public nsImapMailFolderSinkProxyEvent
{
AbortHeaderParseStreamProxyEvent(nsImapMailFolderProxy* aProxy);
AbortHeaderParseStreamProxyEvent(nsImapMailFolderSinkProxy* aProxy);
virtual ~AbortHeaderParseStreamProxyEvent();
NS_IMETHOD HandleEvent();
};
struct nsImapMessageProxyEvent : nsImapEvent
struct nsImapMessageSinkProxyEvent : nsImapEvent
{
nsImapMessageProxyEvent(nsImapMessageProxy* aImapMessageProxy);
virtual ~nsImapMessageProxyEvent();
nsImapMessageProxy* m_proxy;
nsImapMessageSinkProxyEvent(nsImapMessageSinkProxy* aImapMessageSinkProxy);
virtual ~nsImapMessageSinkProxyEvent();
nsImapMessageSinkProxy* m_proxy;
};
struct SetupMsgWriteStreamProxyEvent : nsImapMessageProxyEvent
struct SetupMsgWriteStreamProxyEvent : nsImapMessageSinkProxyEvent
{
SetupMsgWriteStreamProxyEvent(nsImapMessageProxy* aImapMessageProxy,
SetupMsgWriteStreamProxyEvent(nsImapMessageSinkProxy* aImapMessageSinkProxy,
StreamInfo* aStreamInfo);
virtual ~SetupMsgWriteStreamProxyEvent();
NS_IMETHOD HandleEvent();
StreamInfo m_streamInfo;
};
struct ParseAdoptedMsgLineProxyEvent : nsImapMessageProxyEvent
struct ParseAdoptedMsgLineProxyEvent : nsImapMessageSinkProxyEvent
{
ParseAdoptedMsgLineProxyEvent(nsImapMessageProxy* aImapMessageProxy,
ParseAdoptedMsgLineProxyEvent(nsImapMessageSinkProxy* aImapMessageSinkProxy,
msg_line_info* aMsgLineInfo);
virtual ~ParseAdoptedMsgLineProxyEvent();
NS_IMETHOD HandleEvent();
msg_line_info m_msgLineInfo;
};
struct NormalEndMsgWriteStreamProxyEvent : nsImapMessageProxyEvent
struct NormalEndMsgWriteStreamProxyEvent : nsImapMessageSinkProxyEvent
{
NormalEndMsgWriteStreamProxyEvent(nsImapMessageProxy* aImapMessageProxy);
NormalEndMsgWriteStreamProxyEvent(nsImapMessageSinkProxy* aImapMessageSinkProxy);
virtual ~NormalEndMsgWriteStreamProxyEvent();
NS_IMETHOD HandleEvent();
};
struct AbortMsgWriteStreamProxyEvent : nsImapMessageProxyEvent
struct AbortMsgWriteStreamProxyEvent : nsImapMessageSinkProxyEvent
{
AbortMsgWriteStreamProxyEvent(nsImapMessageProxy* aImapMessageProxy);
AbortMsgWriteStreamProxyEvent(nsImapMessageSinkProxy* aImapMessageSinkProxy);
virtual ~AbortMsgWriteStreamProxyEvent();
NS_IMETHOD HandleEvent();
};
struct OnlineCopyReportProxyEvent : nsImapMessageProxyEvent
struct OnlineCopyReportProxyEvent : nsImapMessageSinkProxyEvent
{
OnlineCopyReportProxyEvent(nsImapMessageProxy* aImapMessageProxy,
OnlineCopyReportProxyEvent(nsImapMessageSinkProxy* aImapMessageSinkProxy,
ImapOnlineCopyState* aCopyState);
virtual ~OnlineCopyReportProxyEvent();
NS_IMETHOD HandleEvent();
ImapOnlineCopyState m_copyState;
};
struct BeginMessageUploadProxyEvent : nsImapMessageProxyEvent
struct BeginMessageUploadProxyEvent : nsImapMessageSinkProxyEvent
{
BeginMessageUploadProxyEvent(nsImapMessageProxy* aImapMessageProxy);
BeginMessageUploadProxyEvent(nsImapMessageSinkProxy* aImapMessageSinkProxy);
virtual ~BeginMessageUploadProxyEvent();
NS_IMETHOD HandleEvent();
};
struct UploadMessageFileProxyEvent : nsImapMessageProxyEvent
struct UploadMessageFileProxyEvent : nsImapMessageSinkProxyEvent
{
UploadMessageFileProxyEvent(nsImapMessageProxy* aImapMessageProxy,
UploadMessageFileProxyEvent(nsImapMessageSinkProxy* aImapMessageSinkProxy,
UploadMessageInfo* aMsgInfo);
virtual ~UploadMessageFileProxyEvent();
NS_IMETHOD HandleEvent();
UploadMessageInfo m_msgInfo;
};
struct NotifyMessageFlagsProxyEvent : nsImapMessageProxyEvent
struct NotifyMessageFlagsProxyEvent : nsImapMessageSinkProxyEvent
{
NotifyMessageFlagsProxyEvent(nsImapMessageProxy* aImapMessageProxy,
NotifyMessageFlagsProxyEvent(nsImapMessageSinkProxy* aImapMessageSinkProxy,
FlagsKeyStruct* aKeyStruct);
virtual ~NotifyMessageFlagsProxyEvent();
NS_IMETHOD HandleEvent();
FlagsKeyStruct m_keyStruct;
};
struct NotifyMessageDeletedProxyEvent : nsImapMessageProxyEvent
struct NotifyMessageDeletedProxyEvent : nsImapMessageSinkProxyEvent
{
NotifyMessageDeletedProxyEvent(nsImapMessageProxy* aImapMessageProxy,
NotifyMessageDeletedProxyEvent(nsImapMessageSinkProxy* aImapMessageSinkProxy,
delete_message_struct* aStruct);
virtual ~NotifyMessageDeletedProxyEvent();
NS_IMETHOD HandleEvent();
delete_message_struct m_deleteMessageStruct;
};
struct GetMessageSizeFromDBProxyEvent : nsImapMessageProxyEvent
struct GetMessageSizeFromDBProxyEvent : nsImapMessageSinkProxyEvent
{
GetMessageSizeFromDBProxyEvent(nsImapMessageProxy* aImapMessageProxy,
GetMessageSizeFromDBProxyEvent(nsImapMessageSinkProxy* aImapMessageSinkProxy,
MessageSizeInfo* sizeInfo);
virtual ~GetMessageSizeFromDBProxyEvent();
NS_IMETHOD HandleEvent();
MessageSizeInfo *m_sizeInfo; // pass in handle we don't own it
};
struct nsImapExtensionProxyEvent : nsImapEvent
struct nsImapExtensionSinkProxyEvent : nsImapEvent
{
nsImapExtensionProxyEvent(nsImapExtensionProxy* aProxy);
virtual ~nsImapExtensionProxyEvent();
nsImapExtensionProxy* m_proxy;
nsImapExtensionSinkProxyEvent(nsImapExtensionSinkProxy* aProxy);
virtual ~nsImapExtensionSinkProxyEvent();
nsImapExtensionSinkProxy* m_proxy;
};
struct SetUserAuthenticatedProxyEvent : nsImapExtensionProxyEvent
struct SetUserAuthenticatedProxyEvent : nsImapExtensionSinkProxyEvent
{
SetUserAuthenticatedProxyEvent(nsImapExtensionProxy* aProxy,
SetUserAuthenticatedProxyEvent(nsImapExtensionSinkProxy* aProxy,
PRBool aBool);
virtual ~SetUserAuthenticatedProxyEvent();
NS_IMETHOD HandleEvent();
PRBool m_bool;
};
struct SetMailServerUrlsProxyEvent : nsImapExtensionProxyEvent
struct SetMailServerUrlsProxyEvent : nsImapExtensionSinkProxyEvent
{
SetMailServerUrlsProxyEvent(nsImapExtensionProxy* aProxy,
SetMailServerUrlsProxyEvent(nsImapExtensionSinkProxy* aProxy,
const char* hostName);
virtual ~SetMailServerUrlsProxyEvent();
NS_IMETHOD HandleEvent();
char* m_hostName;
};
struct SetMailAccountUrlProxyEvent : nsImapExtensionProxyEvent
struct SetMailAccountUrlProxyEvent : nsImapExtensionSinkProxyEvent
{
SetMailAccountUrlProxyEvent(nsImapExtensionProxy* aProxy,
SetMailAccountUrlProxyEvent(nsImapExtensionSinkProxy* aProxy,
const char* hostName);
virtual ~SetMailAccountUrlProxyEvent();
NS_IMETHOD HandleEvent();
char* m_hostName;
};
struct ClearFolderRightsProxyEvent : nsImapExtensionProxyEvent
struct ClearFolderRightsProxyEvent : nsImapExtensionSinkProxyEvent
{
ClearFolderRightsProxyEvent(nsImapExtensionProxy* aProxy,
ClearFolderRightsProxyEvent(nsImapExtensionSinkProxy* aProxy,
nsIMAPACLRightsInfo* aclRights);
virtual ~ClearFolderRightsProxyEvent();
NS_IMETHOD HandleEvent();
nsIMAPACLRightsInfo m_aclRightsInfo;
};
struct AddFolderRightsProxyEvent : nsImapExtensionProxyEvent
struct AddFolderRightsProxyEvent : nsImapExtensionSinkProxyEvent
{
AddFolderRightsProxyEvent(nsImapExtensionProxy* aProxy,
AddFolderRightsProxyEvent(nsImapExtensionSinkProxy* aProxy,
nsIMAPACLRightsInfo* aclRights);
virtual ~AddFolderRightsProxyEvent();
NS_IMETHOD HandleEvent();
nsIMAPACLRightsInfo m_aclRightsInfo;
};
struct RefreshFolderRightsProxyEvent : nsImapExtensionProxyEvent
struct RefreshFolderRightsProxyEvent : nsImapExtensionSinkProxyEvent
{
RefreshFolderRightsProxyEvent(nsImapExtensionProxy* aProxy,
RefreshFolderRightsProxyEvent(nsImapExtensionSinkProxy* aProxy,
nsIMAPACLRightsInfo* aclRights);
virtual ~RefreshFolderRightsProxyEvent();
NS_IMETHOD HandleEvent();
nsIMAPACLRightsInfo m_aclRightsInfo;
};
struct FolderNeedsACLInitializedProxyEvent : nsImapExtensionProxyEvent
struct FolderNeedsACLInitializedProxyEvent : nsImapExtensionSinkProxyEvent
{
FolderNeedsACLInitializedProxyEvent(nsImapExtensionProxy* aProxy,
FolderNeedsACLInitializedProxyEvent(nsImapExtensionSinkProxy* aProxy,
nsIMAPACLRightsInfo* aclRights);
virtual ~FolderNeedsACLInitializedProxyEvent();
NS_IMETHOD HandleEvent();
nsIMAPACLRightsInfo m_aclRightsInfo;
};
struct SetFolderAdminURLProxyEvent : nsImapExtensionProxyEvent
struct SetFolderAdminURLProxyEvent : nsImapExtensionSinkProxyEvent
{
SetFolderAdminURLProxyEvent(nsImapExtensionProxy* aProxy,
SetFolderAdminURLProxyEvent(nsImapExtensionSinkProxy* aProxy,
FolderQueryInfo* aInfo);
virtual ~SetFolderAdminURLProxyEvent();
NS_IMETHOD HandleEvent();
FolderQueryInfo m_folderQueryInfo;
};
struct nsImapMiscellaneousProxyEvent : public nsImapEvent
struct nsImapMiscellaneousSinkProxyEvent : public nsImapEvent
{
nsImapMiscellaneousProxyEvent(nsImapMiscellaneousProxy* aProxy);
virtual ~nsImapMiscellaneousProxyEvent();
nsImapMiscellaneousProxy* m_proxy;
nsImapMiscellaneousSinkProxyEvent(nsImapMiscellaneousSinkProxy* aProxy);
virtual ~nsImapMiscellaneousSinkProxyEvent();
nsImapMiscellaneousSinkProxy* m_proxy;
};
struct AddSearchResultProxyEvent : public nsImapMiscellaneousProxyEvent
struct AddSearchResultProxyEvent : public nsImapMiscellaneousSinkProxyEvent
{
AddSearchResultProxyEvent(nsImapMiscellaneousProxy* aProxy,
AddSearchResultProxyEvent(nsImapMiscellaneousSinkProxy* aProxy,
const char* searchHitLine);
virtual ~AddSearchResultProxyEvent();
NS_IMETHOD HandleEvent();
char* m_searchHitLine;
};
struct GetArbitraryHeadersProxyEvent : public nsImapMiscellaneousProxyEvent
struct GetArbitraryHeadersProxyEvent : public nsImapMiscellaneousSinkProxyEvent
{
GetArbitraryHeadersProxyEvent(nsImapMiscellaneousProxy* aProxy,
GetArbitraryHeadersProxyEvent(nsImapMiscellaneousSinkProxy* aProxy,
GenericInfo* aInfo);
virtual ~GetArbitraryHeadersProxyEvent();
NS_IMETHOD HandleEvent();
@ -593,164 +593,164 @@ struct GetArbitraryHeadersProxyEvent : public nsImapMiscellaneousProxyEvent
};
struct GetShouldDownloadArbitraryHeadersProxyEvent :
public nsImapMiscellaneousProxyEvent
public nsImapMiscellaneousSinkProxyEvent
{
GetShouldDownloadArbitraryHeadersProxyEvent(
nsImapMiscellaneousProxy* aProxy, GenericInfo* aInfo);
nsImapMiscellaneousSinkProxy* aProxy, GenericInfo* aInfo);
virtual ~GetShouldDownloadArbitraryHeadersProxyEvent();
NS_IMETHOD HandleEvent();
GenericInfo *m_info; // pass in handle we don't own it
};
struct GetShowAttachmentsInlineProxyEvent :
public nsImapMiscellaneousProxyEvent
public nsImapMiscellaneousSinkProxyEvent
{
GetShowAttachmentsInlineProxyEvent(
nsImapMiscellaneousProxy* aProxy, PRBool* aBool);
nsImapMiscellaneousSinkProxy* aProxy, PRBool* aBool);
virtual ~GetShowAttachmentsInlineProxyEvent();
NS_IMETHOD HandleEvent();
PRBool *m_bool; // pass in handle we don't own it
};
struct HeaderFetchCompletedProxyEvent : public nsImapMiscellaneousProxyEvent
struct HeaderFetchCompletedProxyEvent : public nsImapMiscellaneousSinkProxyEvent
{
HeaderFetchCompletedProxyEvent(nsImapMiscellaneousProxy* aProxy);
HeaderFetchCompletedProxyEvent(nsImapMiscellaneousSinkProxy* aProxy);
virtual ~HeaderFetchCompletedProxyEvent();
NS_IMETHOD HandleEvent();
};
struct UpdateSecurityStatusProxyEvent : public nsImapMiscellaneousProxyEvent
struct UpdateSecurityStatusProxyEvent : public nsImapMiscellaneousSinkProxyEvent
{
UpdateSecurityStatusProxyEvent(nsImapMiscellaneousProxy* aProxy);
UpdateSecurityStatusProxyEvent(nsImapMiscellaneousSinkProxy* aProxy);
virtual ~UpdateSecurityStatusProxyEvent();
NS_IMETHOD HandleEvent();
};
struct FinishImapConnectionProxyEvent : public nsImapMiscellaneousProxyEvent
struct FinishImapConnectionProxyEvent : public nsImapMiscellaneousSinkProxyEvent
{
FinishImapConnectionProxyEvent(nsImapMiscellaneousProxy* aProxy);
FinishImapConnectionProxyEvent(nsImapMiscellaneousSinkProxy* aProxy);
virtual ~FinishImapConnectionProxyEvent();
NS_IMETHOD HandleEvent();
};
struct SetImapHostPasswordProxyEvent : public nsImapMiscellaneousProxyEvent
struct SetImapHostPasswordProxyEvent : public nsImapMiscellaneousSinkProxyEvent
{
SetImapHostPasswordProxyEvent(nsImapMiscellaneousProxy* aProxy,
SetImapHostPasswordProxyEvent(nsImapMiscellaneousSinkProxy* aProxy,
GenericInfo* aInfo);
virtual ~SetImapHostPasswordProxyEvent();
NS_IMETHOD HandleEvent();
GenericInfo m_info;
};
struct GetPasswordForUserProxyEvent : public nsImapMiscellaneousProxyEvent
struct GetPasswordForUserProxyEvent : public nsImapMiscellaneousSinkProxyEvent
{
GetPasswordForUserProxyEvent(nsImapMiscellaneousProxy* aProxy,
GetPasswordForUserProxyEvent(nsImapMiscellaneousSinkProxy* aProxy,
const char* userName);
virtual ~GetPasswordForUserProxyEvent();
NS_IMETHOD HandleEvent();
char* m_userName;
};
struct SetBiffStateAndUpdateProxyEvent : public nsImapMiscellaneousProxyEvent
struct SetBiffStateAndUpdateProxyEvent : public nsImapMiscellaneousSinkProxyEvent
{
SetBiffStateAndUpdateProxyEvent(nsImapMiscellaneousProxy* aProxy,
SetBiffStateAndUpdateProxyEvent(nsImapMiscellaneousSinkProxy* aProxy,
nsMsgBiffState biffState);
virtual ~SetBiffStateAndUpdateProxyEvent();
NS_IMETHOD HandleEvent();
nsMsgBiffState m_biffState;
};
struct GetStoredUIDValidityProxyEvent : public nsImapMiscellaneousProxyEvent
struct GetStoredUIDValidityProxyEvent : public nsImapMiscellaneousSinkProxyEvent
{
GetStoredUIDValidityProxyEvent(nsImapMiscellaneousProxy* aProxy,
GetStoredUIDValidityProxyEvent(nsImapMiscellaneousSinkProxy* aProxy,
uid_validity_info* aInfo);
virtual ~GetStoredUIDValidityProxyEvent();
NS_IMETHOD HandleEvent();
uid_validity_info m_uidValidityInfo;
};
struct LiteSelectUIDValidityProxyEvent : public nsImapMiscellaneousProxyEvent
struct LiteSelectUIDValidityProxyEvent : public nsImapMiscellaneousSinkProxyEvent
{
LiteSelectUIDValidityProxyEvent(nsImapMiscellaneousProxy* aProxy,
LiteSelectUIDValidityProxyEvent(nsImapMiscellaneousSinkProxy* aProxy,
PRUint32 uidValidity);
virtual ~LiteSelectUIDValidityProxyEvent();
NS_IMETHOD HandleEvent();
PRUint32 m_uidValidity;
};
struct FEAlertProxyEvent : public nsImapMiscellaneousProxyEvent
struct FEAlertProxyEvent : public nsImapMiscellaneousSinkProxyEvent
{
FEAlertProxyEvent(nsImapMiscellaneousProxy* aProxy,
FEAlertProxyEvent(nsImapMiscellaneousSinkProxy* aProxy,
const char* aString);
virtual ~FEAlertProxyEvent();
NS_IMETHOD HandleEvent();
char* m_alertString;
};
struct FEAlertFromServerProxyEvent : public nsImapMiscellaneousProxyEvent
struct FEAlertFromServerProxyEvent : public nsImapMiscellaneousSinkProxyEvent
{
FEAlertFromServerProxyEvent(nsImapMiscellaneousProxy* aProxy,
FEAlertFromServerProxyEvent(nsImapMiscellaneousSinkProxy* aProxy,
const char* aString);
virtual ~FEAlertFromServerProxyEvent();
NS_IMETHOD HandleEvent();
char* m_alertString;
};
struct ProgressStatusProxyEvent : public nsImapMiscellaneousProxyEvent
struct ProgressStatusProxyEvent : public nsImapMiscellaneousSinkProxyEvent
{
ProgressStatusProxyEvent(nsImapMiscellaneousProxy* aProxy,
ProgressStatusProxyEvent(nsImapMiscellaneousSinkProxy* aProxy,
const char* statusMsg);
virtual ~ProgressStatusProxyEvent();
NS_IMETHOD HandleEvent();
char* m_statusMsg;
};
struct PercentProgressProxyEvent : public nsImapMiscellaneousProxyEvent
struct PercentProgressProxyEvent : public nsImapMiscellaneousSinkProxyEvent
{
PercentProgressProxyEvent(nsImapMiscellaneousProxy* aProxy,
PercentProgressProxyEvent(nsImapMiscellaneousSinkProxy* aProxy,
ProgressInfo* aInfo);
virtual ~PercentProgressProxyEvent();
NS_IMETHOD HandleEvent();
ProgressInfo m_progressInfo;
};
struct PastPasswordCheckProxyEvent : public nsImapMiscellaneousProxyEvent
struct PastPasswordCheckProxyEvent : public nsImapMiscellaneousSinkProxyEvent
{
PastPasswordCheckProxyEvent(nsImapMiscellaneousProxy* aProxy);
PastPasswordCheckProxyEvent(nsImapMiscellaneousSinkProxy* aProxy);
virtual ~PastPasswordCheckProxyEvent();
NS_IMETHOD HandleEvent();
};
struct CommitNamespacesProxyEvent : public nsImapMiscellaneousProxyEvent
struct CommitNamespacesProxyEvent : public nsImapMiscellaneousSinkProxyEvent
{
CommitNamespacesProxyEvent(nsImapMiscellaneousProxy* aProxy,
CommitNamespacesProxyEvent(nsImapMiscellaneousSinkProxy* aProxy,
const char* hostName);
virtual ~CommitNamespacesProxyEvent();
NS_IMETHOD HandleEvent();
char* m_hostName;
};
struct CommitCapabilityForHostProxyEvent : public nsImapMiscellaneousProxyEvent
struct CommitCapabilityForHostProxyEvent : public nsImapMiscellaneousSinkProxyEvent
{
CommitCapabilityForHostProxyEvent(nsImapMiscellaneousProxy* aProxy,
CommitCapabilityForHostProxyEvent(nsImapMiscellaneousSinkProxy* aProxy,
const char* hostName);
virtual ~CommitCapabilityForHostProxyEvent();
NS_IMETHOD HandleEvent();
char* m_hostName;
};
struct TunnelOutStreamProxyEvent : public nsImapMiscellaneousProxyEvent
struct TunnelOutStreamProxyEvent : public nsImapMiscellaneousSinkProxyEvent
{
TunnelOutStreamProxyEvent(nsImapMiscellaneousProxy* aProxy,
TunnelOutStreamProxyEvent(nsImapMiscellaneousSinkProxy* aProxy,
msg_line_info* aInfo);
virtual ~TunnelOutStreamProxyEvent();
NS_IMETHOD HandleEvent();
msg_line_info m_msgLineInfo;
};
struct ProcessTunnelProxyEvent : public nsImapMiscellaneousProxyEvent
struct ProcessTunnelProxyEvent : public nsImapMiscellaneousSinkProxyEvent
{
ProcessTunnelProxyEvent(nsImapMiscellaneousProxy* aProxy,
ProcessTunnelProxyEvent(nsImapMiscellaneousSinkProxy* aProxy,
TunnelInfo *aInfo);
virtual ~ProcessTunnelProxyEvent();
NS_IMETHOD HandleEvent();

Просмотреть файл

@ -68,7 +68,7 @@ NS_IMETHODIMP nsImapService::CreateImapConnection(PLEventQueue *aEventQueue, nsI
return rv;
}
NS_IMETHODIMP nsImapService::SelectFolder(PLEventQueue * aClientEventQueue, nsIImapMailFolder * aImapMailFolder,
NS_IMETHODIMP nsImapService::SelectFolder(PLEventQueue * aClientEventQueue, nsIImapMailFolderSink * aImapMailFolder,
nsIUrlListener * aUrlListener, nsIURL ** aURL)
{
@ -90,7 +90,7 @@ NS_IMETHODIMP nsImapService::SelectFolder(PLEventQueue * aClientEventQueue, nsII
if (NS_SUCCEEDED(rv) && imapUrl)
{
rv = imapUrl->SetImapAction(nsIImapUrl::nsImapSelectFolder);
rv = imapUrl->SetImapMailFolder(aImapMailFolder);
rv = imapUrl->SetImapMailFolderSink(aImapMailFolder);
// hmmm this is cludgy...we need to get the incoming server, get the host and port, and generate an imap url spec
// based on that information then tell the imap parser to parse that spec...*yuck*. I have to think of a better way
// for automatically generating the spec based on the incoming server data...

Просмотреть файл

@ -38,7 +38,7 @@ public:
NS_IMETHOD CreateImapConnection (PLEventQueue *aEventQueue, nsIImapProtocol ** aImapConnection);
NS_IMETHOD SelectFolder(PLEventQueue * aClientEventQueue, nsIImapMailFolder *, nsIUrlListener * aUrlListener, nsIURL ** aURL);
NS_IMETHOD SelectFolder(PLEventQueue * aClientEventQueue, nsIImapMailFolderSink *, nsIUrlListener * aUrlListener, nsIURL ** aURL);
////////////////////////////////////////////////////////////////////////////////////////
// End support of nsISmtpService interface
////////////////////////////////////////////////////////////////////////////////////////

Просмотреть файл

@ -62,10 +62,10 @@ nsImapUrl::nsImapUrl()
m_file = nsnull;
m_imapLog = nsnull;
m_imapMailFolder = nsnull;
m_imapMessage = nsnull;
m_imapExtension = nsnull;
m_imapMiscellaneous = nsnull;
m_imapMailFolderSink = nsnull;
m_imapMessageSink = nsnull;
m_imapExtensionSink = nsnull;
m_imapMiscellaneousSink = nsnull;
m_listOfMessageIds = nsnull;
m_sourceCanonicalFolderPathSubString = nsnull;
m_destinationCanonicalFolderPathSubString = nsnull;
@ -85,10 +85,10 @@ nsImapUrl::nsImapUrl()
nsImapUrl::~nsImapUrl()
{
NS_IF_RELEASE(m_imapLog);
NS_IF_RELEASE(m_imapMailFolder);
NS_IF_RELEASE(m_imapMessage);
NS_IF_RELEASE(m_imapExtension);
NS_IF_RELEASE(m_imapMiscellaneous);
NS_IF_RELEASE(m_imapMailFolderSink);
NS_IF_RELEASE(m_imapMessageSink);
NS_IF_RELEASE(m_imapExtensionSink);
NS_IF_RELEASE(m_imapMiscellaneousSink);
NS_IF_RELEASE(m_server);
NS_IF_RELEASE(m_urlListeners);
@ -240,96 +240,96 @@ NS_IMETHODIMP nsImapUrl::SetImapLog(nsIImapLog * aImapLog)
return NS_OK;
}
NS_IMETHODIMP nsImapUrl::GetImapMailFolder(nsIImapMailFolder **
aImapMailFolder)
NS_IMETHODIMP nsImapUrl::GetImapMailFolderSink(nsIImapMailFolderSink **
aImapMailFolderSink)
{
if (aImapMailFolder)
if (aImapMailFolderSink)
{
*aImapMailFolder = m_imapMailFolder;
NS_IF_ADDREF(m_imapMailFolder);
*aImapMailFolderSink = m_imapMailFolderSink;
NS_IF_ADDREF(m_imapMailFolderSink);
}
return NS_OK;
}
NS_IMETHODIMP nsImapUrl::SetImapMailFolder(nsIImapMailFolder * aImapMailFolder)
NS_IMETHODIMP nsImapUrl::SetImapMailFolderSink(nsIImapMailFolderSink * aImapMailFolderSink)
{
if (aImapMailFolder)
if (aImapMailFolderSink)
{
NS_IF_RELEASE(m_imapMailFolder);
m_imapMailFolder = aImapMailFolder;
NS_ADDREF(m_imapMailFolder);
NS_IF_RELEASE(m_imapMailFolderSink);
m_imapMailFolderSink = aImapMailFolderSink;
NS_ADDREF(m_imapMailFolderSink);
}
return NS_OK;
}
NS_IMETHODIMP nsImapUrl::GetImapMessage(nsIImapMessage ** aImapMessage)
NS_IMETHODIMP nsImapUrl::GetImapMessageSink(nsIImapMessageSink ** aImapMessageSink)
{
if (aImapMessage)
if (aImapMessageSink)
{
*aImapMessage = m_imapMessage;
NS_IF_ADDREF(m_imapMessage);
*aImapMessageSink = m_imapMessageSink;
NS_IF_ADDREF(m_imapMessageSink);
}
return NS_OK;
}
NS_IMETHODIMP nsImapUrl::SetImapMessage(nsIImapMessage * aImapMessage)
NS_IMETHODIMP nsImapUrl::SetImapMessageSink(nsIImapMessageSink * aImapMessageSink)
{
if (aImapMessage)
if (aImapMessageSink)
{
NS_IF_RELEASE(m_imapMessage);
m_imapMessage = aImapMessage;
NS_ADDREF(m_imapMessage);
NS_IF_RELEASE(m_imapMessageSink);
m_imapMessageSink = aImapMessageSink;
NS_ADDREF(m_imapMessageSink);
}
return NS_OK;
}
NS_IMETHODIMP nsImapUrl::GetImapExtension(nsIImapExtension ** aImapExtension)
NS_IMETHODIMP nsImapUrl::GetImapExtensionSink(nsIImapExtensionSink ** aImapExtensionSink)
{
if (aImapExtension)
if (aImapExtensionSink)
{
*aImapExtension = m_imapExtension;
NS_IF_ADDREF(m_imapExtension);
*aImapExtensionSink = m_imapExtensionSink;
NS_IF_ADDREF(m_imapExtensionSink);
}
return NS_OK;
}
NS_IMETHODIMP nsImapUrl::SetImapExtension(nsIImapExtension * aImapExtension)
NS_IMETHODIMP nsImapUrl::SetImapExtensionSink(nsIImapExtensionSink * aImapExtensionSink)
{
if (aImapExtension)
if (aImapExtensionSink)
{
NS_IF_RELEASE(m_imapExtension);
m_imapExtension = aImapExtension;
NS_ADDREF(m_imapExtension);
NS_IF_RELEASE(m_imapExtensionSink);
m_imapExtensionSink = aImapExtensionSink;
NS_ADDREF(m_imapExtensionSink);
}
return NS_OK;
}
NS_IMETHODIMP nsImapUrl::GetImapMiscellaneous(nsIImapMiscellaneous **
aImapMiscellaneous)
NS_IMETHODIMP nsImapUrl::GetImapMiscellaneousSink(nsIImapMiscellaneousSink **
aImapMiscellaneousSink)
{
if (aImapMiscellaneous)
if (aImapMiscellaneousSink)
{
*aImapMiscellaneous = m_imapMiscellaneous;
NS_IF_ADDREF(m_imapMiscellaneous);
*aImapMiscellaneousSink = m_imapMiscellaneousSink;
NS_IF_ADDREF(m_imapMiscellaneousSink);
}
return NS_OK;
}
NS_IMETHODIMP nsImapUrl::SetImapMiscellaneous(nsIImapMiscellaneous *
aImapMiscellaneous)
NS_IMETHODIMP nsImapUrl::SetImapMiscellaneousSink(nsIImapMiscellaneousSink *
aImapMiscellaneousSink)
{
if (aImapMiscellaneous)
if (aImapMiscellaneousSink)
{
NS_IF_RELEASE(m_imapMiscellaneous);
m_imapMiscellaneous = aImapMiscellaneous;
NS_ADDREF(m_imapMiscellaneous);
NS_IF_RELEASE(m_imapMiscellaneousSink);
m_imapMiscellaneousSink = aImapMiscellaneousSink;
NS_ADDREF(m_imapMiscellaneousSink);
}
return NS_OK;

Просмотреть файл

@ -50,17 +50,17 @@ public:
NS_IMETHOD GetImapLog(nsIImapLog ** aImapLog);
NS_IMETHOD SetImapLog(nsIImapLog * aImapLog);
NS_IMETHOD GetImapMailFolder(nsIImapMailFolder** aImapMailFolder);
NS_IMETHOD SetImapMailFolder(nsIImapMailFolder* aImapMailFolder);
NS_IMETHOD GetImapMailFolderSink(nsIImapMailFolderSink** aImapMailFolderSink);
NS_IMETHOD SetImapMailFolderSink(nsIImapMailFolderSink* aImapMailFolderSink);
NS_IMETHOD GetImapMessage(nsIImapMessage** aImapMessage);
NS_IMETHOD SetImapMessage(nsIImapMessage* aImapMessage);
NS_IMETHOD GetImapMessageSink(nsIImapMessageSink** aImapMessageSink);
NS_IMETHOD SetImapMessageSink(nsIImapMessageSink* aImapMessageSink);
NS_IMETHOD GetImapExtension(nsIImapExtension** aImapExtension);
NS_IMETHOD SetImapExtension(nsIImapExtension* aImapExtension);
NS_IMETHOD GetImapExtensionSink(nsIImapExtensionSink** aImapExtensionSink);
NS_IMETHOD SetImapExtensionSink(nsIImapExtensionSink* aImapExtensionSink);
NS_IMETHOD GetImapMiscellaneous(nsIImapMiscellaneous** aImapMiscellaneous);
NS_IMETHOD SetImapMiscellaneous(nsIImapMiscellaneous* aImapMiscellaneous);
NS_IMETHOD GetImapMiscellaneousSink(nsIImapMiscellaneousSink** aImapMiscellaneousSink);
NS_IMETHOD SetImapMiscellaneousSink(nsIImapMiscellaneousSink* aImapMiscellaneousSink);
NS_IMPL_CLASS_GETSET(ImapAction, nsImapAction, m_imapAction);
NS_IMETHOD GetRequiredImapState(nsImapState * aImapUrlState);
@ -177,10 +177,10 @@ protected:
imapMessageFlagsType m_flags;
nsImapAction m_imapAction;
nsIImapLog * m_imapLog;
nsIImapMailFolder* m_imapMailFolder;
nsIImapMessage* m_imapMessage;
nsIImapExtension* m_imapExtension;
nsIImapMiscellaneous* m_imapMiscellaneous;
nsIImapMailFolderSink* m_imapMailFolderSink;
nsIImapMessageSink* m_imapMessageSink;
nsIImapExtensionSink* m_imapExtensionSink;
nsIImapMiscellaneousSink* m_imapMiscellaneousSink;
nsIMsgIncomingServer *m_server;
};

Просмотреть файл

@ -44,10 +44,10 @@
#include "nsIImapService.h"
#include "nsIMsgMailSession.h"
#include "nsIImapLog.h"
#include "nsIImapMailfolder.h"
#include "nsIImapMessage.h"
#include "nsIImapExtension.h"
#include "nsIImapMiscellaneous.h"
#include "nsIImapMailFolderSink.h"
#include "nsIImapMessageSink.h"
#include "nsIImapExtensionSink.h"
#include "nsIImapMiscellaneousSink.h"
#include "nsIEventQueueService.h"
#include "nsXPComCIID.h"
@ -98,10 +98,10 @@ static NS_DEFINE_CID(kCImapDB, NS_IMAPDB_CID);
class nsIMAP4TestDriver : public nsIUrlListener,
public nsIImapLog,
public nsIImapMailFolder,
public nsIImapMessage,
public nsIImapExtension,
public nsIImapMiscellaneous
public nsIImapMailFolderSink,
public nsIImapMessageSink,
public nsIImapExtensionSink,
public nsIImapMiscellaneousSink
{
public:
NS_DECL_ISUPPORTS
@ -113,7 +113,7 @@ public:
// nsIImapLog support
NS_IMETHOD HandleImapLogData (const char * aLogData);
// nsIImapMailFolder support
// nsIImapMailFolderSink support
NS_IMETHOD PossibleImapMailbox(nsIImapProtocol* aProtocol,
mailbox_spec* aSpec);
NS_IMETHOD MailboxDiscoveryDone(nsIImapProtocol* aProtocol);
@ -146,7 +146,7 @@ public:
NS_IMETHOD AbortHeaderParseStream(nsIImapProtocol* aProtocol);
// nsIImapMessage support
// nsIImapMessageSink support
NS_IMETHOD SetupMsgWriteStream(nsIImapProtocol* aProtocol,
StreamInfo* aStreamInfo);
@ -173,7 +173,7 @@ public:
NS_IMETHOD GetMessageSizeFromDB(nsIImapProtocol* aProtocol,
MessageSizeInfo* sizeInfo);
// nsIImapExtension support
// nsIImapExtensionSink support
NS_IMETHOD SetUserAuthenticated(nsIImapProtocol* aProtocol,
PRBool aBool);
@ -192,7 +192,7 @@ public:
NS_IMETHOD SetFolderAdminURL(nsIImapProtocol* aProtocol,
FolderQueryInfo* aInfo);
// nsIImapMiscellaneous support
// nsIImapMiscellaneousSink support
NS_IMETHOD AddSearchResult(nsIImapProtocol* aProtocol,
const char* searchHitLine);
@ -321,21 +321,21 @@ nsIMAP4TestDriver::QueryInterface(const nsIID& aIID, void** aInstancePtr)
{
*aInstancePtr = (void*)(nsIImapLog*)this;
}
else if (aIID.Equals(nsIImapMailFolder::GetIID()))
else if (aIID.Equals(nsIImapMailFolderSink::GetIID()))
{
*aInstancePtr = (void*)(nsIImapMailFolder*)this;
*aInstancePtr = (void*)(nsIImapMailFolderSink*)this;
}
else if (aIID.Equals(nsIImapMessage::GetIID()))
else if (aIID.Equals(nsIImapMessageSink::GetIID()))
{
*aInstancePtr = (void*)(nsIImapMessage*)this;
*aInstancePtr = (void*)(nsIImapMessageSink*)this;
}
else if (aIID.Equals(nsIImapExtension::GetIID()))
else if (aIID.Equals(nsIImapExtensionSink::GetIID()))
{
*aInstancePtr = (void*)(nsIImapExtension*)this;
*aInstancePtr = (void*)(nsIImapExtensionSink*)this;
}
else if (aIID.Equals(nsIImapMiscellaneous::GetIID()))
else if (aIID.Equals(nsIImapMiscellaneousSink::GetIID()))
{
*aInstancePtr = (void*)(nsIImapMiscellaneous*)this;
*aInstancePtr = (void*)(nsIImapMiscellaneousSink*)this;
}
else if (aIID.Equals(kISupportsIID))
{
@ -348,7 +348,7 @@ nsIMAP4TestDriver::QueryInterface(const nsIID& aIID, void** aInstancePtr)
return NS_OK;
}
// nsIImapMailFolder support
// nsIImapMailFolderSink support
NS_IMETHODIMP
nsIMAP4TestDriver::PossibleImapMailbox(nsIImapProtocol* aProtocol,
mailbox_spec* aSpec)
@ -735,7 +735,7 @@ NS_IMETHODIMP nsIMAP4TestDriver::AbortHeaderParseStream(nsIImapProtocol* aProtoc
// nsIImapMessage support
// nsIImapMessageSink support
NS_IMETHODIMP
nsIMAP4TestDriver::SetupMsgWriteStream(nsIImapProtocol* aProtocol,
StreamInfo* aStreamInfo)
@ -822,7 +822,7 @@ nsIMAP4TestDriver::GetMessageSizeFromDB(nsIImapProtocol* aProtocol,
}
// nsIImapExtension support
// nsIImapExtensionSink support
NS_IMETHODIMP
nsIMAP4TestDriver::SetUserAuthenticated(nsIImapProtocol* aProtocol,
@ -889,7 +889,7 @@ nsIMAP4TestDriver::SetFolderAdminURL(nsIImapProtocol* aProtocol,
}
// nsIImapMiscellaneous support
// nsIImapMiscellaneousSink support
NS_IMETHODIMP
nsIMAP4TestDriver::AddSearchResult(nsIImapProtocol* aProtocol,
@ -1300,10 +1300,10 @@ nsresult nsIMAP4TestDriver::OnRunIMAPCommand()
if (NS_SUCCEEDED(rv) && m_url)
{
m_url->SetImapLog(this);
m_url->SetImapMailFolder(this);
m_url->SetImapMessage(this);
m_url->SetImapExtension(this);
m_url->SetImapMiscellaneous(this);
m_url->SetImapMailFolderSink(this);
m_url->SetImapMessageSink(this);
m_url->SetImapExtensionSink(this);
m_url->SetImapMiscellaneousSink(this);
rv = m_url->SetSpec(m_urlString); // reset spec
m_url->RegisterListener(this);