From 03b9d2d6cb00f4ea99ad7d51dd7837b7358604d5 Mon Sep 17 00:00:00 2001 From: "valeski%netscape.com" Date: Fri, 3 Sep 1999 23:51:14 +0000 Subject: [PATCH] changed nsCOMTypeInfo<> template to NS_GET_IID macro --- netwerk/base/src/nsAsyncStreamListener.cpp | 2 +- netwerk/base/src/nsIOService.cpp | 6 ++--- netwerk/base/src/nsInputStreamChannel.cpp | 2 +- netwerk/base/src/nsLoadGroup.cpp | 6 ++--- netwerk/base/src/nsNetModRegEntry.cpp | 6 ++--- netwerk/base/src/nsNetModuleMgr.cpp | 8 +++---- netwerk/base/src/nsSocketTransport.cpp | 8 +++---- netwerk/base/src/nsSocketTransportService.cpp | 6 ++--- netwerk/base/src/nsStdURL.cpp | 6 ++--- netwerk/base/src/nsSyncStreamListener.cpp | 6 ++--- netwerk/mime/src/nsMIMEInfoImpl.cpp | 2 +- netwerk/mime/src/nsMIMEService.cpp | 4 ++-- netwerk/mime/src/nsMIMEServiceFactory.cpp | 4 ++-- netwerk/protocol/about/src/nsAboutBlank.cpp | 2 +- netwerk/protocol/data/src/nsDataChannel.cpp | 6 ++--- .../file/src/nsDirectoryIndexStream.cpp | 6 ++--- netwerk/protocol/file/src/nsFileChannel.cpp | 24 +++++++++---------- .../file/src/nsFileProtocolHandler.cpp | 6 ++--- netwerk/protocol/ftp/src/nsFTPChannel.cpp | 14 +++++------ .../ftp/src/nsFtpConnectionThread.cpp | 16 ++++++------- .../protocol/ftp/src/nsFtpProtocolHandler.cpp | 6 ++--- netwerk/protocol/http/src/nsBasicAuth.cpp | 2 +- netwerk/protocol/http/src/nsHTTPChannel.cpp | 8 +++---- netwerk/protocol/http/src/nsHTTPHandler.cpp | 12 +++++----- .../http/src/nsHTTPHandlerFactory.cpp | 2 +- .../protocol/http/src/nsHTTPHeaderArray.cpp | 4 ++-- netwerk/protocol/http/src/nsHTTPRequest.cpp | 8 +++---- netwerk/protocol/http/src/nsHTTPResponse.cpp | 2 +- .../http/src/nsHTTPResponseListener.cpp | 2 +- .../src/nsResourceProtocolHandler.cpp | 8 +++---- .../socket/base/nsSocketProviderService.cpp | 2 +- netwerk/util/src/nsNetStreamLoader.cpp | 2 +- uriloader/exthandler/nsMIMEInfoImpl.cpp | 2 +- 33 files changed, 100 insertions(+), 100 deletions(-) diff --git a/netwerk/base/src/nsAsyncStreamListener.cpp b/netwerk/base/src/nsAsyncStreamListener.cpp index 63623a27932..37ff738c8ef 100644 --- a/netwerk/base/src/nsAsyncStreamListener.cpp +++ b/netwerk/base/src/nsAsyncStreamListener.cpp @@ -176,7 +176,7 @@ nsAsyncStreamObserver::~nsAsyncStreamObserver() } NS_IMPL_THREADSAFE_ISUPPORTS(nsAsyncStreamObserver, - nsCOMTypeInfo::GetIID()); + NS_GET_IID(nsIStreamObserver)); NS_IMPL_ISUPPORTS_INHERITED(nsAsyncStreamListener, nsAsyncStreamObserver, diff --git a/netwerk/base/src/nsIOService.cpp b/netwerk/base/src/nsIOService.cpp index b7438013b12..90515b631ad 100644 --- a/netwerk/base/src/nsIOService.cpp +++ b/netwerk/base/src/nsIOService.cpp @@ -111,7 +111,7 @@ nsIOService::Create(nsISupports *aOuter, REFNSIID aIID, void **aResult) return rv; } -NS_IMPL_ISUPPORTS(nsIOService, nsCOMTypeInfo::GetIID()); +NS_IMPL_ISUPPORTS(nsIOService, NS_GET_IID(nsIIOService)); //////////////////////////////////////////////////////////////////////////////// @@ -389,7 +389,7 @@ nsIOService::NewLoadGroup(nsISupports* outer, nsIStreamObserver* observer, { nsresult rv; nsILoadGroup* group; - rv = nsLoadGroup::Create(outer, nsCOMTypeInfo::GetIID(), + rv = nsLoadGroup::Create(outer, NS_GET_IID(nsILoadGroup), (void**)&group); if (NS_FAILED(rv)) return rv; @@ -409,7 +409,7 @@ nsIOService::NewInputStreamChannel(nsIURI* uri, const char *contentType, { nsresult rv; nsInputStreamChannel* channel; - rv = nsInputStreamChannel::Create(nsnull, nsCOMTypeInfo::GetIID(), + rv = nsInputStreamChannel::Create(nsnull, NS_GET_IID(nsIChannel), (void**)&channel); if (NS_FAILED(rv)) return rv; rv = channel->Init(uri, contentType, inStr); diff --git a/netwerk/base/src/nsInputStreamChannel.cpp b/netwerk/base/src/nsInputStreamChannel.cpp index 654bddd18dd..4486f3d52ba 100644 --- a/netwerk/base/src/nsInputStreamChannel.cpp +++ b/netwerk/base/src/nsInputStreamChannel.cpp @@ -71,7 +71,7 @@ nsInputStreamChannel::Init(nsIURI* uri, const char* contentType, return NS_OK; } -NS_IMPL_ISUPPORTS(nsInputStreamChannel, nsCOMTypeInfo::GetIID()); +NS_IMPL_ISUPPORTS(nsInputStreamChannel, NS_GET_IID(nsIChannel)); //////////////////////////////////////////////////////////////////////////////// // nsIRequest methods: diff --git a/netwerk/base/src/nsLoadGroup.cpp b/netwerk/base/src/nsLoadGroup.cpp index e85ef8cf55b..a8647641c8a 100644 --- a/netwerk/base/src/nsLoadGroup.cpp +++ b/netwerk/base/src/nsLoadGroup.cpp @@ -137,9 +137,9 @@ nsLoadGroup::AggregatedQueryInterface(const nsIID& aIID, void** aInstancePtr) if (aIID.Equals(NS_GET_IID(nsISupports))) *aInstancePtr = GetInner(); else if (aIID.Equals(kLoadGroupCID) || // for internal use only (to set parent) - aIID.Equals(nsCOMTypeInfo::GetIID()) || - aIID.Equals(nsCOMTypeInfo::GetIID()) || - aIID.Equals(nsCOMTypeInfo::GetIID())) + aIID.Equals(NS_GET_IID(nsILoadGroup)) || + aIID.Equals(NS_GET_IID(nsIRequest)) || + aIID.Equals(NS_GET_IID(nsISupports))) *aInstancePtr = NS_STATIC_CAST(nsILoadGroup*, this); else { *aInstancePtr = nsnull; diff --git a/netwerk/base/src/nsNetModRegEntry.cpp b/netwerk/base/src/nsNetModRegEntry.cpp index ad0bf5db39c..674e78024a7 100644 --- a/netwerk/base/src/nsNetModRegEntry.cpp +++ b/netwerk/base/src/nsNetModRegEntry.cpp @@ -31,7 +31,7 @@ static NS_DEFINE_IID(kEventQueueServiceCID, NS_EVENTQUEUESERVICE_CID); ////////////////////////////// //// nsISupports ////////////////////////////// -NS_IMPL_ISUPPORTS(nsNetModRegEntry, nsCOMTypeInfo::GetIID()); +NS_IMPL_ISUPPORTS(nsNetModRegEntry, NS_GET_IID(nsINetModRegEntry)); ////////////////////////////// @@ -118,14 +118,14 @@ nsNetModRegEntry::nsNetModRegEntry(const char *aTopic, if (NS_FAILED(*result)) return; *result = proxyManager->GetProxyObject( mEventQ, - nsCOMTypeInfo::GetIID(), + NS_GET_IID(nsINetNotify), aNotify, PROXY_SYNC | PROXY_ALWAYS, getter_AddRefs(mSyncProxy)); if (NS_FAILED(*result)) return; *result = proxyManager->GetProxyObject( mEventQ, - nsCOMTypeInfo::GetIID(), + NS_GET_IID(nsINetNotify), aNotify, PROXY_ASYNC | PROXY_ALWAYS, getter_AddRefs(mAsyncProxy)); diff --git a/netwerk/base/src/nsNetModuleMgr.cpp b/netwerk/base/src/nsNetModuleMgr.cpp index 63b32aa3787..635418d0a6f 100644 --- a/netwerk/base/src/nsNetModuleMgr.cpp +++ b/netwerk/base/src/nsNetModuleMgr.cpp @@ -34,7 +34,7 @@ static PRBool DeleteEntry(nsISupports *aElement, void *aData) { //// nsISupports /////////////////////////////////// -NS_IMPL_ISUPPORTS(nsNetModuleMgr, nsCOMTypeInfo::GetIID()); +NS_IMPL_ISUPPORTS(nsNetModuleMgr, NS_GET_IID(nsINetModuleMgr)); /////////////////////////////////// @@ -59,7 +59,7 @@ nsNetModuleMgr::RegisterModule(const char *aTopic, nsINetNotify *aNotify) if (NS_FAILED(rv)) return rv; - rv = newEntry->QueryInterface(nsCOMTypeInfo::GetIID(), getter_AddRefs(newEntryI)); + rv = newEntry->QueryInterface(NS_GET_IID(nsINetModRegEntry), getter_AddRefs(newEntryI)); if (NS_FAILED(rv)) return rv; // Check for a previous registration @@ -101,7 +101,7 @@ nsNetModuleMgr::UnregisterModule(const char *aTopic, nsINetNotify *aNotify) if (NS_FAILED(rv)) return rv; - rv = tmpEntry->QueryInterface(nsCOMTypeInfo::GetIID(), getter_AddRefs(tmpEntryI)); + rv = tmpEntry->QueryInterface(NS_GET_IID(nsINetModRegEntry), getter_AddRefs(tmpEntryI)); if (NS_FAILED(rv)) return rv; mEntries->Count(&cnt); @@ -180,7 +180,7 @@ nsNetModuleMgr::EnumerateModules(const char *aTopic, nsISimpleEnumerator **aEnum return NS_ERROR_OUT_OF_MEMORY; } - rv = arrEnum->QueryInterface(nsCOMTypeInfo::GetIID(), (void**)&outEnum); + rv = arrEnum->QueryInterface(NS_GET_IID(nsISimpleEnumerator), (void**)&outEnum); if (NS_FAILED(rv)) { delete arrEnum; return rv; diff --git a/netwerk/base/src/nsSocketTransport.cpp b/netwerk/base/src/nsSocketTransport.cpp index c3de63cffb7..c02423d55d1 100644 --- a/netwerk/base/src/nsSocketTransport.cpp +++ b/netwerk/base/src/nsSocketTransport.cpp @@ -1140,20 +1140,20 @@ nsSocketTransport::QueryInterface(const nsIID& aIID, void* *aInstancePtr) if (NULL == aInstancePtr) { return NS_ERROR_NULL_POINTER; } - if (aIID.Equals(nsCOMTypeInfo::GetIID()) || - aIID.Equals(nsCOMTypeInfo::GetIID())) { + if (aIID.Equals(NS_GET_IID(nsIChannel)) || + aIID.Equals(NS_GET_IID(nsISupports))) { *aInstancePtr = NS_STATIC_CAST(nsIChannel*, this); NS_ADDREF_THIS(); return NS_OK; } #ifndef NSPIPE2 - if (aIID.Equals(nsCOMTypeInfo::GetIID())) { + if (aIID.Equals(NS_GET_IID(nsIBufferObserver))) { *aInstancePtr = NS_STATIC_CAST(nsIBufferObserver*, this); NS_ADDREF_THIS(); return NS_OK; } #else - if (aIID.Equals(nsCOMTypeInfo::GetIID())) { + if (aIID.Equals(NS_GET_IID(nsIPipeObserver))) { *aInstancePtr = NS_STATIC_CAST(nsIPipeObserver*, this); NS_ADDREF_THIS(); return NS_OK; diff --git a/netwerk/base/src/nsSocketTransportService.cpp b/netwerk/base/src/nsSocketTransportService.cpp index 605b9986994..4d838b73314 100644 --- a/netwerk/base/src/nsSocketTransportService.cpp +++ b/netwerk/base/src/nsSocketTransportService.cpp @@ -342,13 +342,13 @@ nsSocketTransportService::QueryInterface(const nsIID& aIID, void* *aInstancePtr) if (NULL == aInstancePtr) { return NS_ERROR_NULL_POINTER; } - if (aIID.Equals(nsCOMTypeInfo::GetIID()) || - aIID.Equals(nsCOMTypeInfo::GetIID())) { + if (aIID.Equals(NS_GET_IID(nsISocketTransportService)) || + aIID.Equals(NS_GET_IID(nsISupports))) { *aInstancePtr = NS_STATIC_CAST(nsISocketTransportService*, this); NS_ADDREF_THIS(); return NS_OK; } - if (aIID.Equals(nsCOMTypeInfo::GetIID())) { + if (aIID.Equals(NS_GET_IID(nsIRunnable))) { *aInstancePtr = NS_STATIC_CAST(nsIRunnable*, this); NS_ADDREF_THIS(); return NS_OK; diff --git a/netwerk/base/src/nsStdURL.cpp b/netwerk/base/src/nsStdURL.cpp index f6db0063a51..a3ddc93e9ff 100644 --- a/netwerk/base/src/nsStdURL.cpp +++ b/netwerk/base/src/nsStdURL.cpp @@ -124,11 +124,11 @@ nsStdURL::AggregatedQueryInterface(const nsIID& aIID, void** aInstancePtr) if(!aInstancePtr) return NS_ERROR_INVALID_POINTER; - if (aIID.Equals(nsCOMTypeInfo::GetIID())) + if (aIID.Equals(NS_GET_IID(nsISupports))) *aInstancePtr = GetInner(); else if (aIID.Equals(kThisStdURLImplementationCID) || // used by Equals - aIID.Equals(nsCOMTypeInfo::GetIID()) || - aIID.Equals(nsCOMTypeInfo::GetIID())) + aIID.Equals(NS_GET_IID(nsIURL)) || + aIID.Equals(NS_GET_IID(nsIURI))) *aInstancePtr = NS_STATIC_CAST(nsIURL*, this); else { *aInstancePtr = nsnull; diff --git a/netwerk/base/src/nsSyncStreamListener.cpp b/netwerk/base/src/nsSyncStreamListener.cpp index 9f8ca16b7e2..1e36bf63b07 100644 --- a/netwerk/base/src/nsSyncStreamListener.cpp +++ b/netwerk/base/src/nsSyncStreamListener.cpp @@ -82,9 +82,9 @@ NS_IMETHODIMP nsSyncStreamListener::QueryInterface(const nsIID& aIID, void** aInstancePtr) { NS_ASSERTION(aInstancePtr, "no instance pointer"); - if (aIID.Equals(nsCOMTypeInfo::GetIID()) || - aIID.Equals(nsCOMTypeInfo::GetIID()) || - aIID.Equals(nsCOMTypeInfo::GetIID())) { + if (aIID.Equals(NS_GET_IID(nsIStreamListener)) || + aIID.Equals(NS_GET_IID(nsIStreamObserver)) || + aIID.Equals(NS_GET_IID(nsISupports))) { *aInstancePtr = NS_STATIC_CAST(nsIStreamListener*, this); NS_ADDREF_THIS(); return NS_OK; diff --git a/netwerk/mime/src/nsMIMEInfoImpl.cpp b/netwerk/mime/src/nsMIMEInfoImpl.cpp index 5df0ad1ad85..59b12794254 100644 --- a/netwerk/mime/src/nsMIMEInfoImpl.cpp +++ b/netwerk/mime/src/nsMIMEInfoImpl.cpp @@ -21,7 +21,7 @@ // nsISupports methods -NS_IMPL_ISUPPORTS(nsMIMEInfoImpl, nsCOMTypeInfo::GetIID()); +NS_IMPL_ISUPPORTS(nsMIMEInfoImpl, NS_GET_IID(nsIMIMEInfo)); // nsMIMEInfoImpl methods nsMIMEInfoImpl::nsMIMEInfoImpl(const char *aMIMEType, const char *aFileExtensions, const char *aDescription) { diff --git a/netwerk/mime/src/nsMIMEService.cpp b/netwerk/mime/src/nsMIMEService.cpp index 6a4d7bc3787..38a849a523b 100644 --- a/netwerk/mime/src/nsMIMEService.cpp +++ b/netwerk/mime/src/nsMIMEService.cpp @@ -38,7 +38,7 @@ PRBool FindMIMEType(nsHashKey *aKey, void *aData, void* closure) { // nsISupports methods -NS_IMPL_ISUPPORTS(nsMIMEService, nsCOMTypeInfo::GetIID()); +NS_IMPL_ISUPPORTS(nsMIMEService, NS_GET_IID(nsIMIMEService)); // nsMIMEService methods @@ -226,7 +226,7 @@ nsMIMEService::GetTypeFromURI(nsIURI *aURI, char **aContentType) { // first try to get a url out of the uri so we can skip post // filename stuff (i.e. query string) nsIURL *url = nsnull; - rv = aURI->QueryInterface(nsCOMTypeInfo::GetIID(), (void**)&url); + rv = aURI->QueryInterface(NS_GET_IID(nsIURL), (void**)&url); if (NS_SUCCEEDED(rv)) { rv = url->GetFileName(&cStrSpec); NS_RELEASE(url); diff --git a/netwerk/mime/src/nsMIMEServiceFactory.cpp b/netwerk/mime/src/nsMIMEServiceFactory.cpp index 30bf726f955..44c08913686 100644 --- a/netwerk/mime/src/nsMIMEServiceFactory.cpp +++ b/netwerk/mime/src/nsMIMEServiceFactory.cpp @@ -64,7 +64,7 @@ nsMIMEServiceFactory::QueryInterface(const nsIID &aIID, void **aResult) // Always NULL result, in case of failure *aResult = nsnull; - if (aIID.Equals(nsCOMTypeInfo::GetIID())) { + if (aIID.Equals(NS_GET_IID(nsISupports))) { *aResult = NS_STATIC_CAST(nsISupports*, this); AddRef(); return NS_OK; @@ -98,7 +98,7 @@ nsMIMEServiceFactory::CreateInstance(nsISupports *aOuter, if (mClassID.Equals(kMIMEServiceCID)) { nsMIMEService *MIMEService = new nsMIMEService(); if (!MIMEService) return NS_ERROR_OUT_OF_MEMORY; - MIMEService->QueryInterface(nsCOMTypeInfo::GetIID(), (void**)&inst); + MIMEService->QueryInterface(NS_GET_IID(nsISupports), (void**)&inst); } else { return NS_ERROR_NO_INTERFACE; diff --git a/netwerk/protocol/about/src/nsAboutBlank.cpp b/netwerk/protocol/about/src/nsAboutBlank.cpp index 1fb98448f57..56c947d970a 100644 --- a/netwerk/protocol/about/src/nsAboutBlank.cpp +++ b/netwerk/protocol/about/src/nsAboutBlank.cpp @@ -23,7 +23,7 @@ static NS_DEFINE_CID(kIOServiceCID, NS_IOSERVICE_CID); -NS_IMPL_ISUPPORTS(nsAboutBlank, nsCOMTypeInfo::GetIID()); +NS_IMPL_ISUPPORTS(nsAboutBlank, NS_GET_IID(nsIAboutModule)); static const char kBlankPage[] = ""; diff --git a/netwerk/protocol/data/src/nsDataChannel.cpp b/netwerk/protocol/data/src/nsDataChannel.cpp index b3274c89c0d..4a63da3ba8b 100644 --- a/netwerk/protocol/data/src/nsDataChannel.cpp +++ b/netwerk/protocol/data/src/nsDataChannel.cpp @@ -51,9 +51,9 @@ NS_IMPL_RELEASE(nsDataChannel); NS_IMETHODIMP nsDataChannel::QueryInterface(const nsIID& aIID, void** aInstancePtr) { NS_ASSERTION(aInstancePtr, "no instance pointer"); - if (aIID.Equals(nsCOMTypeInfo::GetIID()) || - aIID.Equals(nsCOMTypeInfo::GetIID()) || - aIID.Equals(nsCOMTypeInfo::GetIID()) ) { + if (aIID.Equals(NS_GET_IID(nsIDataChannel)) || + aIID.Equals(NS_GET_IID(nsIChannel)) || + aIID.Equals(NS_GET_IID(nsISupports)) ) { *aInstancePtr = NS_STATIC_CAST(nsIDataChannel*, this); NS_ADDREF_THIS(); return NS_OK; diff --git a/netwerk/protocol/file/src/nsDirectoryIndexStream.cpp b/netwerk/protocol/file/src/nsDirectoryIndexStream.cpp index b243cdaccd3..9938c1c9f2b 100644 --- a/netwerk/protocol/file/src/nsDirectoryIndexStream.cpp +++ b/netwerk/protocol/file/src/nsDirectoryIndexStream.cpp @@ -92,9 +92,9 @@ nsDirectoryIndexStream::QueryInterface(REFNSIID aIID, void** aResult) if (! aResult) return NS_ERROR_NULL_POINTER; - if (aIID.Equals(nsCOMTypeInfo::GetIID()) || - aIID.Equals(nsCOMTypeInfo::GetIID()) || - aIID.Equals(nsCOMTypeInfo::GetIID())) { + if (aIID.Equals(NS_GET_IID(nsIInputStream)) || + aIID.Equals(NS_GET_IID(nsIBaseStream)) || + aIID.Equals(NS_GET_IID(nsISupports))) { *aResult = NS_STATIC_CAST(nsIInputStream*, this); NS_ADDREF(this); return NS_OK; diff --git a/netwerk/protocol/file/src/nsFileChannel.cpp b/netwerk/protocol/file/src/nsFileChannel.cpp index 14d1a4ef9c4..a919b84cbb7 100644 --- a/netwerk/protocol/file/src/nsFileChannel.cpp +++ b/netwerk/protocol/file/src/nsFileChannel.cpp @@ -112,7 +112,7 @@ nsFileChannel::Init(nsFileProtocolHandler* handler, return NS_ERROR_OUT_OF_MEMORY; if (getter) { - (void)getter->GetEventSink(verb, nsCOMTypeInfo::GetIID(), (nsISupports**)&mListener); + (void)getter->GetEventSink(verb, NS_GET_IID(nsIStreamListener), (nsISupports**)&mListener); // ignore the failure -- we can live without having an event sink } @@ -189,9 +189,9 @@ NS_IMETHODIMP nsFileChannel::QueryInterface(const nsIID& aIID, void** aInstancePtr) { NS_ASSERTION(aInstancePtr, "no instance pointer"); - if (aIID.Equals(nsCOMTypeInfo::GetIID()) || - aIID.Equals(nsCOMTypeInfo::GetIID()) || - aIID.Equals(nsCOMTypeInfo::GetIID())) { + if (aIID.Equals(NS_GET_IID(nsIFileChannel)) || + aIID.Equals(NS_GET_IID(nsIChannel)) || + aIID.Equals(NS_GET_IID(nsISupports))) { *aInstancePtr = NS_STATIC_CAST(nsIFileChannel*, this); NS_ADDREF_THIS(); return NS_OK; @@ -351,7 +351,7 @@ nsFileChannel::OpenOutputStream(PRUint32 startPosition, nsIOutputStream **result nsISupports* str; rv = NS_NewTypicalOutputFileStream(&str, mSpec); if (NS_FAILED(rv)) return rv; - rv = str->QueryInterface(nsCOMTypeInfo::GetIID(), (void**)result); + rv = str->QueryInterface(NS_GET_IID(nsIOutputStream), (void**)result); NS_RELEASE(str); PR_LOG(gFileTransportLog, PR_LOG_DEBUG, ("nsFileTransport: OpenOutputStream [this=%x %s]", @@ -412,7 +412,7 @@ nsFileChannel::AsyncRead(PRUint32 startPosition, PRInt32 readCount, if (!mStreamConverter) rv = comMgr->CreateInstance(NS_ISTREAMCONVERTER_KEY "?from=message/rfc822?to=text/xul", - NULL, nsCOMTypeInfo::GetIID(), + NULL, NS_GET_IID(nsIStreamConverter), (void **) getter_AddRefs(mStreamConverter)); if (NS_FAILED(rv)) return rv; @@ -638,7 +638,7 @@ nsFileChannel::Process(void) } - mStatus = fs->QueryInterface(nsCOMTypeInfo::GetIID(), (void**)&mFileStream); + mStatus = fs->QueryInterface(NS_GET_IID(nsIInputStream), (void**)&mFileStream); NS_RELEASE(fs); if (NS_FAILED(mStatus)) goto error; @@ -703,7 +703,7 @@ nsFileChannel::Process(void) mStatus = NS_NewTypicalOutputFileStream(&fs, mSpec); if (NS_FAILED(mStatus)) goto error; - mStatus = fs->QueryInterface(nsCOMTypeInfo::GetIID(), (void**)&mFileStream); + mStatus = fs->QueryInterface(NS_GET_IID(nsIOutputStream), (void**)&mFileStream); NS_RELEASE(fs); if (NS_FAILED(mStatus)) goto error; @@ -932,7 +932,7 @@ protected: nsIFileChannel* mNext; }; -NS_IMPL_ISUPPORTS(nsDirEnumerator, nsCOMTypeInfo::GetIID()); +NS_IMPL_ISUPPORTS(nsDirEnumerator, NS_GET_IID(nsISimpleEnumerator)); NS_IMETHODIMP nsFileChannel::GetChildren(nsISimpleEnumerator * *aChildren) @@ -1002,7 +1002,7 @@ nsFileChannel::MoveFrom(nsIURI *src) #if 0 nsresult rv; nsIFileChannel* fc; - rv = src->QueryInterface(nsCOMTypeInfo::GetIID(), (void**)&fc); + rv = src->QueryInterface(NS_GET_IID(nsIFileChannel), (void**)&fc); if (NS_SUCCEEDED(rv)) { rv = fc->moveToDir(this); NS_RELEASE(fc); @@ -1024,7 +1024,7 @@ nsFileChannel::CopyFrom(nsIURI *src) #if 0 nsresult rv; nsIFileChannel* fc; - rv = src->QueryInterface(nsCOMTypeInfo::GetIID(), (void**)&fc); + rv = src->QueryInterface(NS_GET_IID(nsIFileChannel), (void**)&fc); if (NS_SUCCEEDED(rv)) { rv = fc->copyToDir(this); NS_RELEASE(fc); @@ -1097,7 +1097,7 @@ nsFileChannel::Execute(const char *args) if (args == nsnull) { nsIURL* url; - rv = mURI->QueryInterface(nsCOMTypeInfo::GetIID(), (void**)&url); + rv = mURI->QueryInterface(NS_GET_IID(nsIURL), (void**)&url); if (NS_SUCCEEDED(rv)) { rv = url->GetQuery(&queryArgs); NS_RELEASE(url); diff --git a/netwerk/protocol/file/src/nsFileProtocolHandler.cpp b/netwerk/protocol/file/src/nsFileProtocolHandler.cpp index 61e0408efc6..8d7ab639576 100644 --- a/netwerk/protocol/file/src/nsFileProtocolHandler.cpp +++ b/netwerk/protocol/file/src/nsFileProtocolHandler.cpp @@ -59,7 +59,7 @@ nsFileProtocolHandler::~nsFileProtocolHandler() NS_IF_RELEASE(mSuspended); } -NS_IMPL_ISUPPORTS(nsFileProtocolHandler, nsCOMTypeInfo::GetIID()); +NS_IMPL_ISUPPORTS(nsFileProtocolHandler, NS_GET_IID(nsIProtocolHandler)); NS_METHOD nsFileProtocolHandler::Create(nsISupports *aOuter, REFNSIID aIID, void **aResult) @@ -132,7 +132,7 @@ nsFileProtocolHandler::NewURI(const char *aSpec, nsIURI *aBaseURI, } else { rv = nsComponentManager::CreateInstance(kStandardURLCID, nsnull, - nsCOMTypeInfo::GetIID(), + NS_GET_IID(nsIURI), (void**)&url); if (NS_FAILED(rv)) return rv; rv = url->SetSpec((char*)aSpec); @@ -156,7 +156,7 @@ nsFileProtocolHandler::NewChannel(const char* verb, nsIURI* url, nsresult rv; nsFileChannel* channel; - rv = nsFileChannel::Create(nsnull, nsCOMTypeInfo::GetIID(), (void**)&channel); + rv = nsFileChannel::Create(nsnull, NS_GET_IID(nsIFileChannel), (void**)&channel); if (NS_FAILED(rv)) return rv; rv = channel->Init(this, verb, url, aGroup, eventSinkGetter); diff --git a/netwerk/protocol/ftp/src/nsFTPChannel.cpp b/netwerk/protocol/ftp/src/nsFTPChannel.cpp index 81fdd41a994..adf74b5d321 100644 --- a/netwerk/protocol/ftp/src/nsFTPChannel.cpp +++ b/netwerk/protocol/ftp/src/nsFTPChannel.cpp @@ -85,15 +85,15 @@ NS_IMPL_RELEASE(nsFTPChannel); NS_IMETHODIMP nsFTPChannel::QueryInterface(const nsIID& aIID, void** aInstancePtr) { NS_ASSERTION(aInstancePtr, "no instance pointer"); - if (aIID.Equals(nsCOMTypeInfo::GetIID()) || - aIID.Equals(nsCOMTypeInfo::GetIID()) || - aIID.Equals(nsCOMTypeInfo::GetIID()) ) { + if (aIID.Equals(NS_GET_IID(nsIFTPChannel)) || + aIID.Equals(NS_GET_IID(nsIChannel)) || + aIID.Equals(NS_GET_IID(nsISupports)) ) { *aInstancePtr = NS_STATIC_CAST(nsIFTPChannel*, this); NS_ADDREF_THIS(); return NS_OK; } - if (aIID.Equals(nsCOMTypeInfo::GetIID()) || - aIID.Equals(nsCOMTypeInfo::GetIID())) { + if (aIID.Equals(NS_GET_IID(nsIStreamListener)) || + aIID.Equals(NS_GET_IID(nsIStreamObserver))) { *aInstancePtr = NS_STATIC_CAST(nsIStreamListener*, this); NS_ADDREF_THIS(); return NS_OK; @@ -118,7 +118,7 @@ nsFTPChannel::Init(const char* verb, nsIURI* uri, nsILoadGroup *aGroup, if (getter) { nsIProgressEventSink* eventSink = nsnull; - rv = getter->GetEventSink(verb, nsCOMTypeInfo::GetIID(), + rv = getter->GetEventSink(verb, NS_GET_IID(nsIProgressEventSink), (nsISupports**)&eventSink); if (NS_FAILED(rv)) { PR_LOG(gFTPLog, PR_LOG_DEBUG, ("nsFTPChannel::Init() (couldn't find event sink)\n")); @@ -479,7 +479,7 @@ nsFTPChannel::OnDataAvailable(nsIChannel* channel, nsISupports* context, PR_LOG(gFTPLog, PR_LOG_DEBUG, ("nsFTPChannel::OnDataAvailable(channel = %x, context = %x, stream = %x, srcOffset = %d, length = %d)\n", channel, context, aIStream, aSourceOffset, aLength)); nsIFTPContext *ftpCtxt = nsnull; - rv = context->QueryInterface(nsCOMTypeInfo::GetIID(), (void**)&ftpCtxt); + rv = context->QueryInterface(NS_GET_IID(nsIFTPContext), (void**)&ftpCtxt); if (NS_FAILED(rv)) return rv; diff --git a/netwerk/protocol/ftp/src/nsFtpConnectionThread.cpp b/netwerk/protocol/ftp/src/nsFtpConnectionThread.cpp index fd3913acb03..23e4ec6c925 100644 --- a/netwerk/protocol/ftp/src/nsFtpConnectionThread.cpp +++ b/netwerk/protocol/ftp/src/nsFtpConnectionThread.cpp @@ -89,8 +89,8 @@ NS_IMPL_RELEASE(nsFtpConnectionThread); NS_IMETHODIMP nsFtpConnectionThread::QueryInterface(const nsIID& aIID, void** aInstancePtr) { NS_ASSERTION(aInstancePtr, "no instance pointer"); - if (aIID.Equals(nsCOMTypeInfo::GetIID()) || - aIID.Equals(nsCOMTypeInfo::GetIID()) ) { + if (aIID.Equals(NS_GET_IID(nsIRunnable)) || + aIID.Equals(NS_GET_IID(nsISupports)) ) { *aInstancePtr = NS_STATIC_CAST(nsFtpConnectionThread*, this); NS_ADDREF_THIS(); return NS_OK; @@ -1237,14 +1237,14 @@ nsFtpConnectionThread::R_list() { rv = NS_NewCharInputStream(&stringStrmSup, listBuf); if (NS_FAILED(rv)) return FTP_ERROR; - rv = stringStrmSup->QueryInterface(nsCOMTypeInfo::GetIID(), (void**)&stringStream); + rv = stringStrmSup->QueryInterface(NS_GET_IID(nsIInputStream), (void**)&stringStream); if (NS_FAILED(rv)) return FTP_ERROR; nsFTPContext *dataCtxt = new nsFTPContext(); if (!dataCtxt) return FTP_ERROR; dataCtxt->SetContentType("text/ftp-dirListing"); nsISupports *ctxtSup = nsnull; - rv = dataCtxt->QueryInterface(nsCOMTypeInfo::GetIID(), (void**)&ctxtSup); + rv = dataCtxt->QueryInterface(NS_GET_IID(nsISupports), (void**)&ctxtSup); // tell the user that we've begun the transaction. nsFtpOnStartRequestEvent* startEvent = @@ -1344,7 +1344,7 @@ nsFtpConnectionThread::R_retr() { dataCtxt->SetContentType(contentType); nsISupports *ctxtSup = nsnull; - rv = dataCtxt->QueryInterface(nsCOMTypeInfo::GetIID(), (void**)&ctxtSup); + rv = dataCtxt->QueryInterface(NS_GET_IID(nsISupports), (void**)&ctxtSup); // tell the user that we've begun the transaction. nsFtpOnStartRequestEvent* startEvent = @@ -1363,7 +1363,7 @@ nsFtpConnectionThread::R_retr() { if (!event) return FTP_ERROR; nsIInputStream *inStream = nsnull; - rv = bufInStrm->QueryInterface(nsCOMTypeInfo::GetIID(), (void**)&inStream); + rv = bufInStrm->QueryInterface(NS_GET_IID(nsIInputStream), (void**)&inStream); if (NS_FAILED(rv)) return FTP_ERROR; rv = event->Init(inStream, 0, mLength); @@ -1479,7 +1479,7 @@ nsFtpConnectionThread::R_pasv() { if (!dataCtxt) return FTP_ERROR; dataCtxt->mCmdResponse = PR_FALSE; nsISupports *ctxtSup = nsnull; - rv = dataCtxt->QueryInterface(nsCOMTypeInfo::GetIID(), (void**)&ctxtSup); + rv = dataCtxt->QueryInterface(NS_GET_IID(nsISupports), (void**)&ctxtSup); } else { // get the output stream so we can write to the server @@ -1631,7 +1631,7 @@ nsFtpConnectionThread::Run() { if (NS_FAILED(rv)) return rv; rv = nsServiceManager::GetService(kSocketTransportServiceCID, - nsCOMTypeInfo::GetIID(), + NS_GET_IID(nsISocketTransportService), (nsISupports **)&mSTS); if(NS_FAILED(rv)) return rv; diff --git a/netwerk/protocol/ftp/src/nsFtpProtocolHandler.cpp b/netwerk/protocol/ftp/src/nsFtpProtocolHandler.cpp index 94737b3e14d..4c0dde95d85 100644 --- a/netwerk/protocol/ftp/src/nsFtpProtocolHandler.cpp +++ b/netwerk/protocol/ftp/src/nsFtpProtocolHandler.cpp @@ -53,7 +53,7 @@ nsFtpProtocolHandler::nsFtpProtocolHandler() { nsFtpProtocolHandler::~nsFtpProtocolHandler() { } -NS_IMPL_ISUPPORTS(nsFtpProtocolHandler, nsCOMTypeInfo::GetIID()); +NS_IMPL_ISUPPORTS(nsFtpProtocolHandler, NS_GET_IID(nsIProtocolHandler)); NS_METHOD nsFtpProtocolHandler::Create(nsISupports* aOuter, const nsIID& aIID, void* *aResult) @@ -132,7 +132,7 @@ nsFtpProtocolHandler::NewURI(const char *aSpec, nsIURI *aBaseURI, } else { rv = nsComponentManager::CreateInstance(kStandardURLCID, nsnull, - nsCOMTypeInfo::GetIID(), + NS_GET_IID(nsIURI), (void**)&url); if (NS_FAILED(rv)) return rv; rv = url->SetSpec((char*)aSpec); @@ -166,7 +166,7 @@ nsFtpProtocolHandler::NewChannel(const char* verb, nsIURI* url, nsresult rv; nsFTPChannel* channel; - rv = nsFTPChannel::Create(nsnull, nsCOMTypeInfo::GetIID(), (void**)&channel); + rv = nsFTPChannel::Create(nsnull, NS_GET_IID(nsIFTPChannel), (void**)&channel); if (NS_FAILED(rv)) return rv; rv = channel->Init(verb, url, aGroup, eventSinkGetter); diff --git a/netwerk/protocol/http/src/nsBasicAuth.cpp b/netwerk/protocol/http/src/nsBasicAuth.cpp index 891b25328b1..d12de563c9b 100644 --- a/netwerk/protocol/http/src/nsBasicAuth.cpp +++ b/netwerk/protocol/http/src/nsBasicAuth.cpp @@ -66,7 +66,7 @@ nsBasicAuth::QueryInterface(REFNSIID aIID, void** aInstancePtr) *aInstancePtr = NULL; - if (aIID.Equals(nsCOMTypeInfo::GetIID())) + if (aIID.Equals(NS_GET_IID(nsISupports))) { *aInstancePtr = NS_STATIC_CAST(nsISupports*, this); NS_ADDREF_THIS(); diff --git a/netwerk/protocol/http/src/nsHTTPChannel.cpp b/netwerk/protocol/http/src/nsHTTPChannel.cpp index 702e88a84d9..b7822283539 100644 --- a/netwerk/protocol/http/src/nsHTTPChannel.cpp +++ b/netwerk/protocol/http/src/nsHTTPChannel.cpp @@ -80,7 +80,7 @@ nsHTTPChannel::nsHTTPChannel(nsIURI* i_URL, if (i_EventSinkGetter) { nsIHTTPEventSink *sink = nsnull; - (void) i_EventSinkGetter->GetEventSink(i_Verb, nsCOMTypeInfo::GetIID(), + (void) i_EventSinkGetter->GetEventSink(i_Verb, NS_GET_IID(nsIHTTPEventSink), (nsISupports**)&sink); mEventSink = sink; NS_IF_RELEASE(sink); @@ -113,9 +113,9 @@ nsHTTPChannel::QueryInterface(REFNSIID aIID, void** aInstancePtr) *aInstancePtr = NULL; - if (aIID.Equals(nsCOMTypeInfo::GetIID()) || - aIID.Equals(nsCOMTypeInfo::GetIID()) || - aIID.Equals(nsCOMTypeInfo::GetIID())) { + if (aIID.Equals(NS_GET_IID(nsIHTTPChannel)) || + aIID.Equals(NS_GET_IID(nsIChannel)) || + aIID.Equals(NS_GET_IID(nsISupports))) { *aInstancePtr = NS_STATIC_CAST(nsIHTTPChannel*, this); NS_ADDREF_THIS(); return NS_OK; diff --git a/netwerk/protocol/http/src/nsHTTPHandler.cpp b/netwerk/protocol/http/src/nsHTTPHandler.cpp index e8858c17c69..49f182fa65d 100644 --- a/netwerk/protocol/http/src/nsHTTPHandler.cpp +++ b/netwerk/protocol/http/src/nsHTTPHandler.cpp @@ -173,7 +173,7 @@ nsHTTPHandler::NewChannel(const char* verb, nsIURI* i_URL, if (pChannel) { NS_ADDREF(pChannel); pChannel->Init(aGroup); - rv = pChannel->QueryInterface(nsCOMTypeInfo::GetIID(), (void**)o_Instance); + rv = pChannel->QueryInterface(NS_GET_IID(nsIChannel), (void**)o_Instance); // add this instance to the active list of connections // TODO! NS_RELEASE(pChannel); @@ -202,22 +202,22 @@ nsHTTPHandler::QueryInterface(REFNSIID aIID, void** aInstancePtr) *aInstancePtr = NULL; - if (aIID.Equals(nsCOMTypeInfo::GetIID())) { + if (aIID.Equals(NS_GET_IID(nsIProtocolHandler))) { *aInstancePtr = (void*) ((nsIProtocolHandler*)this); NS_ADDREF_THIS(); return NS_OK; } - if (aIID.Equals(nsCOMTypeInfo::GetIID())) { + if (aIID.Equals(NS_GET_IID(nsIHTTPProtocolHandler))) { *aInstancePtr = (void*) ((nsIHTTPProtocolHandler*)this); NS_ADDREF_THIS(); return NS_OK; } - if (aIID.Equals(nsCOMTypeInfo::GetIID())) { + if (aIID.Equals(NS_GET_IID(nsIProxy))) { *aInstancePtr = (void*) ((nsIProxy*)this); NS_ADDREF_THIS(); return NS_OK; } - if (aIID.Equals(nsCOMTypeInfo::GetIID())) { + if (aIID.Equals(NS_GET_IID(nsISupports))) { *aInstancePtr = (void*) ((nsISupports*)(nsIProtocolHandler*)this); NS_ADDREF_THIS(); return NS_OK; @@ -258,7 +258,7 @@ nsHTTPHandler::NewURI(const char *aSpec, nsIURI *aBaseURI, } else { - rv = nsComponentManager::CreateInstance(kStandardUrlCID, nsnull, nsCOMTypeInfo::GetIID(), + rv = nsComponentManager::CreateInstance(kStandardUrlCID, nsnull, NS_GET_IID(nsIURI), (void**)&url); if (NS_FAILED(rv)) return rv; rv = url->SetSpec((char*)aSpec); diff --git a/netwerk/protocol/http/src/nsHTTPHandlerFactory.cpp b/netwerk/protocol/http/src/nsHTTPHandlerFactory.cpp index 7852fdf5514..6f739ec5784 100644 --- a/netwerk/protocol/http/src/nsHTTPHandlerFactory.cpp +++ b/netwerk/protocol/http/src/nsHTTPHandlerFactory.cpp @@ -64,7 +64,7 @@ nsHTTPHandlerFactory::QueryInterface(const nsIID &aIID, void **aResult) // Always NULL result, in case of failure *aResult = nsnull; - if (aIID.Equals(nsCOMTypeInfo::GetIID())) { + if (aIID.Equals(NS_GET_IID(nsISupports))) { *aResult = NS_STATIC_CAST(nsISupports*, this); AddRef(); return NS_OK; diff --git a/netwerk/protocol/http/src/nsHTTPHeaderArray.cpp b/netwerk/protocol/http/src/nsHTTPHeaderArray.cpp index 0d1cb07a16f..67fa7be9db4 100644 --- a/netwerk/protocol/http/src/nsHTTPHeaderArray.cpp +++ b/netwerk/protocol/http/src/nsHTTPHeaderArray.cpp @@ -36,7 +36,7 @@ nsHeaderEntry::~nsHeaderEntry() } -NS_IMPL_ISUPPORTS(nsHeaderEntry, nsCOMTypeInfo::GetIID()) +NS_IMPL_ISUPPORTS(nsHeaderEntry, NS_GET_IID(nsIHTTPHeader)) NS_IMETHODIMP @@ -271,7 +271,7 @@ nsHTTPHeaderEnumerator::~nsHTTPHeaderEnumerator() // Implement nsISupports methods // NS_IMPL_ISUPPORTS(nsHTTPHeaderEnumerator, - nsCOMTypeInfo::GetIID()) + NS_GET_IID(nsISimpleEnumerator)) // diff --git a/netwerk/protocol/http/src/nsHTTPRequest.cpp b/netwerk/protocol/http/src/nsHTTPRequest.cpp index 19952aa2976..3422ab5d89d 100644 --- a/netwerk/protocol/http/src/nsHTTPRequest.cpp +++ b/netwerk/protocol/http/src/nsHTTPRequest.cpp @@ -92,13 +92,13 @@ nsHTTPRequest::QueryInterface(REFNSIID aIID, void** aInstancePtr) *aInstancePtr = NULL; - if (aIID.Equals(nsCOMTypeInfo::GetIID()) || - aIID.Equals(nsCOMTypeInfo::GetIID())) { + if (aIID.Equals(NS_GET_IID(nsIStreamObserver)) || + aIID.Equals(NS_GET_IID(nsISupports))) { *aInstancePtr = NS_STATIC_CAST(nsIStreamObserver*, this); NS_ADDREF_THIS(); return NS_OK; } - if (aIID.Equals(nsCOMTypeInfo::GetIID())) { + if (aIID.Equals(NS_GET_IID(nsIRequest))) { *aInstancePtr = NS_STATIC_CAST(nsIRequest*, this); NS_ADDREF_THIS(); return NS_OK; @@ -410,7 +410,7 @@ nsHTTPRequest::GetInputStream(nsIInputStream* *o_Stream) { Build(); } - mRequest->QueryInterface(nsCOMTypeInfo::GetIID(), (void**)o_Stream); + mRequest->QueryInterface(NS_GET_IID(nsIInputStream), (void**)o_Stream); return NS_OK; } else diff --git a/netwerk/protocol/http/src/nsHTTPResponse.cpp b/netwerk/protocol/http/src/nsHTTPResponse.cpp index 00ebf6f7a7f..89a281be813 100644 --- a/netwerk/protocol/http/src/nsHTTPResponse.cpp +++ b/netwerk/protocol/http/src/nsHTTPResponse.cpp @@ -48,7 +48,7 @@ nsHTTPResponse::~nsHTTPResponse() } -NS_IMPL_ISUPPORTS(nsHTTPResponse, nsCOMTypeInfo::GetIID()) +NS_IMPL_ISUPPORTS(nsHTTPResponse, NS_GET_IID(nsISupports)) nsresult nsHTTPResponse::GetContentLength(PRInt32* o_Value) diff --git a/netwerk/protocol/http/src/nsHTTPResponseListener.cpp b/netwerk/protocol/http/src/nsHTTPResponseListener.cpp index d715a03f08a..bde6373b81e 100644 --- a/netwerk/protocol/http/src/nsHTTPResponseListener.cpp +++ b/netwerk/protocol/http/src/nsHTTPResponseListener.cpp @@ -84,7 +84,7 @@ nsHTTPResponseListener::~nsHTTPResponseListener() NS_IF_RELEASE(mConsumer); } -NS_IMPL_ISUPPORTS(nsHTTPResponseListener,nsCOMTypeInfo::GetIID()); +NS_IMPL_ISUPPORTS(nsHTTPResponseListener,NS_GET_IID(nsIStreamListener)); static NS_DEFINE_IID(kProxyObjectManagerIID, NS_IPROXYEVENT_MANAGER_IID); static NS_DEFINE_CID(kEventQueueService, NS_EVENTQUEUESERVICE_CID); diff --git a/netwerk/protocol/resource/src/nsResourceProtocolHandler.cpp b/netwerk/protocol/resource/src/nsResourceProtocolHandler.cpp index 802c1e2a859..eb21053fd97 100644 --- a/netwerk/protocol/resource/src/nsResourceProtocolHandler.cpp +++ b/netwerk/protocol/resource/src/nsResourceProtocolHandler.cpp @@ -58,7 +58,7 @@ nsResourceProtocolHandler::~nsResourceProtocolHandler() { } -NS_IMPL_ISUPPORTS(nsResourceProtocolHandler, nsCOMTypeInfo::GetIID()); +NS_IMPL_ISUPPORTS(nsResourceProtocolHandler, NS_GET_IID(nsIProtocolHandler)); NS_METHOD nsResourceProtocolHandler::Create(nsISupports *aOuter, REFNSIID aIID, void **aResult) @@ -131,7 +131,7 @@ nsResourceProtocolHandler::NewURI(const char *aSpec, nsIURI *aBaseURI, } else { rv = nsComponentManager::CreateInstance(kStandardURLCID, nsnull, - nsCOMTypeInfo::GetIID(), + NS_GET_IID(nsIURI), (void**)&url); if (NS_FAILED(rv)) return rv; rv = url->SetSpec((char*)aSpec); @@ -323,7 +323,7 @@ nsResourceProtocolHandler::NewChannel(const char* verb, nsIURI* uri, if (NS_FAILED(rv)) return rv; nsIURL* url; - rv = uri->QueryInterface(nsCOMTypeInfo::GetIID(), (void**)&url); + rv = uri->QueryInterface(NS_GET_IID(nsIURL), (void**)&url); if (NS_SUCCEEDED(rv)) { char* query; rv = url->GetQuery(&query); @@ -332,7 +332,7 @@ nsResourceProtocolHandler::NewChannel(const char* verb, nsIURI* uri, rv = channel->GetURI(&fileURI); if (NS_SUCCEEDED(rv)) { nsIURL* fileURL; - rv = fileURI->QueryInterface(nsCOMTypeInfo::GetIID(), (void**)&fileURL); + rv = fileURI->QueryInterface(NS_GET_IID(nsIURL), (void**)&fileURL); if (NS_SUCCEEDED(rv)) { (void)fileURL->SetQuery(query); NS_RELEASE(fileURL); diff --git a/netwerk/socket/base/nsSocketProviderService.cpp b/netwerk/socket/base/nsSocketProviderService.cpp index cb2de1b31d8..16b0b885678 100644 --- a/netwerk/socket/base/nsSocketProviderService.cpp +++ b/netwerk/socket/base/nsSocketProviderService.cpp @@ -66,7 +66,7 @@ nsSocketProviderService::Create(nsISupports *aOuter, REFNSIID aIID, void **aResu return rv; } -NS_IMPL_ISUPPORTS(nsSocketProviderService, nsCOMTypeInfo::GetIID()); +NS_IMPL_ISUPPORTS(nsSocketProviderService, NS_GET_IID(nsISocketProviderService)); //////////////////////////////////////////////////////////////////////////////// diff --git a/netwerk/util/src/nsNetStreamLoader.cpp b/netwerk/util/src/nsNetStreamLoader.cpp index 3d7ca6cd610..afaccac9654 100644 --- a/netwerk/util/src/nsNetStreamLoader.cpp +++ b/netwerk/util/src/nsNetStreamLoader.cpp @@ -122,7 +122,7 @@ nsUnicharStreamLoader::QueryInterface(const nsIID &aIID, void** aInstancePtr) AddRef(); return NS_OK; } - if (aIID.Equals(nsCOMTypeInfo::GetIID())) { + if (aIID.Equals(NS_GET_IID(nsISupports))) { nsIUnicharStreamLoader* tmp = this; nsISupports* tmp2 = tmp; *aInstancePtr = (void*) tmp2; diff --git a/uriloader/exthandler/nsMIMEInfoImpl.cpp b/uriloader/exthandler/nsMIMEInfoImpl.cpp index 5df0ad1ad85..59b12794254 100644 --- a/uriloader/exthandler/nsMIMEInfoImpl.cpp +++ b/uriloader/exthandler/nsMIMEInfoImpl.cpp @@ -21,7 +21,7 @@ // nsISupports methods -NS_IMPL_ISUPPORTS(nsMIMEInfoImpl, nsCOMTypeInfo::GetIID()); +NS_IMPL_ISUPPORTS(nsMIMEInfoImpl, NS_GET_IID(nsIMIMEInfo)); // nsMIMEInfoImpl methods nsMIMEInfoImpl::nsMIMEInfoImpl(const char *aMIMEType, const char *aFileExtensions, const char *aDescription) {