Bug #10933 displaying a message no longer involves spooling to a temp file! *yeah*

This commit is contained in:
mscott%netscape.com 1999-09-12 05:08:50 +00:00
Родитель bb71e5ea50
Коммит 40eb2a0674
2 изменённых файлов: 9 добавлений и 25 удалений

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

@ -122,6 +122,7 @@ nsMailboxUrl::nsMailboxUrl()
m_messageKey = 0;
m_messageSize = 0;
m_messageFileSpec = nsnull;
m_addDummyEnvelope = PR_FALSE;
}
nsMailboxUrl::~nsMailboxUrl()
@ -141,15 +142,15 @@ nsresult nsMailboxUrl::QueryInterface(const nsIID &aIID, void** aInstancePtr)
return NS_ERROR_NULL_POINTER;
}
if (aIID.Equals(nsIMailboxUrl::GetIID()) || aIID.Equals(kISupportsIID))
if (aIID.Equals(NS_GET_IID(nsIMailboxUrl)) || aIID.Equals(kISupportsIID))
{
*aInstancePtr = (void*) ((nsIMailboxUrl*)this);
NS_ADDREF_THIS();
return NS_OK;
}
if (aIID.Equals(nsIMsgUriUrl::GetIID()))
if (aIID.Equals(NS_GET_IID(nsIMsgMessageUrl)))
{
*aInstancePtr = (void *) ((nsIMsgUriUrl *) this);
*aInstancePtr = (void *) ((nsIMsgMessageUrl *) this);
NS_ADDREF_THIS();
return NS_OK;
}
@ -294,6 +295,8 @@ NS_IMETHODIMP nsMailboxUrl::GetMessageHeader(nsIMsgDBHdr ** aMsgHdr)
return rv;
}
NS_IMPL_GETSET(nsMailboxUrl, AddDummyEnvelope, PRBool, m_addDummyEnvelope);
NS_IMETHODIMP nsMailboxUrl::SetMessageFile(nsIFileSpec * aFileSpec)
{
m_messageFileSpec = dont_QueryInterface(aFileSpec);
@ -310,22 +313,6 @@ NS_IMETHODIMP nsMailboxUrl::GetMessageFile(nsIFileSpec ** aFileSpec)
return NS_OK;
}
#if 0 // mscott - i can remove this function once I move the funcionality elsewhere...
NS_IMETHODIMP nsMailboxUrl::SetURLInfo(URL_Struct *URL_s)
{
nsresult rv = nsMsgMailNewsUrl::SetURLInfo(URL_s);
if (m_mailboxAction == nsIMailboxUrl::ActionDisplayMessage || m_mailboxAction == nsIMailboxUrl::ActionCopyMessage
|| m_mailboxAction == nsIMailboxUrl::ActionMoveMessage || m_mailboxAction == nsIMailboxUrl::ActionSaveMessageToDisk
|| m_mailboxAction == nsIMailboxUrl::ActionAppendMessageToDisk)
{
// set the byte field range for the url struct...
char * byteRange = PR_smprintf("bytes=%d-%d", m_messageKey, m_messageKey+m_messageSize - 1);
m_URL_s->range_header = byteRange;
}
return rv;
}
#endif
////////////////////////////////////////////////////////////////////////////////////
// End nsIMailboxUrl specific support
////////////////////////////////////////////////////////////////////////////////////

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

@ -26,7 +26,7 @@
#include "nsCOMPtr.h"
#include "nsXPIDLString.h"
class nsMailboxUrl : public nsIMailboxUrl, public nsMsgMailNewsUrl, public nsIMsgUriUrl
class nsMailboxUrl : public nsIMailboxUrl, public nsMsgMailNewsUrl, public nsIMsgMessageUrl
{
public:
// nsIURI over-ride...
@ -45,14 +45,10 @@ public:
NS_IMETHOD SetMessageSize(PRUint32 aMessageSize);
NS_IMPL_CLASS_GETSET(MailboxAction, nsMailboxAction, m_mailboxAction);
// used by save message to disk....
NS_IMETHOD SetMessageFile(nsIFileSpec * aFileSpec);
NS_IMETHOD GetMessageFile(nsIFileSpec ** aFileSpec);
// nsMailboxUrl
nsMailboxUrl();
virtual ~nsMailboxUrl();
NS_DECL_NSIMSGURIURL
NS_DECL_NSIMSGMESSAGEURL
NS_DECL_ISUPPORTS_INHERITED
@ -74,6 +70,7 @@ protected:
// used by save message to disk
nsCOMPtr<nsIFileSpec> m_messageFileSpec;
PRBool m_addDummyEnvelope;
nsresult ParseSearchPart();
};