mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-02 10:00:54 +00:00
mail.root.nntp wasn't getting set when I called SetDefaultLocalPath() on a nntp incoming server because QueryInterface for nsNttpService was not fixed to support nsIMsgProtocolInfo. use the cool macro and the problem goes away. woo-hoo!
This commit is contained in:
parent
a41c2f2e9f
commit
6e6ad7cc7c
@ -68,42 +68,11 @@ nsNntpService::~nsNntpService()
|
||||
NS_IMPL_THREADSAFE_ADDREF(nsNntpService);
|
||||
NS_IMPL_THREADSAFE_RELEASE(nsNntpService);
|
||||
|
||||
nsresult nsNntpService::QueryInterface(const nsIID &aIID, void** aInstancePtr)
|
||||
{
|
||||
if (nsnull == aInstancePtr)
|
||||
return NS_ERROR_NULL_POINTER;
|
||||
|
||||
if (aIID.Equals(NS_GET_IID(nsINntpService))
|
||||
|| aIID.Equals(NS_GET_IID(nsISupports)) )
|
||||
{
|
||||
*aInstancePtr = (void*) ((nsINntpService*)this);
|
||||
NS_ADDREF_THIS();
|
||||
return NS_OK;
|
||||
}
|
||||
if (aIID.Equals(NS_GET_IID(nsIMsgMessageService)))
|
||||
{
|
||||
*aInstancePtr = (void*) ((nsIMsgMessageService*)this);
|
||||
NS_ADDREF_THIS();
|
||||
return NS_OK;
|
||||
}
|
||||
if (aIID.Equals(NS_GET_IID(nsIProtocolHandler)))
|
||||
{
|
||||
*aInstancePtr = (void *) ((nsIProtocolHandler*) this);
|
||||
NS_ADDREF_THIS();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
#if defined(NS_DEBUG)
|
||||
/*
|
||||
* Check for the debug-only interface indicating thread-safety
|
||||
*/
|
||||
static NS_DEFINE_IID(kIsThreadsafeIID, NS_ISTHREADSAFE_IID);
|
||||
if (aIID.Equals(kIsThreadsafeIID))
|
||||
return NS_OK;
|
||||
#endif
|
||||
|
||||
return NS_NOINTERFACE;
|
||||
}
|
||||
NS_IMPL_QUERY_INTERFACE4(nsNntpService,
|
||||
nsINntpService,
|
||||
nsIMsgMessageService,
|
||||
nsIProtocolHandler,
|
||||
nsIMsgProtocolInfo)
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////
|
||||
// nsIMsgMessageService support
|
||||
|
Loading…
Reference in New Issue
Block a user