зеркало из https://github.com/mozilla/pjs.git
changed nsCOMTypeInfo<> template to NS_GET_IID macro
This commit is contained in:
Родитель
b9236e3224
Коммит
03b9d2d6cb
|
@ -176,7 +176,7 @@ nsAsyncStreamObserver::~nsAsyncStreamObserver()
|
|||
}
|
||||
|
||||
NS_IMPL_THREADSAFE_ISUPPORTS(nsAsyncStreamObserver,
|
||||
nsCOMTypeInfo<nsIStreamObserver>::GetIID());
|
||||
NS_GET_IID(nsIStreamObserver));
|
||||
|
||||
NS_IMPL_ISUPPORTS_INHERITED(nsAsyncStreamListener,
|
||||
nsAsyncStreamObserver,
|
||||
|
|
|
@ -111,7 +111,7 @@ nsIOService::Create(nsISupports *aOuter, REFNSIID aIID, void **aResult)
|
|||
return rv;
|
||||
}
|
||||
|
||||
NS_IMPL_ISUPPORTS(nsIOService, nsCOMTypeInfo<nsIIOService>::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<nsILoadGroup>::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<nsIChannel>::GetIID(),
|
||||
rv = nsInputStreamChannel::Create(nsnull, NS_GET_IID(nsIChannel),
|
||||
(void**)&channel);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
rv = channel->Init(uri, contentType, inStr);
|
||||
|
|
|
@ -71,7 +71,7 @@ nsInputStreamChannel::Init(nsIURI* uri, const char* contentType,
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMPL_ISUPPORTS(nsInputStreamChannel, nsCOMTypeInfo<nsIChannel>::GetIID());
|
||||
NS_IMPL_ISUPPORTS(nsInputStreamChannel, NS_GET_IID(nsIChannel));
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// nsIRequest methods:
|
||||
|
|
|
@ -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<nsILoadGroup>::GetIID()) ||
|
||||
aIID.Equals(nsCOMTypeInfo<nsIRequest>::GetIID()) ||
|
||||
aIID.Equals(nsCOMTypeInfo<nsISupports>::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;
|
||||
|
|
|
@ -31,7 +31,7 @@ static NS_DEFINE_IID(kEventQueueServiceCID, NS_EVENTQUEUESERVICE_CID);
|
|||
//////////////////////////////
|
||||
//// nsISupports
|
||||
//////////////////////////////
|
||||
NS_IMPL_ISUPPORTS(nsNetModRegEntry, nsCOMTypeInfo<nsINetModRegEntry>::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<nsINetNotify>::GetIID(),
|
||||
NS_GET_IID(nsINetNotify),
|
||||
aNotify,
|
||||
PROXY_SYNC | PROXY_ALWAYS,
|
||||
getter_AddRefs(mSyncProxy));
|
||||
if (NS_FAILED(*result)) return;
|
||||
|
||||
*result = proxyManager->GetProxyObject( mEventQ,
|
||||
nsCOMTypeInfo<nsINetNotify>::GetIID(),
|
||||
NS_GET_IID(nsINetNotify),
|
||||
aNotify,
|
||||
PROXY_ASYNC | PROXY_ALWAYS,
|
||||
getter_AddRefs(mAsyncProxy));
|
||||
|
|
|
@ -34,7 +34,7 @@ static PRBool DeleteEntry(nsISupports *aElement, void *aData) {
|
|||
//// nsISupports
|
||||
///////////////////////////////////
|
||||
|
||||
NS_IMPL_ISUPPORTS(nsNetModuleMgr, nsCOMTypeInfo<nsINetModuleMgr>::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<nsINetModRegEntry>::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<nsINetModRegEntry>::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<nsISimpleEnumerator>::GetIID(), (void**)&outEnum);
|
||||
rv = arrEnum->QueryInterface(NS_GET_IID(nsISimpleEnumerator), (void**)&outEnum);
|
||||
if (NS_FAILED(rv)) {
|
||||
delete arrEnum;
|
||||
return rv;
|
||||
|
|
|
@ -1140,20 +1140,20 @@ nsSocketTransport::QueryInterface(const nsIID& aIID, void* *aInstancePtr)
|
|||
if (NULL == aInstancePtr) {
|
||||
return NS_ERROR_NULL_POINTER;
|
||||
}
|
||||
if (aIID.Equals(nsCOMTypeInfo<nsIChannel>::GetIID()) ||
|
||||
aIID.Equals(nsCOMTypeInfo<nsISupports>::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<nsIBufferObserver>::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<nsIPipeObserver>::GetIID())) {
|
||||
if (aIID.Equals(NS_GET_IID(nsIPipeObserver))) {
|
||||
*aInstancePtr = NS_STATIC_CAST(nsIPipeObserver*, this);
|
||||
NS_ADDREF_THIS();
|
||||
return NS_OK;
|
||||
|
|
|
@ -342,13 +342,13 @@ nsSocketTransportService::QueryInterface(const nsIID& aIID, void* *aInstancePtr)
|
|||
if (NULL == aInstancePtr) {
|
||||
return NS_ERROR_NULL_POINTER;
|
||||
}
|
||||
if (aIID.Equals(nsCOMTypeInfo<nsISocketTransportService>::GetIID()) ||
|
||||
aIID.Equals(nsCOMTypeInfo<nsISupports>::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<nsIRunnable>::GetIID())) {
|
||||
if (aIID.Equals(NS_GET_IID(nsIRunnable))) {
|
||||
*aInstancePtr = NS_STATIC_CAST(nsIRunnable*, this);
|
||||
NS_ADDREF_THIS();
|
||||
return NS_OK;
|
||||
|
|
|
@ -124,11 +124,11 @@ nsStdURL::AggregatedQueryInterface(const nsIID& aIID, void** aInstancePtr)
|
|||
if(!aInstancePtr)
|
||||
return NS_ERROR_INVALID_POINTER;
|
||||
|
||||
if (aIID.Equals(nsCOMTypeInfo<nsISupports>::GetIID()))
|
||||
if (aIID.Equals(NS_GET_IID(nsISupports)))
|
||||
*aInstancePtr = GetInner();
|
||||
else if (aIID.Equals(kThisStdURLImplementationCID) || // used by Equals
|
||||
aIID.Equals(nsCOMTypeInfo<nsIURL>::GetIID()) ||
|
||||
aIID.Equals(nsCOMTypeInfo<nsIURI>::GetIID()))
|
||||
aIID.Equals(NS_GET_IID(nsIURL)) ||
|
||||
aIID.Equals(NS_GET_IID(nsIURI)))
|
||||
*aInstancePtr = NS_STATIC_CAST(nsIURL*, this);
|
||||
else {
|
||||
*aInstancePtr = nsnull;
|
||||
|
|
|
@ -82,9 +82,9 @@ NS_IMETHODIMP
|
|||
nsSyncStreamListener::QueryInterface(const nsIID& aIID, void** aInstancePtr)
|
||||
{
|
||||
NS_ASSERTION(aInstancePtr, "no instance pointer");
|
||||
if (aIID.Equals(nsCOMTypeInfo<nsIStreamListener>::GetIID()) ||
|
||||
aIID.Equals(nsCOMTypeInfo<nsIStreamObserver>::GetIID()) ||
|
||||
aIID.Equals(nsCOMTypeInfo<nsISupports>::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;
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
|
||||
// nsISupports methods
|
||||
NS_IMPL_ISUPPORTS(nsMIMEInfoImpl, nsCOMTypeInfo<nsIMIMEInfo>::GetIID());
|
||||
NS_IMPL_ISUPPORTS(nsMIMEInfoImpl, NS_GET_IID(nsIMIMEInfo));
|
||||
|
||||
// nsMIMEInfoImpl methods
|
||||
nsMIMEInfoImpl::nsMIMEInfoImpl(const char *aMIMEType, const char *aFileExtensions, const char *aDescription) {
|
||||
|
|
|
@ -38,7 +38,7 @@ PRBool FindMIMEType(nsHashKey *aKey, void *aData, void* closure) {
|
|||
|
||||
|
||||
// nsISupports methods
|
||||
NS_IMPL_ISUPPORTS(nsMIMEService, nsCOMTypeInfo<nsIMIMEService>::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<nsIURL>::GetIID(), (void**)&url);
|
||||
rv = aURI->QueryInterface(NS_GET_IID(nsIURL), (void**)&url);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
rv = url->GetFileName(&cStrSpec);
|
||||
NS_RELEASE(url);
|
||||
|
|
|
@ -64,7 +64,7 @@ nsMIMEServiceFactory::QueryInterface(const nsIID &aIID, void **aResult)
|
|||
// Always NULL result, in case of failure
|
||||
*aResult = nsnull;
|
||||
|
||||
if (aIID.Equals(nsCOMTypeInfo<nsISupports>::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<nsISupports>::GetIID(), (void**)&inst);
|
||||
MIMEService->QueryInterface(NS_GET_IID(nsISupports), (void**)&inst);
|
||||
}
|
||||
else {
|
||||
return NS_ERROR_NO_INTERFACE;
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
static NS_DEFINE_CID(kIOServiceCID, NS_IOSERVICE_CID);
|
||||
|
||||
NS_IMPL_ISUPPORTS(nsAboutBlank, nsCOMTypeInfo<nsIAboutModule>::GetIID());
|
||||
NS_IMPL_ISUPPORTS(nsAboutBlank, NS_GET_IID(nsIAboutModule));
|
||||
|
||||
static const char kBlankPage[] = "<html><body></body></html>";
|
||||
|
||||
|
|
|
@ -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<nsIDataChannel>::GetIID()) ||
|
||||
aIID.Equals(nsCOMTypeInfo<nsIChannel>::GetIID()) ||
|
||||
aIID.Equals(nsCOMTypeInfo<nsISupports>::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;
|
||||
|
|
|
@ -92,9 +92,9 @@ nsDirectoryIndexStream::QueryInterface(REFNSIID aIID, void** aResult)
|
|||
if (! aResult)
|
||||
return NS_ERROR_NULL_POINTER;
|
||||
|
||||
if (aIID.Equals(nsCOMTypeInfo<nsIInputStream>::GetIID()) ||
|
||||
aIID.Equals(nsCOMTypeInfo<nsIBaseStream>::GetIID()) ||
|
||||
aIID.Equals(nsCOMTypeInfo<nsISupports>::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;
|
||||
|
|
|
@ -112,7 +112,7 @@ nsFileChannel::Init(nsFileProtocolHandler* handler,
|
|||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
|
||||
if (getter) {
|
||||
(void)getter->GetEventSink(verb, nsCOMTypeInfo<nsIStreamListener>::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<nsIFileChannel>::GetIID()) ||
|
||||
aIID.Equals(nsCOMTypeInfo<nsIChannel>::GetIID()) ||
|
||||
aIID.Equals(nsCOMTypeInfo<nsISupports>::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<nsIOutputStream>::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<nsIStreamConverter>::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<nsIInputStream>::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<nsIOutputStream>::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<nsISimpleEnumerator>::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<nsIFileChannel>::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<nsIFileChannel>::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<nsIURL>::GetIID(), (void**)&url);
|
||||
rv = mURI->QueryInterface(NS_GET_IID(nsIURL), (void**)&url);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
rv = url->GetQuery(&queryArgs);
|
||||
NS_RELEASE(url);
|
||||
|
|
|
@ -59,7 +59,7 @@ nsFileProtocolHandler::~nsFileProtocolHandler()
|
|||
NS_IF_RELEASE(mSuspended);
|
||||
}
|
||||
|
||||
NS_IMPL_ISUPPORTS(nsFileProtocolHandler, nsCOMTypeInfo<nsIProtocolHandler>::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<nsIURI>::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<nsIFileChannel>::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);
|
||||
|
|
|
@ -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<nsIFTPChannel>::GetIID()) ||
|
||||
aIID.Equals(nsCOMTypeInfo<nsIChannel>::GetIID()) ||
|
||||
aIID.Equals(nsCOMTypeInfo<nsISupports>::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<nsIStreamListener>::GetIID()) ||
|
||||
aIID.Equals(nsCOMTypeInfo<nsIStreamObserver>::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<nsIProgressEventSink>::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<nsIFTPContext>::GetIID(), (void**)&ftpCtxt);
|
||||
rv = context->QueryInterface(NS_GET_IID(nsIFTPContext), (void**)&ftpCtxt);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
|
||||
|
|
|
@ -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<nsIRunnable>::GetIID()) ||
|
||||
aIID.Equals(nsCOMTypeInfo<nsISupports>::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<nsIInputStream>::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<nsISupports>::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<nsISupports>::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<nsIInputStream>::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<nsISupports>::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<nsISocketTransportService>::GetIID(),
|
||||
NS_GET_IID(nsISocketTransportService),
|
||||
(nsISupports **)&mSTS);
|
||||
if(NS_FAILED(rv)) return rv;
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@ nsFtpProtocolHandler::nsFtpProtocolHandler() {
|
|||
nsFtpProtocolHandler::~nsFtpProtocolHandler() {
|
||||
}
|
||||
|
||||
NS_IMPL_ISUPPORTS(nsFtpProtocolHandler, nsCOMTypeInfo<nsIProtocolHandler>::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<nsIURI>::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<nsIFTPChannel>::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);
|
||||
|
|
|
@ -66,7 +66,7 @@ nsBasicAuth::QueryInterface(REFNSIID aIID, void** aInstancePtr)
|
|||
|
||||
*aInstancePtr = NULL;
|
||||
|
||||
if (aIID.Equals(nsCOMTypeInfo<nsISupports>::GetIID()))
|
||||
if (aIID.Equals(NS_GET_IID(nsISupports)))
|
||||
{
|
||||
*aInstancePtr = NS_STATIC_CAST(nsISupports*, this);
|
||||
NS_ADDREF_THIS();
|
||||
|
|
|
@ -80,7 +80,7 @@ nsHTTPChannel::nsHTTPChannel(nsIURI* i_URL,
|
|||
if (i_EventSinkGetter) {
|
||||
nsIHTTPEventSink *sink = nsnull;
|
||||
|
||||
(void) i_EventSinkGetter->GetEventSink(i_Verb, nsCOMTypeInfo<nsIHTTPEventSink>::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<nsIHTTPChannel>::GetIID()) ||
|
||||
aIID.Equals(nsCOMTypeInfo<nsIChannel>::GetIID()) ||
|
||||
aIID.Equals(nsCOMTypeInfo<nsISupports>::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;
|
||||
|
|
|
@ -173,7 +173,7 @@ nsHTTPHandler::NewChannel(const char* verb, nsIURI* i_URL,
|
|||
if (pChannel) {
|
||||
NS_ADDREF(pChannel);
|
||||
pChannel->Init(aGroup);
|
||||
rv = pChannel->QueryInterface(nsCOMTypeInfo<nsIChannel>::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<nsIProtocolHandler>::GetIID())) {
|
||||
if (aIID.Equals(NS_GET_IID(nsIProtocolHandler))) {
|
||||
*aInstancePtr = (void*) ((nsIProtocolHandler*)this);
|
||||
NS_ADDREF_THIS();
|
||||
return NS_OK;
|
||||
}
|
||||
if (aIID.Equals(nsCOMTypeInfo<nsIHTTPProtocolHandler>::GetIID())) {
|
||||
if (aIID.Equals(NS_GET_IID(nsIHTTPProtocolHandler))) {
|
||||
*aInstancePtr = (void*) ((nsIHTTPProtocolHandler*)this);
|
||||
NS_ADDREF_THIS();
|
||||
return NS_OK;
|
||||
}
|
||||
if (aIID.Equals(nsCOMTypeInfo<nsIProxy>::GetIID())) {
|
||||
if (aIID.Equals(NS_GET_IID(nsIProxy))) {
|
||||
*aInstancePtr = (void*) ((nsIProxy*)this);
|
||||
NS_ADDREF_THIS();
|
||||
return NS_OK;
|
||||
}
|
||||
if (aIID.Equals(nsCOMTypeInfo<nsISupports>::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<nsIURI>::GetIID(),
|
||||
rv = nsComponentManager::CreateInstance(kStandardUrlCID, nsnull, NS_GET_IID(nsIURI),
|
||||
(void**)&url);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
rv = url->SetSpec((char*)aSpec);
|
||||
|
|
|
@ -64,7 +64,7 @@ nsHTTPHandlerFactory::QueryInterface(const nsIID &aIID, void **aResult)
|
|||
// Always NULL result, in case of failure
|
||||
*aResult = nsnull;
|
||||
|
||||
if (aIID.Equals(nsCOMTypeInfo<nsISupports>::GetIID())) {
|
||||
if (aIID.Equals(NS_GET_IID(nsISupports))) {
|
||||
*aResult = NS_STATIC_CAST(nsISupports*, this);
|
||||
AddRef();
|
||||
return NS_OK;
|
||||
|
|
|
@ -36,7 +36,7 @@ nsHeaderEntry::~nsHeaderEntry()
|
|||
}
|
||||
|
||||
|
||||
NS_IMPL_ISUPPORTS(nsHeaderEntry, nsCOMTypeInfo<nsIHTTPHeader>::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<nsISimpleEnumerator>::GetIID())
|
||||
NS_GET_IID(nsISimpleEnumerator))
|
||||
|
||||
|
||||
//
|
||||
|
|
|
@ -92,13 +92,13 @@ nsHTTPRequest::QueryInterface(REFNSIID aIID, void** aInstancePtr)
|
|||
|
||||
*aInstancePtr = NULL;
|
||||
|
||||
if (aIID.Equals(nsCOMTypeInfo<nsIStreamObserver>::GetIID()) ||
|
||||
aIID.Equals(nsCOMTypeInfo<nsISupports>::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<nsIRequest>::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<nsIInputStream>::GetIID(), (void**)o_Stream);
|
||||
mRequest->QueryInterface(NS_GET_IID(nsIInputStream), (void**)o_Stream);
|
||||
return NS_OK;
|
||||
}
|
||||
else
|
||||
|
|
|
@ -48,7 +48,7 @@ nsHTTPResponse::~nsHTTPResponse()
|
|||
|
||||
}
|
||||
|
||||
NS_IMPL_ISUPPORTS(nsHTTPResponse, nsCOMTypeInfo<nsISupports>::GetIID())
|
||||
NS_IMPL_ISUPPORTS(nsHTTPResponse, NS_GET_IID(nsISupports))
|
||||
|
||||
|
||||
nsresult nsHTTPResponse::GetContentLength(PRInt32* o_Value)
|
||||
|
|
|
@ -84,7 +84,7 @@ nsHTTPResponseListener::~nsHTTPResponseListener()
|
|||
NS_IF_RELEASE(mConsumer);
|
||||
}
|
||||
|
||||
NS_IMPL_ISUPPORTS(nsHTTPResponseListener,nsCOMTypeInfo<nsIStreamListener>::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);
|
||||
|
|
|
@ -58,7 +58,7 @@ nsResourceProtocolHandler::~nsResourceProtocolHandler()
|
|||
{
|
||||
}
|
||||
|
||||
NS_IMPL_ISUPPORTS(nsResourceProtocolHandler, nsCOMTypeInfo<nsIProtocolHandler>::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<nsIURI>::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<nsIURL>::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<nsIURL>::GetIID(), (void**)&fileURL);
|
||||
rv = fileURI->QueryInterface(NS_GET_IID(nsIURL), (void**)&fileURL);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
(void)fileURL->SetQuery(query);
|
||||
NS_RELEASE(fileURL);
|
||||
|
|
|
@ -66,7 +66,7 @@ nsSocketProviderService::Create(nsISupports *aOuter, REFNSIID aIID, void **aResu
|
|||
return rv;
|
||||
}
|
||||
|
||||
NS_IMPL_ISUPPORTS(nsSocketProviderService, nsCOMTypeInfo<nsISocketProviderService>::GetIID());
|
||||
NS_IMPL_ISUPPORTS(nsSocketProviderService, NS_GET_IID(nsISocketProviderService));
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
|
|
@ -122,7 +122,7 @@ nsUnicharStreamLoader::QueryInterface(const nsIID &aIID, void** aInstancePtr)
|
|||
AddRef();
|
||||
return NS_OK;
|
||||
}
|
||||
if (aIID.Equals(nsCOMTypeInfo<nsISupports>::GetIID())) {
|
||||
if (aIID.Equals(NS_GET_IID(nsISupports))) {
|
||||
nsIUnicharStreamLoader* tmp = this;
|
||||
nsISupports* tmp2 = tmp;
|
||||
*aInstancePtr = (void*) tmp2;
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
|
||||
// nsISupports methods
|
||||
NS_IMPL_ISUPPORTS(nsMIMEInfoImpl, nsCOMTypeInfo<nsIMIMEInfo>::GetIID());
|
||||
NS_IMPL_ISUPPORTS(nsMIMEInfoImpl, NS_GET_IID(nsIMIMEInfo));
|
||||
|
||||
// nsMIMEInfoImpl methods
|
||||
nsMIMEInfoImpl::nsMIMEInfoImpl(const char *aMIMEType, const char *aFileExtensions, const char *aDescription) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче