Add code to support copying a message to the url.

This commit is contained in:
mscott%netscape.com 1999-03-29 06:09:07 +00:00
Родитель c4934c6f62
Коммит c4be9206e5
2 изменённых файлов: 33 добавлений и 1 удалений

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

@ -46,7 +46,8 @@ nsMailboxUrl::nsMailboxUrl(nsISupports* aContainer, nsIURLGroup* aGroup)
NS_INIT_REFCNT();
// nsIMailboxUrl specific code...
m_mailboxParser = nsnull;
m_mailboxParser = nsnull;
m_mailboxCopyHandler = nsnull;
m_errorMessage = nsnull;
// nsINetLibUrl specific state
@ -76,6 +77,8 @@ nsMailboxUrl::nsMailboxUrl(nsISupports* aContainer, nsIURLGroup* aGroup)
nsMailboxUrl::~nsMailboxUrl()
{
NS_IF_RELEASE(m_mailboxParser);
NS_IF_RELEASE(m_mailboxCopyHandler);
NS_IF_RELEASE(m_urlListeners);
NS_IF_RELEASE(m_container);
@ -173,6 +176,31 @@ nsresult nsMailboxUrl::GetMailboxParser(nsIStreamListener ** aConsumer)
return NS_OK;
}
nsresult nsMailboxUrl::SetMailboxCopyHandler(nsIStreamListener * aMailboxCopyHandler)
{
NS_LOCK_INSTANCE();
if (aMailboxCopyHandler)
{
NS_IF_RELEASE(m_mailboxCopyHandler);
NS_ADDREF(aMailboxCopyHandler);
m_mailboxCopyHandler = aMailboxCopyHandler;
}
NS_UNLOCK_INSTANCE();
return NS_OK;
}
nsresult nsMailboxUrl::GetMailboxCopyHandler(nsIStreamListener ** aMailboxCopyHandler)
{
NS_LOCK_INSTANCE();
if (aMailboxCopyHandler)
{
NS_IF_ADDREF(m_mailboxCopyHandler);
*aMailboxCopyHandler = m_mailboxCopyHandler;
}
NS_UNLOCK_INSTANCE();
return NS_OK;
}
nsresult nsMailboxUrl::GetFilePath(const nsFileSpec ** aFilePath)
{
if (aFilePath)

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

@ -66,6 +66,9 @@ public:
// from nsIMailboxUrl:
NS_IMETHOD SetMailboxParser(nsIStreamListener * aConsumer);
NS_IMETHOD GetMailboxParser(nsIStreamListener ** aConsumer);
NS_IMETHOD SetMailboxCopyHandler(nsIStreamListener * aConsumer);
NS_IMETHOD GetMailboxCopyHandler(nsIStreamListener ** aConsumer);
NS_IMETHOD SetFilePath(const nsFileSpec& aFilePath);
NS_IMETHOD GetFilePath(const nsFileSpec ** aFilePath);
NS_IMETHOD GetMessageKey(nsMsgKey& aMessageKey);
@ -96,6 +99,7 @@ protected:
// mailboxurl specific state
nsIStreamListener *m_mailboxParser;
nsIStreamListener *m_mailboxCopyHandler;
// manager of all of current url listeners....
nsIUrlListenerManager * m_urlListeners;