mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 15:52:07 +00:00
Removed the nsICapabilities interface in favor of nsIInterfaceRequestor.
This commit is contained in:
parent
f249767486
commit
59ef7fadbf
@ -126,7 +126,7 @@ nsChromeProtocolHandler::NewURI(const char *aSpec, nsIURI *aBaseURI,
|
||||
NS_IMETHODIMP
|
||||
nsChromeProtocolHandler::NewChannel(const char* verb, nsIURI* uri,
|
||||
nsILoadGroup* aLoadGroup,
|
||||
nsICapabilities* notificationCallbacks,
|
||||
nsIInterfaceRequestor* notificationCallbacks,
|
||||
nsLoadFlags loadAttributes,
|
||||
nsIURI* originalURI,
|
||||
nsIChannel* *result)
|
||||
|
@ -2003,7 +2003,7 @@ nsresult nsDocShell::GetPrimaryFrameFor(nsIContent* content, nsIFrame** frame)
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsDocShell::QueryCapability(const nsIID& anIID, void** aSink)
|
||||
NS_IMETHODIMP nsDocShell::GetInterface(const nsIID& anIID, void** aSink)
|
||||
{
|
||||
return QueryInterface(anIID, aSink);
|
||||
}
|
||||
|
@ -81,7 +81,7 @@ public:
|
||||
NS_DECL_NSISCROLLABLE
|
||||
NS_DECL_NSITEXTSCROLL
|
||||
NS_DECL_NSIHTMLDOCSHELL
|
||||
NS_DECL_NSICAPABILITIES
|
||||
NS_DECL_NSIINTERFACEREQUESTOR
|
||||
|
||||
// XXX: move to a macro
|
||||
// nsIContentViewerContainer
|
||||
|
@ -170,7 +170,6 @@ public:
|
||||
|
||||
// nsISupports
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NSICAPABILITIES
|
||||
|
||||
NS_DECL_NSIURICONTENTLISTENER
|
||||
|
||||
@ -802,15 +801,8 @@ NS_IMPL_QUERY_HEAD(nsWebShell)
|
||||
NS_IMPL_QUERY_BODY(nsIClipboardCommands)
|
||||
NS_IMPL_QUERY_BODY(nsIInterfaceRequestor)
|
||||
NS_IMPL_QUERY_BODY(nsIURIContentListener)
|
||||
NS_IMPL_QUERY_BODY(nsICapabilities)
|
||||
NS_IMPL_QUERY_TAIL(nsIWebShell)
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsWebShell::QueryCapability(const nsIID &aIID, void** aInstancePtr)
|
||||
{
|
||||
return GetInterface(aIID, aInstancePtr);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsWebShell::GetInterface(const nsIID &aIID, void** aInstancePtr)
|
||||
{
|
||||
|
@ -40,7 +40,7 @@
|
||||
#include "nsProxyObjectManager.h"
|
||||
#include "nsIWebShell.h"
|
||||
#include "nsDOMError.h"
|
||||
#include "nsICapabilities.h"
|
||||
#include "nsIInterfaceRequestor.h"
|
||||
#include "nsIEvaluateStringProxy.h"
|
||||
|
||||
static NS_DEFINE_CID(kIOServiceCID, NS_IOSERVICE_CID);
|
||||
@ -193,7 +193,7 @@ NS_IMETHODIMP
|
||||
nsJSProtocolHandler::NewChannel(const char* verb,
|
||||
nsIURI* uri,
|
||||
nsILoadGroup* aLoadGroup,
|
||||
nsICapabilities* notificationCallbacks,
|
||||
nsIInterfaceRequestor* notificationCallbacks,
|
||||
nsLoadFlags loadAttributes,
|
||||
nsIURI* originalURI,
|
||||
nsIChannel* *result)
|
||||
@ -204,8 +204,8 @@ nsJSProtocolHandler::NewChannel(const char* verb,
|
||||
|
||||
// The event sink must be a script context owner or we fail.
|
||||
nsCOMPtr<nsIScriptContextOwner> owner;
|
||||
rv = notificationCallbacks->QueryCapability(NS_GET_IID(nsIScriptContextOwner),
|
||||
getter_AddRefs(owner));
|
||||
rv = notificationCallbacks->GetInterface(NS_GET_IID(nsIScriptContextOwner),
|
||||
getter_AddRefs(owner));
|
||||
if (NS_FAILED(rv))
|
||||
return rv;
|
||||
if (!owner)
|
||||
|
@ -358,13 +358,13 @@ NS_IMETHODIMP nsMsgProtocol::GetLoadGroup(nsILoadGroup * *aLoadGroup)
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsMsgProtocol::GetNotificationCallbacks(nsICapabilities* *aNotificationCallbacks)
|
||||
nsMsgProtocol::GetNotificationCallbacks(nsIInterfaceRequestor* *aNotificationCallbacks)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsMsgProtocol::SetNotificationCallbacks(nsICapabilities* aNotificationCallbacks)
|
||||
nsMsgProtocol::SetNotificationCallbacks(nsIInterfaceRequestor* aNotificationCallbacks)
|
||||
{
|
||||
return NS_OK; // don't fail when trying to set this
|
||||
}
|
||||
|
@ -241,7 +241,7 @@ NS_IMETHODIMP nsSmtpService::NewURI(const char *aSpec, nsIURI *aBaseURI, nsIURI
|
||||
NS_IMETHODIMP nsSmtpService::NewChannel(const char *verb,
|
||||
nsIURI *aURI,
|
||||
nsILoadGroup* aLoadGroup,
|
||||
nsICapabilities* notificationCallbacks,
|
||||
nsIInterfaceRequestor* notificationCallbacks,
|
||||
nsLoadFlags loadAttributes,
|
||||
nsIURI* originalURI,
|
||||
nsIChannel **_retval)
|
||||
|
@ -6429,13 +6429,13 @@ NS_IMETHODIMP nsImapMockChannel::SetCancelled(PRBool cancelled)
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsImapMockChannel::GetNotificationCallbacks(nsICapabilities* *aNotificationCallbacks)
|
||||
nsImapMockChannel::GetNotificationCallbacks(nsIInterfaceRequestor* *aNotificationCallbacks)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsImapMockChannel::SetNotificationCallbacks(nsICapabilities* aNotificationCallbacks)
|
||||
nsImapMockChannel::SetNotificationCallbacks(nsIInterfaceRequestor* aNotificationCallbacks)
|
||||
{
|
||||
return NS_OK; // don't fail when trying to set this
|
||||
}
|
||||
|
@ -2199,7 +2199,7 @@ NS_IMETHODIMP nsImapService::NewURI(const char *aSpec, nsIURI *aBaseURI, nsIURI
|
||||
NS_IMETHODIMP nsImapService::NewChannel(const char *verb,
|
||||
nsIURI *aURI,
|
||||
nsILoadGroup* aLoadGroup,
|
||||
nsICapabilities* notificationCallbacks,
|
||||
nsIInterfaceRequestor* notificationCallbacks,
|
||||
nsLoadFlags loadAttributes,
|
||||
nsIURI* originalURI,
|
||||
nsIChannel **_retval)
|
||||
|
@ -299,7 +299,7 @@ NS_IMETHODIMP nsMailboxService::NewURI(const char *aSpec, nsIURI *aBaseURI, nsIU
|
||||
NS_IMETHODIMP nsMailboxService::NewChannel(const char *verb,
|
||||
nsIURI *aURI,
|
||||
nsILoadGroup* aLoadGroup,
|
||||
nsICapabilities* notificationCallbacks,
|
||||
nsIInterfaceRequestor* notificationCallbacks,
|
||||
nsLoadFlags loadAttributes,
|
||||
nsIURI* originalURI,
|
||||
nsIChannel **_retval)
|
||||
|
@ -262,7 +262,7 @@ NS_IMETHODIMP nsPop3Service::NewURI(const char *aSpec, nsIURI *aBaseURI, nsIURI
|
||||
NS_IMETHODIMP nsPop3Service::NewChannel(const char *verb,
|
||||
nsIURI *aURI,
|
||||
nsILoadGroup* aLoadGroup,
|
||||
nsICapabilities* notificationCallbacks,
|
||||
nsIInterfaceRequestor* notificationCallbacks,
|
||||
nsLoadFlags loadAttributes,
|
||||
nsIURI* originalURI,
|
||||
nsIChannel **_retval)
|
||||
|
@ -942,7 +942,7 @@ NS_IMETHODIMP nsNntpService::NewURI(const char *aSpec, nsIURI *aBaseURI, nsIURI
|
||||
NS_IMETHODIMP nsNntpService::NewChannel(const char *verb,
|
||||
nsIURI *aURI,
|
||||
nsILoadGroup* aLoadGroup,
|
||||
nsICapabilities* notificationCallbacks,
|
||||
nsIInterfaceRequestor* notificationCallbacks,
|
||||
nsLoadFlags loadAttributes,
|
||||
nsIURI* originalURI,
|
||||
nsIChannel **_retval)
|
||||
|
@ -126,7 +126,7 @@ nsJARChannel::Init(nsIJARProtocolHandler* aHandler,
|
||||
const char* command,
|
||||
nsIURI* uri,
|
||||
nsILoadGroup* aLoadGroup,
|
||||
nsICapabilities* notificationCallbacks,
|
||||
nsIInterfaceRequestor* notificationCallbacks,
|
||||
nsLoadFlags loadAttributes,
|
||||
nsIURI* originalURI)
|
||||
{
|
||||
@ -438,7 +438,7 @@ nsJARChannel::SetOwner(nsISupports* aOwner)
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsJARChannel::GetNotificationCallbacks(nsICapabilities* *aNotificationCallbacks)
|
||||
nsJARChannel::GetNotificationCallbacks(nsIInterfaceRequestor* *aNotificationCallbacks)
|
||||
{
|
||||
*aNotificationCallbacks = mCallbacks.get();
|
||||
NS_IF_ADDREF(*aNotificationCallbacks);
|
||||
@ -446,7 +446,7 @@ nsJARChannel::GetNotificationCallbacks(nsICapabilities* *aNotificationCallbacks)
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsJARChannel::SetNotificationCallbacks(nsICapabilities* aNotificationCallbacks)
|
||||
nsJARChannel::SetNotificationCallbacks(nsIInterfaceRequestor* aNotificationCallbacks)
|
||||
{
|
||||
mCallbacks = aNotificationCallbacks;
|
||||
return NS_OK;
|
||||
|
@ -69,7 +69,7 @@ public:
|
||||
const char* command,
|
||||
nsIURI* uri,
|
||||
nsILoadGroup* aLoadGroup,
|
||||
nsICapabilities* notificationCallbacks,
|
||||
nsIInterfaceRequestor* notificationCallbacks,
|
||||
nsLoadFlags loadAttributes,
|
||||
nsIURI* originalURI);
|
||||
|
||||
@ -80,7 +80,7 @@ protected:
|
||||
char* mCommand;
|
||||
nsCOMPtr<nsIJARURI> mURI;
|
||||
nsCOMPtr<nsILoadGroup> mLoadGroup;
|
||||
nsCOMPtr<nsICapabilities> mCallbacks;
|
||||
nsCOMPtr<nsIInterfaceRequestor> mCallbacks;
|
||||
nsCOMPtr<nsIURI> mOriginalURI;
|
||||
nsLoadFlags mLoadAttributes;
|
||||
nsCOMPtr<nsISupports> mOwner;
|
||||
|
@ -119,7 +119,7 @@ nsJARProtocolHandler::NewURI(const char *aSpec, nsIURI *aBaseURI,
|
||||
NS_IMETHODIMP
|
||||
nsJARProtocolHandler::NewChannel(const char* verb, nsIURI* uri,
|
||||
nsILoadGroup* aLoadGroup,
|
||||
nsICapabilities* notificationCallbacks,
|
||||
nsIInterfaceRequestor* notificationCallbacks,
|
||||
nsLoadFlags loadAttributes,
|
||||
nsIURI* originalURI,
|
||||
nsIChannel* *result)
|
||||
|
@ -28,7 +28,7 @@ interface nsIOutputStream;
|
||||
interface nsIStreamObserver;
|
||||
interface nsIStreamListener;
|
||||
interface nsILoadGroup;
|
||||
interface nsICapabilities;
|
||||
interface nsIInterfaceRequestor;
|
||||
|
||||
typedef unsigned long nsLoadFlags;
|
||||
|
||||
@ -159,7 +159,7 @@ interface nsIChannel : nsIRequest
|
||||
* who wish to provide a means to receive progress, status and protocol-specific
|
||||
* notifications.
|
||||
*/
|
||||
attribute nsICapabilities notificationCallbacks;
|
||||
attribute nsIInterfaceRequestor notificationCallbacks;
|
||||
|
||||
};
|
||||
|
||||
@ -178,7 +178,7 @@ interface nsIInputStreamChannel : nsIChannel
|
||||
in long contentLength,
|
||||
in nsIInputStream inStr,
|
||||
in nsILoadGroup aLoadGroup,
|
||||
in nsICapabilities notificationCallbacks,
|
||||
in nsIInterfaceRequestor notificationCallbacks,
|
||||
in nsLoadFlags loadAttributes,
|
||||
in nsIURI originalURI);
|
||||
};
|
||||
|
@ -25,7 +25,7 @@
|
||||
|
||||
interface nsIProtocolHandler;
|
||||
interface nsIURI;
|
||||
interface nsICapabilities;
|
||||
interface nsIInterfaceRequestor;
|
||||
interface nsIStreamObserver;
|
||||
interface nsIStreamListener;
|
||||
interface nsIEventQueue;
|
||||
@ -67,7 +67,7 @@ interface nsIIOService : nsISupports
|
||||
nsIChannel newChannelFromURI(in string verb,
|
||||
in nsIURI aURI,
|
||||
in nsILoadGroup aLoadGroup,
|
||||
in nsICapabilities notificationCallbacks,
|
||||
in nsIInterfaceRequestor notificationCallbacks,
|
||||
in nsLoadFlags loadAttributes,
|
||||
in nsIURI originalURI);
|
||||
|
||||
@ -79,7 +79,7 @@ interface nsIIOService : nsISupports
|
||||
in string aSpec,
|
||||
in nsIURI aBaseURI,
|
||||
in nsILoadGroup aLoadGroup,
|
||||
in nsICapabilities notificationCallbacks,
|
||||
in nsIInterfaceRequestor notificationCallbacks,
|
||||
in nsLoadFlags loadAttributes,
|
||||
in nsIURI originalURI);
|
||||
|
||||
@ -158,7 +158,7 @@ interface nsIIOService : nsISupports
|
||||
in long contentLength,
|
||||
in nsIInputStream inStr,
|
||||
in nsILoadGroup aLoadGroup,
|
||||
in nsICapabilities notificationCallbacks,
|
||||
in nsIInterfaceRequestor notificationCallbacks,
|
||||
in nsLoadFlags loadAttributes,
|
||||
in nsIURI originalURI);
|
||||
|
||||
|
@ -24,7 +24,7 @@
|
||||
#include "nsIChannel.idl"
|
||||
|
||||
interface nsIURI;
|
||||
interface nsICapabilities;
|
||||
interface nsIInterfaceRequestor;
|
||||
interface nsILoadGroup;
|
||||
|
||||
[scriptable, uuid(15fd6940-8ea7-11d3-93ad-00104ba0fd40)]
|
||||
@ -55,7 +55,7 @@ interface nsIProtocolHandler : nsISupports
|
||||
nsIChannel newChannel(in string verb,
|
||||
in nsIURI aURI,
|
||||
in nsILoadGroup aLoadGroup,
|
||||
in nsICapabilities notificationCallbacks,
|
||||
in nsIInterfaceRequestor notificationCallbacks,
|
||||
in nsLoadFlags loadAttributes,
|
||||
in nsIURI originalURI);
|
||||
};
|
||||
|
@ -27,7 +27,7 @@ interface nsIURI;
|
||||
interface nsILoadGroup;
|
||||
interface nsIStreamObserver;
|
||||
interface nsIUnicharStreamLoader;
|
||||
interface nsICapabilities;
|
||||
interface nsIInterfaceRequestor;
|
||||
|
||||
[scriptable, uuid(c75e57d0-8e5a-11d3-93ad-00104ba0fd40)]
|
||||
interface nsIUnicharStreamLoaderObserver : nsISupports
|
||||
@ -43,7 +43,7 @@ interface nsIUnicharStreamLoader : nsISupports
|
||||
void init(in nsIURI uri,
|
||||
in nsIUnicharStreamLoaderObserver completionObserver,
|
||||
in nsILoadGroup loadGroup,
|
||||
in nsICapabilities notificationCallbacks,
|
||||
in nsIInterfaceRequestor notificationCallbacks,
|
||||
in nsLoadFlags loadAttributes);
|
||||
|
||||
/**
|
||||
@ -69,7 +69,7 @@ NS_NewUnicharStreamLoader(nsIUnicharStreamLoader* *result,
|
||||
nsIURI* uri,
|
||||
nsIUnicharStreamLoaderObserver* observer,
|
||||
nsILoadGroup* loadGroup = nsnull,
|
||||
nsICapabilities* notificationCallbacks = nsnull,
|
||||
nsIInterfaceRequestor* notificationCallbacks = nsnull,
|
||||
nsLoadFlags loadAttributes = nsIChannel::LOAD_NORMAL)
|
||||
{
|
||||
nsresult rv;
|
||||
|
@ -28,7 +28,7 @@
|
||||
#include "nsIInputStream.h"
|
||||
#include "nsIStreamListener.h"
|
||||
#include "nsILoadGroup.h"
|
||||
#include "nsICapabilities.h"
|
||||
#include "nsIInterfaceRequestor.h"
|
||||
#include "nsString.h"
|
||||
|
||||
#include "nsIIOService.h"
|
||||
@ -67,7 +67,7 @@ NS_NewURI(nsIURI* *result, const nsString& spec, nsIURI* baseURI = nsnull)
|
||||
|
||||
inline nsresult
|
||||
NS_OpenURI(nsIChannel* *result, nsIURI* uri, nsILoadGroup *aGroup,
|
||||
nsICapabilities *capabilities = nsnull)
|
||||
nsIInterfaceRequestor *capabilities = nsnull)
|
||||
{
|
||||
nsresult rv;
|
||||
static NS_DEFINE_CID(kIOServiceCID, NS_IOSERVICE_CID);
|
||||
|
@ -23,7 +23,7 @@
|
||||
#include "nsFileTransport.h"
|
||||
#include "nsFileTransportService.h"
|
||||
#include "nscore.h"
|
||||
#include "nsICapabilities.h"
|
||||
#include "nsIInterfaceRequestor.h"
|
||||
#include "nsIURI.h"
|
||||
#include "nsIEventQueue.h"
|
||||
#include "nsIIOService.h"
|
||||
@ -1099,7 +1099,7 @@ nsFileTransport::SetLoadGroup(nsILoadGroup* aLoadGroup)
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsFileTransport::GetNotificationCallbacks(nsICapabilities* *aNotificationCallbacks)
|
||||
nsFileTransport::GetNotificationCallbacks(nsIInterfaceRequestor* *aNotificationCallbacks)
|
||||
{
|
||||
*aNotificationCallbacks = mCallbacks.get();
|
||||
NS_IF_ADDREF(*aNotificationCallbacks);
|
||||
@ -1107,15 +1107,15 @@ nsFileTransport::GetNotificationCallbacks(nsICapabilities* *aNotificationCallbac
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsFileTransport::SetNotificationCallbacks(nsICapabilities* aNotificationCallbacks)
|
||||
nsFileTransport::SetNotificationCallbacks(nsIInterfaceRequestor* aNotificationCallbacks)
|
||||
{
|
||||
mCallbacks = aNotificationCallbacks;
|
||||
|
||||
// Get a nsIProgressEventSink so that we can fire status/progress on it-
|
||||
if (mCallbacks) {
|
||||
nsCOMPtr<nsISupports> sink;
|
||||
nsresult rv = mCallbacks->QueryCapability(NS_GET_IID(nsIProgressEventSink),
|
||||
getter_AddRefs(sink));
|
||||
nsresult rv = mCallbacks->GetInterface(NS_GET_IID(nsIProgressEventSink),
|
||||
getter_AddRefs(sink));
|
||||
if (NS_FAILED(rv)) return NS_OK; // don't need a progress event sink
|
||||
|
||||
// Now generate a proxied event sink
|
||||
|
@ -36,9 +36,9 @@
|
||||
#include "nsIBufferInputStream.h"
|
||||
#include "nsIBufferOutputStream.h"
|
||||
#include "nsIFileSystem.h"
|
||||
#include "nsICapabilities.h"
|
||||
#include "nsIInterfaceRequestor.h"
|
||||
|
||||
class nsICapabilities;
|
||||
class nsIInterfaceRequestor;
|
||||
|
||||
class nsFileTransport : public nsIChannel,
|
||||
public nsIRunnable,
|
||||
@ -90,7 +90,7 @@ public:
|
||||
};
|
||||
|
||||
protected:
|
||||
nsCOMPtr<nsICapabilities> mCallbacks;
|
||||
nsCOMPtr<nsIInterfaceRequestor> mCallbacks;
|
||||
nsCOMPtr<nsIProgressEventSink> mProgress;
|
||||
nsFileSpec mSpec; // eliminate?
|
||||
nsCOMPtr<nsIFileSystem> mFileObject;
|
||||
|
@ -26,7 +26,6 @@
|
||||
#include "nsCRT.h"
|
||||
#include "nsIComponentManager.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsICapabilities.h"
|
||||
#include "nsIProgressEventSink.h"
|
||||
#include "nsIThreadPool.h"
|
||||
#include "nsISupportsArray.h"
|
||||
|
@ -228,7 +228,7 @@ nsIOService::NewURI(const char* aSpec, nsIURI* aBaseURI,
|
||||
NS_IMETHODIMP
|
||||
nsIOService::NewChannelFromURI(const char* verb, nsIURI *aURI,
|
||||
nsILoadGroup *aGroup,
|
||||
nsICapabilities* notificationCallbacks,
|
||||
nsIInterfaceRequestor* notificationCallbacks,
|
||||
nsLoadFlags loadAttributes,
|
||||
nsIURI* originalURI,
|
||||
nsIChannel **result)
|
||||
@ -252,7 +252,7 @@ NS_IMETHODIMP
|
||||
nsIOService::NewChannel(const char* verb, const char *aSpec,
|
||||
nsIURI *aBaseURI,
|
||||
nsILoadGroup *aGroup,
|
||||
nsICapabilities* notificationCallbacks,
|
||||
nsIInterfaceRequestor* notificationCallbacks,
|
||||
nsLoadFlags loadAttributes,
|
||||
nsIURI* originalURI,
|
||||
nsIChannel **result)
|
||||
@ -386,7 +386,7 @@ nsIOService::NewInputStreamChannel(nsIURI* uri,
|
||||
PRInt32 contentLength,
|
||||
nsIInputStream *inStr,
|
||||
nsILoadGroup *aGroup,
|
||||
nsICapabilities* notificationCallbacks,
|
||||
nsIInterfaceRequestor* notificationCallbacks,
|
||||
nsLoadFlags loadAttributes,
|
||||
nsIURI* originalURI,
|
||||
nsIChannel **result)
|
||||
|
@ -65,7 +65,7 @@ nsInputStreamChannel::Init(nsIURI* uri,
|
||||
PRInt32 contentLength,
|
||||
nsIInputStream* in,
|
||||
nsILoadGroup *aGroup,
|
||||
nsICapabilities* notificationCallbacks,
|
||||
nsIInterfaceRequestor* notificationCallbacks,
|
||||
nsLoadFlags loadAttributes,
|
||||
nsIURI* originalURI)
|
||||
{
|
||||
@ -304,7 +304,7 @@ nsInputStreamChannel::SetOwner(nsISupports* aOwner)
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsInputStreamChannel::GetNotificationCallbacks(nsICapabilities* *aNotificationCallbacks)
|
||||
nsInputStreamChannel::GetNotificationCallbacks(nsIInterfaceRequestor* *aNotificationCallbacks)
|
||||
{
|
||||
*aNotificationCallbacks = mCallbacks.get();
|
||||
NS_IF_ADDREF(*aNotificationCallbacks);
|
||||
@ -312,7 +312,7 @@ nsInputStreamChannel::GetNotificationCallbacks(nsICapabilities* *aNotificationCa
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsInputStreamChannel::SetNotificationCallbacks(nsICapabilities* aNotificationCallbacks)
|
||||
nsInputStreamChannel::SetNotificationCallbacks(nsIInterfaceRequestor* aNotificationCallbacks)
|
||||
{
|
||||
mCallbacks = aNotificationCallbacks;
|
||||
return NS_OK;
|
||||
|
@ -29,7 +29,7 @@
|
||||
#include "nsCRT.h"
|
||||
#include "nsILoadGroup.h"
|
||||
#include "nsIStreamListener.h"
|
||||
#include "nsICapabilities.h"
|
||||
#include "nsIInterfaceRequestor.h"
|
||||
#include "nsCOMPtr.h"
|
||||
|
||||
class nsInputStreamChannel : public nsIInputStreamChannel,
|
||||
@ -50,16 +50,16 @@ public:
|
||||
Create(nsISupports *aOuter, REFNSIID aIID, void **aResult);
|
||||
|
||||
protected:
|
||||
nsCOMPtr<nsICapabilities> mCallbacks;
|
||||
nsCOMPtr<nsIURI> mOriginalURI;
|
||||
nsCOMPtr<nsIURI> mURI;
|
||||
char* mContentType;
|
||||
PRInt32 mContentLength;
|
||||
nsCOMPtr<nsIInputStream> mInputStream;
|
||||
nsCOMPtr<nsILoadGroup> mLoadGroup;
|
||||
nsCOMPtr<nsISupports> mOwner;
|
||||
nsCOMPtr<nsIChannel> mFileTransport;
|
||||
nsCOMPtr<nsIStreamListener> mRealListener;
|
||||
nsCOMPtr<nsIInterfaceRequestor> mCallbacks;
|
||||
nsCOMPtr<nsIURI> mOriginalURI;
|
||||
nsCOMPtr<nsIURI> mURI;
|
||||
char* mContentType;
|
||||
PRInt32 mContentLength;
|
||||
nsCOMPtr<nsIInputStream> mInputStream;
|
||||
nsCOMPtr<nsILoadGroup> mLoadGroup;
|
||||
nsCOMPtr<nsISupports> mOwner;
|
||||
nsCOMPtr<nsIChannel> mFileTransport;
|
||||
nsCOMPtr<nsIStreamListener> mRealListener;
|
||||
};
|
||||
|
||||
#endif // nsInputStreamChannel_h__
|
||||
|
@ -34,7 +34,7 @@
|
||||
#include "nsISocketProvider.h"
|
||||
#include "nsISocketProviderService.h"
|
||||
#include "nsStdURL.h"
|
||||
#include "nsICapabilities.h"
|
||||
#include "nsIInterfaceRequestor.h"
|
||||
#include "nsProxyObjectManager.h"
|
||||
#include "nsXPIDLString.h"
|
||||
|
||||
@ -1818,7 +1818,7 @@ nsSocketTransport::SetOwner(nsISupports * aOwner)
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsSocketTransport::GetNotificationCallbacks(nsICapabilities* *aNotificationCallbacks)
|
||||
nsSocketTransport::GetNotificationCallbacks(nsIInterfaceRequestor* *aNotificationCallbacks)
|
||||
{
|
||||
*aNotificationCallbacks = mCallbacks.get();
|
||||
NS_IF_ADDREF(*aNotificationCallbacks);
|
||||
@ -1826,15 +1826,15 @@ nsSocketTransport::GetNotificationCallbacks(nsICapabilities* *aNotificationCallb
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsSocketTransport::SetNotificationCallbacks(nsICapabilities* aNotificationCallbacks)
|
||||
nsSocketTransport::SetNotificationCallbacks(nsIInterfaceRequestor* aNotificationCallbacks)
|
||||
{
|
||||
mCallbacks = aNotificationCallbacks;
|
||||
|
||||
// Get a nsIProgressEventSink so that we can fire status/progress on it-
|
||||
if (mCallbacks) {
|
||||
nsCOMPtr<nsIProgressEventSink> sink;
|
||||
nsresult rv = mCallbacks->QueryCapability(NS_GET_IID(nsIProgressEventSink),
|
||||
getter_AddRefs(sink));
|
||||
nsresult rv = mCallbacks->GetInterface(NS_GET_IID(nsIProgressEventSink),
|
||||
getter_AddRefs(sink));
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
// Now generate a proxied event sink-
|
||||
NS_WITH_SERVICE(nsIProxyObjectManager,
|
||||
|
@ -38,7 +38,7 @@
|
||||
#include "nsIDNSListener.h"
|
||||
#include "nsIPipe.h"
|
||||
#include "nsIProgressEventSink.h"
|
||||
#include "nsICapabilities.h"
|
||||
#include "nsIInterfaceRequestor.h"
|
||||
|
||||
#define NS_SOCKET_TRANSPORT_SEGMENT_SIZE (2*1024)
|
||||
#define NS_SOCKET_TRANSPORT_BUFFER_SIZE (8*1024)
|
||||
@ -108,7 +108,7 @@ enum nsSocketReadWriteInfo {
|
||||
|
||||
// Forward declarations...
|
||||
class nsSocketTransportService;
|
||||
class nsICapabilities;
|
||||
class nsIInterfaceRequestor;
|
||||
|
||||
class nsSocketTransport : public nsIChannel,
|
||||
public nsIDNSListener,
|
||||
@ -193,7 +193,7 @@ protected:
|
||||
PRBool mCloseConnectionOnceDone;
|
||||
nsSocketState mCurrentState;
|
||||
nsCOMPtr<nsIRequest> mDNSRequest;
|
||||
nsCOMPtr<nsICapabilities> mCallbacks;
|
||||
nsCOMPtr<nsIInterfaceRequestor> mCallbacks;
|
||||
nsCOMPtr<nsIProgressEventSink> mEventSink;
|
||||
char* mHostName;
|
||||
PRIntervalTime mLastActiveTime;
|
||||
|
@ -43,7 +43,7 @@ NS_IMETHODIMP
|
||||
nsUnicharStreamLoader::Init(nsIURI* aURL,
|
||||
nsIUnicharStreamLoaderObserver* observer,
|
||||
nsILoadGroup* aGroup,
|
||||
nsICapabilities* notificationCallbacks,
|
||||
nsIInterfaceRequestor* notificationCallbacks,
|
||||
nsLoadFlags loadAttributes)
|
||||
{
|
||||
nsresult rv = NS_OK;
|
||||
|
8
netwerk/cache/tests/xptest/disktest.cpp
vendored
8
netwerk/cache/tests/xptest/disktest.cpp
vendored
@ -59,7 +59,7 @@
|
||||
#include "nsIURL.h"
|
||||
#include "nsIHTTPChannel.h"
|
||||
#include "nsIHttpEventSink.h"
|
||||
#include "nsICapabilities.h"
|
||||
#include "nsIInterfaceRequestor.h"
|
||||
#include "nsIDNSService.h"
|
||||
|
||||
#include "nsISimpleEnumerator.h"
|
||||
@ -573,7 +573,7 @@ InputTestConsumer::OnStopRequest(nsIChannel* channel,
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
class nsNotificationCallbacks : public nsICapabilities {
|
||||
class nsNotificationCallbacks : public nsIInterfaceRequestor {
|
||||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
@ -581,7 +581,7 @@ public:
|
||||
NS_INIT_REFCNT();
|
||||
}
|
||||
|
||||
NS_IMETHOD QueryCapability(const nsIID& eventSinkIID, nsISupports* *result) {
|
||||
NS_IMETHOD GetInterface(const nsIID& eventSinkIID, nsISupports* *result) {
|
||||
nsresult rv = NS_ERROR_FAILURE;
|
||||
|
||||
if (eventSinkIID.Equals(NS_GET_IID(nsIHTTPEventSink))) {
|
||||
@ -598,7 +598,7 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
NS_IMPL_ISUPPORTS1(nsNotificationCallbacks, nsICapabilities)
|
||||
NS_IMPL_ISUPPORTS1(nsNotificationCallbacks, nsIInterfaceRequestor)
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
8
netwerk/cache/tests/xptest/memtest.cpp
vendored
8
netwerk/cache/tests/xptest/memtest.cpp
vendored
@ -46,7 +46,7 @@
|
||||
#include "nsIURL.h"
|
||||
#include "nsIHTTPChannel.h"
|
||||
#include "nsIHttpEventSink.h"
|
||||
#include "nsICapabilities.h"
|
||||
#include "nsIInterfaceRequestor.h"
|
||||
#include "nsIDNSService.h"
|
||||
|
||||
#include "nsISimpleEnumerator.h"
|
||||
@ -557,7 +557,7 @@ InputTestConsumer::OnStopRequest(nsIChannel* channel,
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
class nsNotificationCallbacks : public nsICapabilities {
|
||||
class nsNotificationCallbacks : public nsIInterfaceRequestor {
|
||||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
@ -565,7 +565,7 @@ public:
|
||||
NS_INIT_REFCNT();
|
||||
}
|
||||
|
||||
NS_IMETHOD QueryCapability(const nsIID& eventSinkIID, nsISupports* *result) {
|
||||
NS_IMETHOD GetInterface(const nsIID& eventSinkIID, nsISupports* *result) {
|
||||
nsresult rv = NS_ERROR_FAILURE;
|
||||
|
||||
if (eventSinkIID.Equals(NS_GET_IID(nsIHTTPEventSink))) {
|
||||
@ -582,7 +582,7 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
NS_IMPL_ISUPPORTS1(nsNotificationCallbacks, nsICapabilities)
|
||||
NS_IMPL_ISUPPORTS1(nsNotificationCallbacks, nsIInterfaceRequestor)
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
@ -25,7 +25,7 @@
|
||||
|
||||
interface nsIURI;
|
||||
interface nsILoadGroup;
|
||||
interface nsICapabilities;
|
||||
interface nsIInterfaceRequestor;
|
||||
interface nsIEventQueue;
|
||||
|
||||
[scriptable, uuid(692303c0-2f83-11d3-8cd0-0060b0fc14a3)]
|
||||
@ -34,7 +34,7 @@ interface nsIAboutModule : nsISupports
|
||||
nsIChannel NewChannel(in string verb,
|
||||
in nsIURI aURI,
|
||||
in nsILoadGroup aLoadGroup,
|
||||
in nsICapabilities notificationCallbacks,
|
||||
in nsIInterfaceRequestor notificationCallbacks,
|
||||
in nsLoadFlags loadAttributes,
|
||||
in nsIURI originalURI);
|
||||
};
|
||||
|
@ -35,7 +35,7 @@ NS_IMETHODIMP
|
||||
nsAboutBlank::NewChannel(const char *verb,
|
||||
nsIURI *aURI,
|
||||
nsILoadGroup* aLoadGroup,
|
||||
nsICapabilities* notificationCallbacks,
|
||||
nsIInterfaceRequestor* notificationCallbacks,
|
||||
nsLoadFlags loadAttributes,
|
||||
nsIURI* originalURI,
|
||||
nsIChannel **result)
|
||||
|
@ -45,7 +45,7 @@ NS_IMETHODIMP
|
||||
nsAboutBloat::NewChannel(const char *verb,
|
||||
nsIURI *aURI,
|
||||
nsILoadGroup* aLoadGroup,
|
||||
nsICapabilities* notificationCallbacks,
|
||||
nsIInterfaceRequestor* notificationCallbacks,
|
||||
nsLoadFlags loadAttributes,
|
||||
nsIURI* originalURI,
|
||||
nsIChannel **result)
|
||||
|
@ -121,7 +121,7 @@ nsAboutProtocolHandler::NewURI(const char *aSpec, nsIURI *aBaseURI,
|
||||
NS_IMETHODIMP
|
||||
nsAboutProtocolHandler::NewChannel(const char* verb, nsIURI* uri,
|
||||
nsILoadGroup* aLoadGroup,
|
||||
nsICapabilities* notificationCallbacks,
|
||||
nsIInterfaceRequestor* notificationCallbacks,
|
||||
nsLoadFlags loadAttributes,
|
||||
nsIURI* originalURI,
|
||||
nsIChannel* *result)
|
||||
|
@ -28,7 +28,7 @@
|
||||
#include "nsIIOService.h"
|
||||
#include "nsILoadGroup.h"
|
||||
#include "plbase64.h"
|
||||
#include "nsICapabilities.h"
|
||||
#include "nsIInterfaceRequestor.h"
|
||||
#include "nsIPipe.h"
|
||||
#include "nsIBufferInputStream.h"
|
||||
#include "nsIBufferOutputStream.h"
|
||||
@ -56,7 +56,7 @@ nsresult
|
||||
nsDataChannel::Init(const char* verb,
|
||||
nsIURI* uri,
|
||||
nsILoadGroup* aLoadGroup,
|
||||
nsICapabilities* notificationCallbacks,
|
||||
nsIInterfaceRequestor* notificationCallbacks,
|
||||
nsLoadFlags loadAttributes,
|
||||
nsIURI* originalURI)
|
||||
{
|
||||
@ -404,7 +404,7 @@ nsDataChannel::SetOwner(nsISupports* aOwner)
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDataChannel::GetNotificationCallbacks(nsICapabilities* *aNotificationCallbacks)
|
||||
nsDataChannel::GetNotificationCallbacks(nsIInterfaceRequestor* *aNotificationCallbacks)
|
||||
{
|
||||
*aNotificationCallbacks = mCallbacks.get();
|
||||
NS_IF_ADDREF(*aNotificationCallbacks);
|
||||
@ -412,7 +412,7 @@ nsDataChannel::GetNotificationCallbacks(nsICapabilities* *aNotificationCallbacks
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDataChannel::SetNotificationCallbacks(nsICapabilities* aNotificationCallbacks)
|
||||
nsDataChannel::SetNotificationCallbacks(nsIInterfaceRequestor* aNotificationCallbacks)
|
||||
{
|
||||
mCallbacks = aNotificationCallbacks;
|
||||
return NS_OK;
|
||||
|
@ -32,7 +32,7 @@
|
||||
#include "nsILoadGroup.h"
|
||||
#include "nsIStreamListener.h"
|
||||
#include "nsIInputStream.h"
|
||||
#include "nsICapabilities.h"
|
||||
#include "nsIInterfaceRequestor.h"
|
||||
|
||||
#include "nsCOMPtr.h"
|
||||
|
||||
@ -54,21 +54,21 @@ public:
|
||||
nsresult Init(const char* verb,
|
||||
nsIURI* uri,
|
||||
nsILoadGroup* aLoadGroup,
|
||||
nsICapabilities* notificationCallbacks,
|
||||
nsIInterfaceRequestor* notificationCallbacks,
|
||||
nsLoadFlags loadAttributes,
|
||||
nsIURI* originalURI);
|
||||
nsresult ParseData();
|
||||
|
||||
protected:
|
||||
nsCOMPtr<nsICapabilities> mCallbacks;
|
||||
nsCOMPtr<nsIURI> mOriginalURI;
|
||||
nsCOMPtr<nsIURI> mUrl;
|
||||
nsCOMPtr<nsIInputStream> mDataStream;
|
||||
PRUint32 mLoadAttributes;
|
||||
nsCOMPtr<nsILoadGroup> mLoadGroup;
|
||||
nsCString mContentType;
|
||||
PRInt32 mContentLength;
|
||||
nsCOMPtr<nsISupports> mOwner;
|
||||
nsCOMPtr<nsIInterfaceRequestor> mCallbacks;
|
||||
nsCOMPtr<nsIURI> mOriginalURI;
|
||||
nsCOMPtr<nsIURI> mUrl;
|
||||
nsCOMPtr<nsIInputStream> mDataStream;
|
||||
PRUint32 mLoadAttributes;
|
||||
nsCOMPtr<nsILoadGroup> mLoadGroup;
|
||||
nsCString mContentType;
|
||||
PRInt32 mContentLength;
|
||||
nsCOMPtr<nsISupports> mOwner;
|
||||
|
||||
};
|
||||
|
||||
|
@ -27,7 +27,7 @@
|
||||
#include "nsCRT.h"
|
||||
#include "nsIComponentManager.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsICapabilities.h"
|
||||
#include "nsIInterfaceRequestor.h"
|
||||
#include "nsIProgressEventSink.h"
|
||||
|
||||
static NS_DEFINE_CID(kStandardURLCID, NS_STANDARDURL_CID);
|
||||
@ -98,7 +98,7 @@ nsDataHandler::NewURI(const char *aSpec, nsIURI *aBaseURI,
|
||||
NS_IMETHODIMP
|
||||
nsDataHandler::NewChannel(const char* verb, nsIURI* url,
|
||||
nsILoadGroup* aLoadGroup,
|
||||
nsICapabilities* notificationCallbacks,
|
||||
nsIInterfaceRequestor* notificationCallbacks,
|
||||
nsLoadFlags loadAttributes,
|
||||
nsIURI* originalURI,
|
||||
nsIChannel* *result)
|
||||
|
@ -22,7 +22,7 @@
|
||||
|
||||
#include "nsFileChannel.h"
|
||||
#include "nscore.h"
|
||||
#include "nsICapabilities.h"
|
||||
#include "nsIInterfaceRequestor.h"
|
||||
#include "nsIURI.h"
|
||||
#include "nsIEventQueue.h"
|
||||
#include "nsIStreamListener.h"
|
||||
@ -66,7 +66,7 @@ nsFileChannel::Init(nsIFileProtocolHandler* handler,
|
||||
const char* command,
|
||||
nsIURI* uri,
|
||||
nsILoadGroup* aLoadGroup,
|
||||
nsICapabilities* notificationCallbacks,
|
||||
nsIInterfaceRequestor* notificationCallbacks,
|
||||
nsLoadFlags loadAttributes,
|
||||
nsIURI* originalURI)
|
||||
{
|
||||
@ -416,7 +416,7 @@ nsFileChannel::SetOwner(nsISupports* aOwner)
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsFileChannel::GetNotificationCallbacks(nsICapabilities* *aNotificationCallbacks)
|
||||
nsFileChannel::GetNotificationCallbacks(nsIInterfaceRequestor* *aNotificationCallbacks)
|
||||
{
|
||||
*aNotificationCallbacks = mCallbacks.get();
|
||||
NS_IF_ADDREF(*aNotificationCallbacks);
|
||||
@ -424,7 +424,7 @@ nsFileChannel::GetNotificationCallbacks(nsICapabilities* *aNotificationCallbacks
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsFileChannel::SetNotificationCallbacks(nsICapabilities* aNotificationCallbacks)
|
||||
nsFileChannel::SetNotificationCallbacks(nsIInterfaceRequestor* aNotificationCallbacks)
|
||||
{
|
||||
mCallbacks = aNotificationCallbacks;
|
||||
return NS_OK;
|
||||
|
@ -25,7 +25,7 @@
|
||||
|
||||
#include "nsIFileChannel.h"
|
||||
#include "nsIFileProtocolHandler.h"
|
||||
#include "nsICapabilities.h"
|
||||
#include "nsIInterfaceRequestor.h"
|
||||
#include "nsILoadGroup.h"
|
||||
#include "nsIStreamListener.h"
|
||||
#include "nsIChannel.h"
|
||||
@ -67,7 +67,7 @@ public:
|
||||
const char* command,
|
||||
nsIURI* uri,
|
||||
nsILoadGroup* aLoadGroup,
|
||||
nsICapabilities* notificationCallbacks,
|
||||
nsIInterfaceRequestor* notificationCallbacks,
|
||||
nsLoadFlags loadAttributes,
|
||||
nsIURI* originalURI);
|
||||
|
||||
@ -78,7 +78,7 @@ protected:
|
||||
nsCOMPtr<nsIURI> mOriginalURI;
|
||||
nsCOMPtr<nsIURI> mURI;
|
||||
nsCOMPtr<nsIFileProtocolHandler> mHandler;
|
||||
nsCOMPtr<nsICapabilities> mCallbacks;
|
||||
nsCOMPtr<nsIInterfaceRequestor> mCallbacks;
|
||||
char* mCommand;
|
||||
nsFileSpec mSpec;
|
||||
nsCOMPtr<nsIChannel> mFileTransport;
|
||||
|
@ -26,7 +26,7 @@
|
||||
#include "nsCRT.h"
|
||||
#include "nsIComponentManager.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsICapabilities.h"
|
||||
#include "nsIInterfaceRequestor.h"
|
||||
#include "nsIProgressEventSink.h"
|
||||
#include "nsIThread.h"
|
||||
#include "nsIThreadPool.h"
|
||||
@ -129,7 +129,7 @@ nsFileProtocolHandler::NewURI(const char *aSpec, nsIURI *aBaseURI,
|
||||
NS_IMETHODIMP
|
||||
nsFileProtocolHandler::NewChannel(const char* command, nsIURI* url,
|
||||
nsILoadGroup* aLoadGroup,
|
||||
nsICapabilities* notificationCallbacks,
|
||||
nsIInterfaceRequestor* notificationCallbacks,
|
||||
nsLoadFlags loadAttributes,
|
||||
nsIURI* originalURI,
|
||||
nsIChannel* *result)
|
||||
|
@ -30,7 +30,7 @@
|
||||
#include "nsFtpConnectionThread.h"
|
||||
#include "nsIEventQueueService.h"
|
||||
#include "nsIProgressEventSink.h"
|
||||
#include "nsICapabilities.h"
|
||||
#include "nsIInterfaceRequestor.h"
|
||||
#include "nsIMIMEService.h"
|
||||
#include "nsProxyObjectManager.h"
|
||||
|
||||
@ -91,7 +91,7 @@ nsresult
|
||||
nsFTPChannel::Init(const char* verb,
|
||||
nsIURI* uri,
|
||||
nsILoadGroup* aLoadGroup,
|
||||
nsICapabilities* notificationCallbacks,
|
||||
nsIInterfaceRequestor* notificationCallbacks,
|
||||
nsLoadFlags loadAttributes,
|
||||
nsIURI* originalURI,
|
||||
nsIProtocolHandler* aHandler,
|
||||
@ -399,7 +399,7 @@ nsFTPChannel::SetOwner(nsISupports* aOwner)
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsFTPChannel::GetNotificationCallbacks(nsICapabilities* *aNotificationCallbacks)
|
||||
nsFTPChannel::GetNotificationCallbacks(nsIInterfaceRequestor* *aNotificationCallbacks)
|
||||
{
|
||||
*aNotificationCallbacks = mCallbacks.get();
|
||||
NS_IF_ADDREF(*aNotificationCallbacks);
|
||||
@ -407,13 +407,13 @@ nsFTPChannel::GetNotificationCallbacks(nsICapabilities* *aNotificationCallbacks)
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsFTPChannel::SetNotificationCallbacks(nsICapabilities* aNotificationCallbacks)
|
||||
nsFTPChannel::SetNotificationCallbacks(nsIInterfaceRequestor* aNotificationCallbacks)
|
||||
{
|
||||
mCallbacks = aNotificationCallbacks;
|
||||
|
||||
if (mCallbacks) {
|
||||
nsresult rv = mCallbacks->QueryCapability(NS_GET_IID(nsIProgressEventSink),
|
||||
getter_AddRefs(mEventSink));
|
||||
nsresult rv = mCallbacks->GetInterface(NS_GET_IID(nsIProgressEventSink),
|
||||
getter_AddRefs(mEventSink));
|
||||
if (NS_FAILED(rv)) {
|
||||
PR_LOG(gFTPLog, PR_LOG_DEBUG, ("nsFTPChannel::Init() (couldn't find event sink)\n"));
|
||||
}
|
||||
|
@ -35,7 +35,7 @@
|
||||
#include "nsHashtable.h"
|
||||
#include "nsIProtocolHandler.h"
|
||||
#include "nsIProgressEventSink.h"
|
||||
#include "nsICapabilities.h"
|
||||
#include "nsIInterfaceRequestor.h"
|
||||
#include "nsIThreadPool.h"
|
||||
#include "nsIRequest.h"
|
||||
|
||||
@ -63,7 +63,7 @@ public:
|
||||
nsresult Init(const char* verb,
|
||||
nsIURI* uri,
|
||||
nsILoadGroup* aLoadGroup,
|
||||
nsICapabilities* notificationCallbacks,
|
||||
nsIInterfaceRequestor* notificationCallbacks,
|
||||
nsLoadFlags loadAttributes,
|
||||
nsIURI* originalURI,
|
||||
nsIProtocolHandler* aHandler,
|
||||
@ -74,7 +74,7 @@ protected:
|
||||
nsCOMPtr<nsIURI> mURL;
|
||||
nsCOMPtr<nsIEventQueue> mEventQueue;
|
||||
nsCOMPtr<nsIProgressEventSink> mEventSink;
|
||||
nsCOMPtr<nsICapabilities> mCallbacks;
|
||||
nsCOMPtr<nsIInterfaceRequestor> mCallbacks;
|
||||
|
||||
PRBool mConnected;
|
||||
nsCOMPtr<nsIStreamListener> mListener;
|
||||
|
@ -1835,7 +1835,7 @@ nsFtpConnectionThread::Init(nsIURI* aUrl,
|
||||
nsIProtocolHandler* aHandler,
|
||||
nsIChannel* aChannel,
|
||||
nsISupports* aContext,
|
||||
nsICapabilities* notificationCallbacks) {
|
||||
nsIInterfaceRequestor* notificationCallbacks) {
|
||||
nsresult rv;
|
||||
|
||||
NS_ASSERTION(aChannel, "FTP: thread needs a channel");
|
||||
|
@ -27,7 +27,7 @@
|
||||
#include "nsIRunnable.h"
|
||||
#include "nsIRequest.h"
|
||||
#include "nsISocketTransportService.h"
|
||||
#include "nsICapabilities.h"
|
||||
#include "nsIInterfaceRequestor.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsIStreamListener.h"
|
||||
#include "nsIInputStream.h"
|
||||
@ -138,7 +138,7 @@ public:
|
||||
nsIProtocolHandler* aHandler,
|
||||
nsIChannel* channel,
|
||||
nsISupports* ctxt,
|
||||
nsICapabilities* notificationCallbacks);
|
||||
nsIInterfaceRequestor* notificationCallbacks);
|
||||
nsresult Process();
|
||||
|
||||
// user level setup
|
||||
@ -251,12 +251,12 @@ private:
|
||||
nsCOMPtr<nsISupports> mContext;
|
||||
nsCOMPtr<nsIConnectionCache> mConnCache; // the nsISupports proxy ptr to the FTP proto handler
|
||||
nsConnectionCacheObj* mConn; // The cached connection.
|
||||
PRBool mKeepRunning; // thread event loop boolean
|
||||
PRBool mKeepRunning; // thread event loop boolean
|
||||
|
||||
nsString2 mContentType; // the content type of the data we're dealing w/.
|
||||
nsXPIDLCString mURLSpec;
|
||||
nsCOMPtr<nsICapabilities> mCallbacks;
|
||||
nsCOMPtr<nsIFTPChannel> mFTPChannel;
|
||||
nsString2 mContentType; // the content type of the data we're dealing w/.
|
||||
nsXPIDLCString mURLSpec;
|
||||
nsCOMPtr<nsIInterfaceRequestor> mCallbacks;
|
||||
nsCOMPtr<nsIFTPChannel> mFTPChannel;
|
||||
|
||||
nsCOMPtr<nsIBufferInputStream> mBufInStream;
|
||||
nsCOMPtr<nsIBufferOutputStream> mBufOutStream;
|
||||
|
@ -26,7 +26,7 @@
|
||||
#include "nsIURL.h"
|
||||
#include "nsCRT.h"
|
||||
#include "nsIComponentManager.h"
|
||||
#include "nsICapabilities.h"
|
||||
#include "nsIInterfaceRequestor.h"
|
||||
#include "nsIProgressEventSink.h"
|
||||
#include "nsConnectionCacheObj.h"
|
||||
|
||||
@ -177,7 +177,7 @@ nsFtpProtocolHandler::NewURI(const char *aSpec, nsIURI *aBaseURI,
|
||||
NS_IMETHODIMP
|
||||
nsFtpProtocolHandler::NewChannel(const char* verb, nsIURI* url,
|
||||
nsILoadGroup* aLoadGroup,
|
||||
nsICapabilities* notificationCallbacks,
|
||||
nsIInterfaceRequestor* notificationCallbacks,
|
||||
nsLoadFlags loadAttributes,
|
||||
nsIURI* originalURI,
|
||||
nsIChannel* *result)
|
||||
|
@ -27,7 +27,7 @@
|
||||
#include "nsIHTTPProtocolHandler.h"
|
||||
#include "nsHTTPRequest.h"
|
||||
#include "nsHTTPResponse.h"
|
||||
#include "nsICapabilities.h"
|
||||
#include "nsIInterfaceRequestor.h"
|
||||
#include "nsIChannel.h"
|
||||
#include "nsIInputStream.h"
|
||||
#include "nsIStreamListener.h"
|
||||
@ -391,7 +391,7 @@ nsHTTPChannel::SetOwner(nsISupports * aOwner)
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTTPChannel::GetNotificationCallbacks(nsICapabilities* *aNotificationCallbacks)
|
||||
nsHTTPChannel::GetNotificationCallbacks(nsIInterfaceRequestor* *aNotificationCallbacks)
|
||||
{
|
||||
*aNotificationCallbacks = mCallbacks.get();
|
||||
NS_IF_ADDREF(*aNotificationCallbacks);
|
||||
@ -399,7 +399,7 @@ nsHTTPChannel::GetNotificationCallbacks(nsICapabilities* *aNotificationCallbacks
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTTPChannel::SetNotificationCallbacks(nsICapabilities* aNotificationCallbacks)
|
||||
nsHTTPChannel::SetNotificationCallbacks(nsIInterfaceRequestor* aNotificationCallbacks)
|
||||
{
|
||||
nsresult rv = NS_OK;
|
||||
mCallbacks = aNotificationCallbacks;
|
||||
@ -408,8 +408,8 @@ nsHTTPChannel::SetNotificationCallbacks(nsICapabilities* aNotificationCallbacks)
|
||||
if (mCallbacks) {
|
||||
// we don't care if this fails -- we don't need an nsIHTTPEventSink
|
||||
// to proceed
|
||||
(void)mCallbacks->QueryCapability(NS_GET_IID(nsIHTTPEventSink),
|
||||
getter_AddRefs(mEventSink));
|
||||
(void)mCallbacks->GetInterface(NS_GET_IID(nsIHTTPEventSink),
|
||||
getter_AddRefs(mEventSink));
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
|
@ -29,7 +29,7 @@
|
||||
#include "nsIURI.h"
|
||||
#include "nsHTTPHandler.h"
|
||||
#include "nsIEventQueue.h"
|
||||
#include "nsICapabilities.h"
|
||||
#include "nsIInterfaceRequestor.h"
|
||||
#include "nsIHttpEventSink.h"
|
||||
#include "nsILoadGroup.h"
|
||||
#include "nsCOMPtr.h"
|
||||
@ -87,37 +87,37 @@ public:
|
||||
nsresult SetUsingProxy(PRBool i_UsingProxy);
|
||||
|
||||
protected:
|
||||
nsCOMPtr<nsIURI> mOriginalURI;
|
||||
nsCOMPtr<nsIURI> mURI;
|
||||
PRBool mConnected;
|
||||
nsHTTPHandler* mHandler;
|
||||
HTTPState mState;
|
||||
nsCOMPtr<nsIURI> mOriginalURI;
|
||||
nsCOMPtr<nsIURI> mURI;
|
||||
PRBool mConnected;
|
||||
nsHTTPHandler* mHandler;
|
||||
HTTPState mState;
|
||||
|
||||
nsCString mVerb;
|
||||
nsCOMPtr<nsIHTTPEventSink> mEventSink;
|
||||
nsCOMPtr<nsICapabilities> mCallbacks;
|
||||
nsCString mVerb;
|
||||
nsCOMPtr<nsIHTTPEventSink> mEventSink;
|
||||
nsCOMPtr<nsIInterfaceRequestor> mCallbacks;
|
||||
|
||||
nsHTTPRequest* mRequest;
|
||||
nsHTTPResponse* mResponse;
|
||||
nsIStreamListener* mResponseDataListener;
|
||||
nsHTTPRequest* mRequest;
|
||||
nsHTTPResponse* mResponse;
|
||||
nsIStreamListener* mResponseDataListener;
|
||||
|
||||
PRUint32 mLoadAttributes;
|
||||
PRUint32 mLoadAttributes;
|
||||
|
||||
nsCOMPtr<nsISupports> mResponseContext;
|
||||
nsCOMPtr<nsILoadGroup> mLoadGroup;
|
||||
nsCOMPtr<nsISupports> mResponseContext;
|
||||
nsCOMPtr<nsILoadGroup> mLoadGroup;
|
||||
|
||||
PRInt32 mContentLength;
|
||||
nsCString mContentType;
|
||||
nsCString mCharset;
|
||||
nsCOMPtr<nsISupports> mOwner;
|
||||
// Auth related stuff-
|
||||
/*
|
||||
If this is true then we have already tried
|
||||
prehost as a response to the server challenge.
|
||||
And so we need to throw a dialog box!
|
||||
*/
|
||||
PRBool mAuthTriedWithPrehost;
|
||||
PRBool mUsingProxy;
|
||||
PRInt32 mContentLength;
|
||||
nsCString mContentType;
|
||||
nsCString mCharset;
|
||||
nsCOMPtr<nsISupports> mOwner;
|
||||
// Auth related stuff-
|
||||
/*
|
||||
If this is true then we have already tried
|
||||
prehost as a response to the server challenge.
|
||||
And so we need to throw a dialog box!
|
||||
*/
|
||||
PRBool mAuthTriedWithPrehost;
|
||||
PRBool mUsingProxy;
|
||||
};
|
||||
|
||||
#endif /* _nsHTTPChannel_h_ */
|
||||
|
@ -31,7 +31,7 @@
|
||||
#include "nsIChannel.h"
|
||||
#include "nsISocketTransportService.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsICapabilities.h"
|
||||
#include "nsIInterfaceRequestor.h"
|
||||
#include "nsIHttpEventSink.h"
|
||||
#include "nsIFileStream.h"
|
||||
#include "nsIStringStream.h"
|
||||
@ -188,7 +188,7 @@ nsHTTPHandler::~nsHTTPHandler()
|
||||
NS_METHOD
|
||||
nsHTTPHandler::NewChannel(const char* verb, nsIURI* i_URL,
|
||||
nsILoadGroup* aLoadGroup,
|
||||
nsICapabilities* notificationCallbacks,
|
||||
nsIInterfaceRequestor* notificationCallbacks,
|
||||
nsLoadFlags loadAttributes,
|
||||
nsIURI* originalURI,
|
||||
nsIChannel **o_Instance)
|
||||
|
@ -83,7 +83,7 @@ public:
|
||||
|
||||
NS_IMETHOD NewChannel(const char* verb, nsIURI* url,
|
||||
nsILoadGroup* aLoadGroup,
|
||||
nsICapabilities* notificationCallbacks,
|
||||
nsIInterfaceRequestor* notificationCallbacks,
|
||||
nsLoadFlags loadAttributes,
|
||||
nsIURI* originalURI,
|
||||
nsIChannel **_retval);
|
||||
|
@ -126,7 +126,7 @@ nsJARChannel::Init(nsIJARProtocolHandler* aHandler,
|
||||
const char* command,
|
||||
nsIURI* uri,
|
||||
nsILoadGroup* aLoadGroup,
|
||||
nsICapabilities* notificationCallbacks,
|
||||
nsIInterfaceRequestor* notificationCallbacks,
|
||||
nsLoadFlags loadAttributes,
|
||||
nsIURI* originalURI)
|
||||
{
|
||||
@ -438,7 +438,7 @@ nsJARChannel::SetOwner(nsISupports* aOwner)
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsJARChannel::GetNotificationCallbacks(nsICapabilities* *aNotificationCallbacks)
|
||||
nsJARChannel::GetNotificationCallbacks(nsIInterfaceRequestor* *aNotificationCallbacks)
|
||||
{
|
||||
*aNotificationCallbacks = mCallbacks.get();
|
||||
NS_IF_ADDREF(*aNotificationCallbacks);
|
||||
@ -446,7 +446,7 @@ nsJARChannel::GetNotificationCallbacks(nsICapabilities* *aNotificationCallbacks)
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsJARChannel::SetNotificationCallbacks(nsICapabilities* aNotificationCallbacks)
|
||||
nsJARChannel::SetNotificationCallbacks(nsIInterfaceRequestor* aNotificationCallbacks)
|
||||
{
|
||||
mCallbacks = aNotificationCallbacks;
|
||||
return NS_OK;
|
||||
|
@ -69,7 +69,7 @@ public:
|
||||
const char* command,
|
||||
nsIURI* uri,
|
||||
nsILoadGroup* aLoadGroup,
|
||||
nsICapabilities* notificationCallbacks,
|
||||
nsIInterfaceRequestor* notificationCallbacks,
|
||||
nsLoadFlags loadAttributes,
|
||||
nsIURI* originalURI);
|
||||
|
||||
@ -80,7 +80,7 @@ protected:
|
||||
char* mCommand;
|
||||
nsCOMPtr<nsIJARURI> mURI;
|
||||
nsCOMPtr<nsILoadGroup> mLoadGroup;
|
||||
nsCOMPtr<nsICapabilities> mCallbacks;
|
||||
nsCOMPtr<nsIInterfaceRequestor> mCallbacks;
|
||||
nsCOMPtr<nsIURI> mOriginalURI;
|
||||
nsLoadFlags mLoadAttributes;
|
||||
nsCOMPtr<nsISupports> mOwner;
|
||||
|
@ -119,7 +119,7 @@ nsJARProtocolHandler::NewURI(const char *aSpec, nsIURI *aBaseURI,
|
||||
NS_IMETHODIMP
|
||||
nsJARProtocolHandler::NewChannel(const char* verb, nsIURI* uri,
|
||||
nsILoadGroup* aLoadGroup,
|
||||
nsICapabilities* notificationCallbacks,
|
||||
nsIInterfaceRequestor* notificationCallbacks,
|
||||
nsLoadFlags loadAttributes,
|
||||
nsIURI* originalURI,
|
||||
nsIChannel* *result)
|
||||
|
@ -154,7 +154,7 @@ nsKeywordProtocolHandler::NewURI(const char *aSpec, nsIURI *aBaseURI,
|
||||
NS_IMETHODIMP
|
||||
nsKeywordProtocolHandler::NewChannel(const char* verb, nsIURI* uri,
|
||||
nsILoadGroup* aLoadGroup,
|
||||
nsICapabilities* notificationCallbacks,
|
||||
nsIInterfaceRequestor* notificationCallbacks,
|
||||
nsLoadFlags loadAttributes,
|
||||
nsIURI* aOriginalURI,
|
||||
nsIChannel* *result)
|
||||
|
@ -284,7 +284,7 @@ MangleResourceIntoFileURL(const char* aResourceFileName)
|
||||
NS_IMETHODIMP
|
||||
nsResourceProtocolHandler::NewChannel(const char* verb, nsIURI* uri,
|
||||
nsILoadGroup* aLoadGroup,
|
||||
nsICapabilities* notificationCallbacks,
|
||||
nsIInterfaceRequestor* notificationCallbacks,
|
||||
nsLoadFlags loadAttributes,
|
||||
nsIURI* originalURI,
|
||||
nsIChannel* *result)
|
||||
|
@ -46,7 +46,7 @@
|
||||
#include "nsIURL.h"
|
||||
#include "nsIHTTPChannel.h"
|
||||
#include "nsIHttpEventSink.h"
|
||||
#include "nsICapabilities.h"
|
||||
#include "nsIInterfaceRequestor.h"
|
||||
#include "nsIDNSService.h"
|
||||
|
||||
#include "nsISimpleEnumerator.h"
|
||||
@ -463,7 +463,7 @@ InputTestConsumer::OnStopRequest(nsIChannel* channel,
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
class nsNotificationCallbacks : public nsICapabilities {
|
||||
class nsNotificationCallbacks : public nsIInterfaceRequestor {
|
||||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
@ -471,7 +471,7 @@ public:
|
||||
NS_INIT_REFCNT();
|
||||
}
|
||||
|
||||
NS_IMETHOD QueryCapability(const nsIID& eventSinkIID, void* *result) {
|
||||
NS_IMETHOD GetInterface(const nsIID& eventSinkIID, void* *result) {
|
||||
nsresult rv = NS_ERROR_FAILURE;
|
||||
|
||||
if (eventSinkIID.Equals(NS_GET_IID(nsIHTTPEventSink))) {
|
||||
@ -488,7 +488,7 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
NS_IMPL_ISUPPORTS1(nsNotificationCallbacks, nsICapabilities)
|
||||
NS_IMPL_ISUPPORTS1(nsNotificationCallbacks, nsIInterfaceRequestor)
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
@ -28,7 +28,7 @@
|
||||
#include "nsIInputStream.h"
|
||||
#include "nsIStreamListener.h"
|
||||
#include "nsILoadGroup.h"
|
||||
#include "nsICapabilities.h"
|
||||
#include "nsIInterfaceRequestor.h"
|
||||
#include "nsIChannel.h"
|
||||
#include "nsString.h"
|
||||
#include "nsIServiceManager.h"
|
||||
@ -53,19 +53,19 @@ NS_NewURI(nsIURI* *result, const nsString& spec, nsIURI* baseURI = nsnull);
|
||||
extern nsresult
|
||||
NS_OpenURI(nsIChannel* *result, nsIURI* uri,
|
||||
nsILoadGroup *aGroup = nsnull,
|
||||
nsICapabilities *notificationCallbacks = nsnull,
|
||||
nsIInterfaceRequestor *notificationCallbacks = nsnull,
|
||||
nsLoadFlags loadAttributes = nsIChannel::LOAD_NORMAL);
|
||||
|
||||
extern nsresult
|
||||
NS_OpenURI(nsIInputStream* *result, nsIURI* uri,
|
||||
nsILoadGroup *aGroup = nsnull,
|
||||
nsICapabilities *notificationCallbacks = nsnull,
|
||||
nsIInterfaceRequestor *notificationCallbacks = nsnull,
|
||||
nsLoadFlags loadAttributes = nsIChannel::LOAD_NORMAL);
|
||||
|
||||
extern nsresult
|
||||
NS_OpenURI(nsIStreamListener* aConsumer, nsISupports* context, nsIURI* uri,
|
||||
nsILoadGroup *aGroup = nsnull,
|
||||
nsICapabilities *notificationCallbacks = nsnull,
|
||||
nsIInterfaceRequestor *notificationCallbacks = nsnull,
|
||||
nsLoadFlags loadAttributes = nsIChannel::LOAD_NORMAL);
|
||||
|
||||
extern nsresult
|
||||
@ -88,7 +88,7 @@ NS_NewInputStreamChannel(nsIURI* uri,
|
||||
PRInt32 contentLength,
|
||||
nsIInputStream *inStr,
|
||||
nsILoadGroup *aGroup,
|
||||
nsICapabilities* notificationCallbacks,
|
||||
nsIInterfaceRequestor* notificationCallbacks,
|
||||
nsLoadFlags loadAttributes,
|
||||
nsIURI* originalURI,
|
||||
nsIChannel **result)
|
||||
|
@ -59,7 +59,7 @@ NS_NewURI(nsIURI* *result, const nsString& spec, nsIURI* baseURI)
|
||||
NECKO_EXPORT(nsresult)
|
||||
NS_OpenURI(nsIChannel* *result, nsIURI* uri,
|
||||
nsILoadGroup *aGroup,
|
||||
nsICapabilities *notificationCallbacks,
|
||||
nsIInterfaceRequestor *notificationCallbacks,
|
||||
nsLoadFlags loadAttributes)
|
||||
{
|
||||
nsresult rv;
|
||||
@ -78,7 +78,7 @@ NS_OpenURI(nsIChannel* *result, nsIURI* uri,
|
||||
NECKO_EXPORT(nsresult)
|
||||
NS_OpenURI(nsIInputStream* *result, nsIURI* uri,
|
||||
nsILoadGroup *aGroup,
|
||||
nsICapabilities *notificationCallbacks,
|
||||
nsIInterfaceRequestor *notificationCallbacks,
|
||||
nsLoadFlags loadAttributes)
|
||||
{
|
||||
nsresult rv;
|
||||
@ -99,7 +99,7 @@ NS_OpenURI(nsIInputStream* *result, nsIURI* uri,
|
||||
NECKO_EXPORT(nsresult)
|
||||
NS_OpenURI(nsIStreamListener* aConsumer, nsISupports* context, nsIURI* uri,
|
||||
nsILoadGroup *aGroup,
|
||||
nsICapabilities *notificationCallbacks,
|
||||
nsIInterfaceRequestor *notificationCallbacks,
|
||||
nsLoadFlags loadAttributes)
|
||||
{
|
||||
nsresult rv;
|
||||
|
@ -126,7 +126,7 @@ nsChromeProtocolHandler::NewURI(const char *aSpec, nsIURI *aBaseURI,
|
||||
NS_IMETHODIMP
|
||||
nsChromeProtocolHandler::NewChannel(const char* verb, nsIURI* uri,
|
||||
nsILoadGroup* aLoadGroup,
|
||||
nsICapabilities* notificationCallbacks,
|
||||
nsIInterfaceRequestor* notificationCallbacks,
|
||||
nsLoadFlags loadAttributes,
|
||||
nsIURI* originalURI,
|
||||
nsIChannel* *result)
|
||||
|
@ -1140,7 +1140,7 @@ nsresult nsDocumentBindInfo::Bind(nsIURI* aURL,
|
||||
nsresult rv = NS_OK;
|
||||
|
||||
// XXXbe this knows that m_Container implements nsIWebShell
|
||||
nsCOMPtr<nsICapabilities> capabilities = do_QueryInterface(m_Container);
|
||||
nsCOMPtr<nsIInterfaceRequestor> capabilities = do_QueryInterface(m_Container);
|
||||
nsCOMPtr<nsIChannel> channel;
|
||||
rv = NS_OpenURI(getter_AddRefs(channel), aURL, aLoadGroup, capabilities);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
@ -28,7 +28,7 @@
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsIStreamListener.h"
|
||||
#include "nsIChannel.h"
|
||||
#include "nsICapabilities.h"
|
||||
#include "nsIInterfaceRequestor.h"
|
||||
#include "nsIProgressEventSink.h"
|
||||
|
||||
#include "nsIStreamConverterService.h"
|
||||
@ -44,7 +44,7 @@ static NS_DEFINE_CID(kStreamConverterServiceCID, NS_STREAMCONVERTERSERVICE_CID);
|
||||
// mscott - i ripped this event sink getter class off of the one in the old
|
||||
// webshell doc loader...
|
||||
|
||||
class nsUriLoaderCapabilities : public nsICapabilities {
|
||||
class nsUriLoaderCapabilities : public nsIInterfaceRequestor {
|
||||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
@ -55,7 +55,7 @@ public:
|
||||
|
||||
virtual ~nsUriLoaderCapabilities() {};
|
||||
|
||||
NS_IMETHOD QueryCapability(const nsIID& anIID, void** aSink) {
|
||||
NS_IMETHOD GetInterface(const nsIID& anIID, void** aSink) {
|
||||
if (mProgressEventSink) {
|
||||
return mProgressEventSink->QueryInterface(anIID, aSink);
|
||||
}
|
||||
@ -65,7 +65,7 @@ private:
|
||||
nsCOMPtr<nsIProgressEventSink> mProgressEventSink;
|
||||
};
|
||||
|
||||
NS_IMPL_ISUPPORTS1(nsUriLoaderCapabilities, nsICapabilities);
|
||||
NS_IMPL_ISUPPORTS1(nsUriLoaderCapabilities, nsIInterfaceRequestor);
|
||||
|
||||
/*
|
||||
* The nsDocumentOpenInfo contains the state required when a single document
|
||||
@ -145,7 +145,7 @@ nsresult nsDocumentOpenInfo::Open(nsIURI *aURI,
|
||||
|
||||
// turn the arguments we received into something we can pass into NewChannelFromURI:
|
||||
// that means turning the progress event sink into an event sink getter...
|
||||
nsCOMPtr<nsICapabilities> notificationCallbacks = new nsUriLoaderCapabilities(aProgressEventSink);
|
||||
nsCOMPtr<nsIInterfaceRequestor> notificationCallbacks = new nsUriLoaderCapabilities(aProgressEventSink);
|
||||
// and get the load group out of the open context
|
||||
nsCOMPtr<nsILoadGroup> aLoadGroup = do_QueryInterface(aOpenContext);
|
||||
if (!aLoadGroup)
|
||||
|
@ -24,7 +24,7 @@
|
||||
|
||||
#include "nsweb.h"
|
||||
#include "prtypes.h"
|
||||
#include "nsICapabilities.h"
|
||||
#include "nsISupports.h"
|
||||
|
||||
class nsIContentViewer;
|
||||
class nsIURI;
|
||||
@ -38,7 +38,7 @@ class nsIChannel;
|
||||
* The primary container interface for objects that can contain
|
||||
* implementations of nsIContentViewer.
|
||||
*/
|
||||
class nsIContentViewerContainer : public nsICapabilities
|
||||
class nsIContentViewerContainer : public nsISupports
|
||||
{
|
||||
public:
|
||||
static const nsIID& GetIID() { static nsIID iid = NS_ICONTENT_VIEWER_CONTAINER_IID; return iid; }
|
||||
|
@ -1140,7 +1140,7 @@ nsresult nsDocumentBindInfo::Bind(nsIURI* aURL,
|
||||
nsresult rv = NS_OK;
|
||||
|
||||
// XXXbe this knows that m_Container implements nsIWebShell
|
||||
nsCOMPtr<nsICapabilities> capabilities = do_QueryInterface(m_Container);
|
||||
nsCOMPtr<nsIInterfaceRequestor> capabilities = do_QueryInterface(m_Container);
|
||||
nsCOMPtr<nsIChannel> channel;
|
||||
rv = NS_OpenURI(getter_AddRefs(channel), aURL, aLoadGroup, capabilities);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
@ -170,7 +170,6 @@ public:
|
||||
|
||||
// nsISupports
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NSICAPABILITIES
|
||||
|
||||
NS_DECL_NSIURICONTENTLISTENER
|
||||
|
||||
@ -802,15 +801,8 @@ NS_IMPL_QUERY_HEAD(nsWebShell)
|
||||
NS_IMPL_QUERY_BODY(nsIClipboardCommands)
|
||||
NS_IMPL_QUERY_BODY(nsIInterfaceRequestor)
|
||||
NS_IMPL_QUERY_BODY(nsIURIContentListener)
|
||||
NS_IMPL_QUERY_BODY(nsICapabilities)
|
||||
NS_IMPL_QUERY_TAIL(nsIWebShell)
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsWebShell::QueryCapability(const nsIID &aIID, void** aInstancePtr)
|
||||
{
|
||||
return GetInterface(aIID, aInstancePtr);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsWebShell::GetInterface(const nsIID &aIID, void** aInstancePtr)
|
||||
{
|
||||
|
@ -4,4 +4,3 @@ nsIEnumerator.idl
|
||||
nsIObserver.idl
|
||||
nsIObserverService.idl
|
||||
nsISupportsArray.idl
|
||||
nsICapabilities.idl
|
||||
|
@ -102,7 +102,6 @@ XPIDLSRCS = \
|
||||
nsIObserverService.idl \
|
||||
nsISupportsArray.idl \
|
||||
nsISupportsPrimitives.idl \
|
||||
nsICapabilities.idl \
|
||||
$(NULL)
|
||||
|
||||
EXPORTS := $(addprefix $(srcdir)/, $(EXPORTS))
|
||||
|
@ -68,7 +68,6 @@ XPIDLSRCS = \
|
||||
.\nsIObserverService.idl \
|
||||
.\nsISupportsArray.idl \
|
||||
.\nsISupportsPrimitives.idl \
|
||||
.\nsICapabilities.idl \
|
||||
$(NULL)
|
||||
|
||||
################################################################################
|
||||
|
@ -36,7 +36,7 @@ NS_IMETHODIMP
|
||||
nsAbout::NewChannel(const char *verb,
|
||||
nsIURI *aURI,
|
||||
nsILoadGroup* aLoadGroup,
|
||||
nsICapabilities* notificationCallbacks,
|
||||
nsIInterfaceRequestor* notificationCallbacks,
|
||||
nsLoadFlags loadAttributes,
|
||||
nsIURI* originalURI,
|
||||
nsIChannel **result)
|
||||
|
@ -321,7 +321,7 @@ nsStreamXferOp::OnStartRequest(nsIChannel* channel, nsISupports* aContext) {
|
||||
|
||||
// As an event sink getter, we get ourself.
|
||||
NS_IMETHODIMP
|
||||
nsStreamXferOp::QueryCapability(const nsIID &anIID, void **aResult ) {
|
||||
nsStreamXferOp::GetInterface(const nsIID &anIID, void **aResult ) {
|
||||
return this->QueryInterface( anIID, (void**)aResult );
|
||||
}
|
||||
|
||||
@ -510,8 +510,8 @@ nsStreamXferOp::QueryInterface( REFNSIID aIID, void** aInstancePtr ) {
|
||||
NS_ADDREF_THIS();
|
||||
return NS_OK;
|
||||
}
|
||||
if (aIID.Equals(nsCOMTypeInfo<nsICapabilities>::GetIID())) {
|
||||
*aInstancePtr = (void*) ((nsICapabilities*)this);
|
||||
if (aIID.Equals(nsCOMTypeInfo<nsIInterfaceRequestor>::GetIID())) {
|
||||
*aInstancePtr = (void*) ((nsIInterfaceRequestor*)this);
|
||||
NS_ADDREF_THIS();
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -23,7 +23,7 @@
|
||||
#define __nsStreamXferOp_h
|
||||
|
||||
#include "nsIStreamTransferOperation.h"
|
||||
#include "nsICapabilities.h"
|
||||
#include "nsIInterfaceRequestor.h"
|
||||
#include "nsIProgressEventSink.h"
|
||||
#include "nsIStreamListener.h"
|
||||
#include "nsIChannel.h"
|
||||
@ -43,7 +43,7 @@ class nsIDOMWindow;
|
||||
// should get called when the dialog closes.
|
||||
//
|
||||
class nsStreamXferOp : public nsIStreamTransferOperation,
|
||||
public nsICapabilities,
|
||||
public nsIInterfaceRequestor,
|
||||
public nsIProgressEventSink,
|
||||
public nsIStreamListener {
|
||||
public:
|
||||
@ -59,8 +59,8 @@ public:
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NSISTREAMTRANSFEROPERATION
|
||||
|
||||
// nsICapabilities methods:
|
||||
NS_DECL_NSICAPABILITIES
|
||||
// nsIInterfaceRequestor methods:
|
||||
NS_DECL_NSIINTERFACEREQUESTOR
|
||||
|
||||
// nsIProgressEventSink methods:
|
||||
NS_DECL_NSIPROGRESSEVENTSINK
|
||||
|
@ -107,8 +107,8 @@ nsXPInstallManager::QueryInterface(REFNSIID aIID,void** aInstancePtr)
|
||||
*aInstancePtr = NS_STATIC_CAST(nsIXULWindowCallbacks*,this);
|
||||
else if (aIID.Equals(nsIProgressEventSink::GetIID()))
|
||||
*aInstancePtr = NS_STATIC_CAST(nsIProgressEventSink*,this);
|
||||
else if (aIID.Equals(nsICapabilities::GetIID()))
|
||||
*aInstancePtr = NS_STATIC_CAST(nsICapabilities*,this);
|
||||
else if (aIID.Equals(nsIInterfaceRequestor::GetIID()))
|
||||
*aInstancePtr = NS_STATIC_CAST(nsIInterfaceRequestor*,this);
|
||||
else if (aIID.Equals(kISupportsIID))
|
||||
*aInstancePtr = NS_STATIC_CAST( nsISupports*, NS_STATIC_CAST(nsIXPINotifier*,this));
|
||||
else
|
||||
@ -474,9 +474,9 @@ nsXPInstallManager::OnStatus(nsIChannel *channel, nsISupports *ctxt, const PRUni
|
||||
return mProxy->SetActionText(aMsg);
|
||||
}
|
||||
|
||||
// nsICapabilities method
|
||||
// nsIInterfaceRequestor method
|
||||
NS_IMETHODIMP
|
||||
nsXPInstallManager::QueryCapability(const nsIID & eventSinkIID, void* *_retval)
|
||||
nsXPInstallManager::GetInterface(const nsIID & eventSinkIID, void* *_retval)
|
||||
{
|
||||
return QueryInterface(eventSinkIID, (void**)_retval);
|
||||
}
|
||||
|
@ -46,14 +46,14 @@
|
||||
#include "nsIWebShellWindow.h"
|
||||
#include "nsIXULWindowCallbacks.h"
|
||||
#include "nsIProgressEventSink.h"
|
||||
#include "nsICapabilities.h"
|
||||
#include "nsIInterfaceRequestor.h"
|
||||
|
||||
|
||||
|
||||
class nsXPInstallManager : public nsIXPINotifier,
|
||||
public nsIStreamListener,
|
||||
public nsIProgressEventSink,
|
||||
public nsICapabilities,
|
||||
public nsIInterfaceRequestor,
|
||||
public nsIXULWindowCallbacks
|
||||
{
|
||||
public:
|
||||
@ -76,8 +76,8 @@ class nsXPInstallManager : public nsIXPINotifier,
|
||||
// nsIProgressEventSink
|
||||
NS_DECL_NSIPROGRESSEVENTSINK
|
||||
|
||||
// nsICapabilities
|
||||
NS_DECL_NSICAPABILITIES
|
||||
// nsIInterfaceRequestor
|
||||
NS_DECL_NSIINTERFACEREQUESTOR
|
||||
|
||||
// IXULWindowCallbacks methods
|
||||
NS_IMETHOD ConstructBeforeJavaScript(nsIWebShell *aWebShell);
|
||||
|
Loading…
Reference in New Issue
Block a user