Fix build on gcc 3.4 by removing extra semicolons (bug 218551). r/sr=dbaron, a=brendan.

This commit is contained in:
bryner%brianryner.com 2003-09-07 23:12:15 +00:00
Родитель 0675c941bf
Коммит 70b73feae9
61 изменённых файлов: 80 добавлений и 2641 удалений

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

@ -48,6 +48,6 @@ static const nsModuleComponentInfo components[] =
},
};
NS_IMPL_NSGETMODULE(nsJarProtocolModule, components);
NS_IMPL_NSGETMODULE(nsJarProtocolModule, components)

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

@ -151,8 +151,8 @@ nsStreamListenerEvent::Fire(nsIEventQueue* aEventQueue)
NS_IMPL_THREADSAFE_ISUPPORTS1(nsAsyncStreamObserver,
nsIRequestObserver)
NS_IMPL_ADDREF_INHERITED(nsAsyncStreamListener, nsAsyncStreamObserver);
NS_IMPL_RELEASE_INHERITED(nsAsyncStreamListener, nsAsyncStreamObserver);
NS_IMPL_ADDREF_INHERITED(nsAsyncStreamListener, nsAsyncStreamObserver)
NS_IMPL_RELEASE_INHERITED(nsAsyncStreamListener, nsAsyncStreamObserver)
NS_IMETHODIMP
nsAsyncStreamListener::QueryInterface(REFNSIID aIID, void** aInstancePtr)

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

@ -81,7 +81,7 @@ nsBufferedStream::~nsBufferedStream()
Close();
}
NS_IMPL_THREADSAFE_ISUPPORTS1(nsBufferedStream, nsISeekableStream);
NS_IMPL_THREADSAFE_ISUPPORTS1(nsBufferedStream, nsISeekableStream)
nsresult
nsBufferedStream::Init(nsISupports* stream, PRUint32 bufferSize)

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

@ -256,7 +256,7 @@ nsIOService::~nsIOService()
NS_IMPL_THREADSAFE_ISUPPORTS3(nsIOService,
nsIIOService,
nsIObserver,
nsISupportsWeakReference);
nsISupportsWeakReference)
////////////////////////////////////////////////////////////////////////////////

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

@ -214,7 +214,7 @@ nsLoadGroup::Create(nsISupports *aOuter, REFNSIID aIID, void **aResult)
////////////////////////////////////////////////////////////////////////////////
// nsISupports methods:
NS_IMPL_AGGREGATED(nsLoadGroup);
NS_IMPL_AGGREGATED(nsLoadGroup)
NS_IMETHODIMP
nsLoadGroup::AggregatedQueryInterface(const nsIID& aIID, void** aInstancePtr)

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

@ -90,7 +90,7 @@ private:
NS_IMPL_THREADSAFE_ISUPPORTS3(nsMIMEInputStream,
nsIMIMEInputStream,
nsIInputStream,
nsISeekableStream);
nsISeekableStream)
nsMIMEInputStream::nsMIMEInputStream() : mAddContentLength(PR_FALSE),
mStartedReading(PR_FALSE)

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

@ -1,214 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "nsNetModRegEntry.h"
#include "nsCRT.h"
#include "plstr.h"
#include "nsAutoLock.h"
#include "nsMemory.h"
#include "nsIServiceManager.h"
#include "nsIEventQueueService.h"
#include "nsIProxyObjectManager.h"
static NS_DEFINE_IID(kProxyObjectManagerCID, NS_PROXYEVENT_MANAGER_CID);
static NS_DEFINE_IID(kEventQueueServiceCID, NS_EVENTQUEUESERVICE_CID);
//////////////////////////////
//// nsISupports
//////////////////////////////
NS_IMPL_THREADSAFE_ISUPPORTS1(nsNetModRegEntry, nsINetModRegEntry);
//////////////////////////////
//// nsINetModRegEntry
//////////////////////////////
NS_IMETHODIMP
nsNetModRegEntry::GetSyncProxy(nsINetNotify **aNotify)
{
nsAutoMonitor mon(mMonitor);
if (mSyncProxy)
{
*aNotify = mSyncProxy;
NS_ADDREF(*aNotify);
return NS_OK;
}
nsresult rv = BuildProxy(PR_TRUE);
if (NS_SUCCEEDED(rv))
{
*aNotify = mSyncProxy;
NS_ADDREF(*aNotify);
}
return rv;
}
NS_IMETHODIMP
nsNetModRegEntry::GetAsyncProxy(nsINetNotify **aNotify)
{
nsAutoMonitor mon(mMonitor);
if (mAsyncProxy)
{
*aNotify = mAsyncProxy;
NS_ADDREF(*aNotify);
return NS_OK;
}
nsresult rv = BuildProxy(PR_FALSE);
if (NS_SUCCEEDED(rv))
{
*aNotify = mAsyncProxy;
NS_ADDREF(*aNotify);
}
return rv;
}
NS_IMETHODIMP
nsNetModRegEntry::GetTopic(char **topic)
{
nsAutoMonitor mon(mMonitor);
if (mTopic)
{
*topic = (char *) nsMemory::Clone(mTopic, strlen(mTopic) + 1);
return NS_OK;
}
return NS_ERROR_NULL_POINTER;
}
NS_IMETHODIMP
nsNetModRegEntry::Equals(nsINetModRegEntry* aEntry, PRBool *_retVal)
{
nsresult rv = NS_OK;
*_retVal = PR_FALSE;
char* topic;
rv = aEntry->GetTopic(&topic);
if (NS_FAILED(rv) || !topic)
return rv;
if (!PL_strcmp(topic, mTopic))
{
nsCOMPtr<nsINetNotify> aSyncProxy;
aEntry->GetSyncProxy(getter_AddRefs(aSyncProxy));
// mSyncProxy may not be initialized yet.
nsCOMPtr<nsINetNotify> mySyncProxy;
GetSyncProxy(getter_AddRefs(mySyncProxy));
if(aSyncProxy == mySyncProxy)
{
*_retVal = PR_TRUE;
}
}
nsMemory::Free(topic);
return rv;
}
//////////////////////////////
//// nsNetModRegEntry
//////////////////////////////
nsNetModRegEntry::nsNetModRegEntry(const char *aTopic,
nsINetNotify *aNotify,
nsresult *result)
{
mTopic = new char [PL_strlen(aTopic) + 1];
PL_strcpy(mTopic, aTopic);
mAsyncProxy = nsnull;
mSyncProxy = nsnull;
mRealNotifier = aNotify;
nsCOMPtr<nsIEventQueueService> eventQService =
do_GetService(kEventQueueServiceCID, result);
if (NS_FAILED(*result)) return;
*result = eventQService->GetThreadEventQueue(NS_CURRENT_THREAD, getter_AddRefs(mEventQ));
mMonitor = nsAutoMonitor::NewMonitor("nsNetModRegEntry");
}
nsresult
nsNetModRegEntry::BuildProxy(PRBool sync)
{
if (mEventQ == nsnull)
return NS_ERROR_NULL_POINTER;
nsresult result;
nsCOMPtr<nsIProxyObjectManager> proxyManager =
do_GetService(kProxyObjectManagerCID, &result);
if (NS_FAILED(result))
return result;
if (sync)
{
result = proxyManager->GetProxyForObject( mEventQ,
NS_GET_IID(nsINetNotify),
mRealNotifier,
PROXY_SYNC | PROXY_ALWAYS,
getter_AddRefs(mSyncProxy));
}
else
{
result = proxyManager->GetProxyForObject( mEventQ,
NS_GET_IID(nsINetNotify),
mRealNotifier,
PROXY_ASYNC | PROXY_ALWAYS,
getter_AddRefs(mAsyncProxy));
}
return result;
}
nsNetModRegEntry::~nsNetModRegEntry()
{
delete [] mTopic;
nsAutoMonitor::DestroyMonitor(mMonitor);
}

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

@ -1,209 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "nsAutoLock.h"
#include "nsNetModuleMgr.h"
#include "nsArrayEnumerator.h" // for nsArrayEnumerator
#include "nsString.h"
#include "nsXPIDLString.h"
#include "nsIEventQueue.h"
#include "nsCRT.h"
nsNetModuleMgr* nsNetModuleMgr::gManager;
///////////////////////////////////
//// nsISupports
///////////////////////////////////
NS_IMPL_THREADSAFE_ISUPPORTS1(nsNetModuleMgr, nsINetModuleMgr);
///////////////////////////////////
//// nsINetModuleMgr
///////////////////////////////////
NS_IMETHODIMP
nsNetModuleMgr::RegisterModule(const char *aTopic, nsINetNotify *aNotify)
{
nsresult rv;
PRInt32 cnt;
// XXX before registering an object for a particular topic
// XXX QI the nsINetNotify interface passed in for the interfaces
// XXX supported by the topic.
nsAutoMonitor mon(mMonitor);
nsNetModRegEntry *newEntry = new nsNetModRegEntry(aTopic, aNotify, &rv);
if (!newEntry)
return NS_ERROR_OUT_OF_MEMORY;
if (NS_FAILED(rv)) {
delete newEntry;
return rv;
}
nsCOMPtr<nsINetModRegEntry> newEntryI = do_QueryInterface(newEntry, &rv);
if (NS_FAILED(rv)) {
delete newEntry;
return rv;
}
// Check for a previous registration
cnt = mEntries.Count();
for (PRInt32 i = 0; i < cnt; i++)
{
nsINetModRegEntry* curEntry = mEntries[i];
PRBool same = PR_FALSE;
rv = newEntryI->Equals(curEntry, &same);
if (NS_FAILED(rv)) return rv;
// if we've already got this one registered, yank it, and replace it with the new one
if (same) {
mEntries.RemoveObjectAt(i);
break;
}
}
if (!mEntries.AppendObject(newEntryI))
return NS_ERROR_FAILURE;
return NS_OK;
}
NS_IMETHODIMP
nsNetModuleMgr::UnregisterModule(const char *aTopic, nsINetNotify *aNotify)
{
nsAutoMonitor mon(mMonitor);
nsresult rv;
nsCOMPtr<nsINetModRegEntry> tmpEntryI;
nsNetModRegEntry *tmpEntry = new nsNetModRegEntry(aTopic, aNotify, &rv);
if (!tmpEntry)
return NS_ERROR_OUT_OF_MEMORY;
if (NS_FAILED(rv)) return rv;
rv = tmpEntry->QueryInterface(NS_GET_IID(nsINetModRegEntry), getter_AddRefs(tmpEntryI));
if (NS_FAILED(rv)) return rv;
PRInt32 cnt;
cnt = mEntries.Count();
for (PRInt32 i = 0; i < cnt; i++) {
nsINetModRegEntry* curEntry = mEntries[i];
PRBool same = PR_FALSE;
rv = tmpEntryI->Equals(curEntry, &same);
if (NS_FAILED(rv)) return rv;
if (same) {
mEntries.RemoveObjectAt(i);
break;
}
}
return NS_OK;
}
NS_IMETHODIMP
nsNetModuleMgr::EnumerateModules(const char *aTopic, nsISimpleEnumerator **aEnumerator) {
nsresult rv;
// get all the entries for this topic
nsAutoMonitor mon(mMonitor);
PRInt32 cnt = mEntries.Count();
// create the new array
nsCOMArray<nsINetModRegEntry> topicEntries;
// run through the main entry array looking for topic matches.
for (PRInt32 i = 0; i < cnt; i++) {
nsINetModRegEntry* entry = mEntries[i];
nsXPIDLCString topic;
rv = entry->GetTopic(getter_Copies(topic));
if (NS_FAILED(rv)) return rv;
if (0 == PL_strcmp(aTopic, topic)) {
// found a match, add it to the list
if (!topicEntries.AppendObject(entry))
return NS_ERROR_FAILURE;
}
}
nsCOMPtr<nsISimpleEnumerator> enumerator;
rv = NS_NewArrayEnumerator(getter_AddRefs(enumerator), topicEntries);
if (NS_FAILED(rv)) return rv;
*aEnumerator = enumerator;
NS_ADDREF(*aEnumerator);
return NS_OK;
}
///////////////////////////////////
//// nsNetModuleMgr
///////////////////////////////////
nsNetModuleMgr::nsNetModuleMgr() {
mMonitor = nsAutoMonitor::NewMonitor("nsNetModuleMgr");
}
nsNetModuleMgr::~nsNetModuleMgr() {
nsAutoMonitor::DestroyMonitor(mMonitor);
gManager = nsnull;
}
NS_METHOD
nsNetModuleMgr::Create(nsISupports *aOuter, REFNSIID aIID, void **aResult)
{
if (aOuter)
return NS_ERROR_NO_AGGREGATION;
if (! gManager) {
gManager = new nsNetModuleMgr();
if (! gManager)
return NS_ERROR_OUT_OF_MEMORY;
}
NS_ADDREF(gManager);
nsresult rv = gManager->QueryInterface(aIID, aResult);
NS_RELEASE(gManager);
return rv;
}

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

@ -120,9 +120,9 @@ proxy_GetIntPref(nsIPrefBranch *aPrefBranch,
NS_IMPL_THREADSAFE_ISUPPORTS2(nsProtocolProxyService,
nsIProtocolProxyService,
nsIObserver);
nsIObserver)
NS_IMPL_THREADSAFE_ISUPPORTS1(nsProtocolProxyService::nsProxyInfo,
nsIProxyInfo);
nsIProxyInfo)
nsProtocolProxyService::nsProtocolProxyService()
: mUseProxy(0)

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

@ -69,7 +69,7 @@ nsSimpleURI::~nsSimpleURI()
{
}
NS_IMPL_AGGREGATED(nsSimpleURI);
NS_IMPL_AGGREGATED(nsSimpleURI)
NS_IMETHODIMP
nsSimpleURI::AggregatedQueryInterface(const nsIID& aIID, void** aInstancePtr)

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

@ -49,7 +49,7 @@
//Interfaces for addref, release and queryinterface
NS_IMPL_ISUPPORTS5(nsURIChecker, nsIURIChecker,
nsIRequest, nsIStreamListener,
nsIHttpEventSink, nsIInterfaceRequestor);
nsIHttpEventSink, nsIInterfaceRequestor)
nsURIChecker::nsURIChecker()
{

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

@ -160,7 +160,7 @@ NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsFileProtocolHandler, Init)
#ifdef NECKO_PROTOCOL_ftp
// ftp
#include "nsFtpProtocolHandler.h"
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsFtpProtocolHandler, Init);
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsFtpProtocolHandler, Init)
#endif
#ifdef NECKO_PROTOCOL_http
@ -337,7 +337,7 @@ UnregisterStreamConverters(nsIComponentManager *aCompMgr, nsIFile *aPath,
}
#ifdef BUILD_BINHEX_DECODER
NS_GENERIC_FACTORY_CONSTRUCTOR(nsBinHexDecoder);
NS_GENERIC_FACTORY_CONSTRUCTOR(nsBinHexDecoder)
#endif
static NS_IMETHODIMP

2
netwerk/cache/src/nsCacheEntry.cpp поставляемый
Просмотреть файл

@ -297,7 +297,7 @@ nsCacheEntry::DetachDescriptors(void)
* nsCacheEntryInfo - for implementing about:cache
*****************************************************************************/
NS_IMPL_ISUPPORTS1(nsCacheEntryInfo, nsICacheEntryInfo);
NS_IMPL_ISUPPORTS1(nsCacheEntryInfo, nsICacheEntryInfo)
NS_IMETHODIMP

4
netwerk/cache/src/nsCacheService.cpp поставляемый
Просмотреть файл

@ -107,7 +107,7 @@ private:
PRInt32 mMemoryCacheCapacity;
};
NS_IMPL_ISUPPORTS1(nsCacheProfilePrefObserver, nsIObserver);
NS_IMPL_ISUPPORTS1(nsCacheProfilePrefObserver, nsIObserver)
nsresult
@ -384,7 +384,7 @@ nsCacheProfilePrefObserver::MemoryCacheEnabled()
nsCacheService * nsCacheService::gService = nsnull;
NS_IMPL_THREADSAFE_ISUPPORTS1(nsCacheService, nsICacheService);
NS_IMPL_THREADSAFE_ISUPPORTS1(nsCacheService, nsICacheService)
nsCacheService::nsCacheService()
: mCacheServiceLock(nsnull),

2
netwerk/cache/src/nsDiskCacheBinding.cpp поставляемый
Просмотреть файл

@ -106,7 +106,7 @@ GetCacheEntryBinding(nsCacheEntry * entry)
* nsDiskCacheBinding
*****************************************************************************/
NS_IMPL_THREADSAFE_ISUPPORTS0(nsDiskCacheBinding);
NS_IMPL_THREADSAFE_ISUPPORTS0(nsDiskCacheBinding)
nsDiskCacheBinding::nsDiskCacheBinding(nsCacheEntry* entry, nsDiskCacheRecord * record)
: mCacheEntry(entry)

2
netwerk/cache/src/nsDiskCacheDevice.cpp поставляемый
Просмотреть файл

@ -183,7 +183,7 @@ private:
nsDiskCacheDevice* mDevice;
};
NS_IMPL_ISUPPORTS1(nsDiskCacheDeviceInfo, nsICacheDeviceInfo);
NS_IMPL_ISUPPORTS1(nsDiskCacheDeviceInfo, nsICacheDeviceInfo)
/* readonly attribute string description; */
NS_IMETHODIMP nsDiskCacheDeviceInfo::GetDescription(char ** aDescription)

2
netwerk/cache/src/nsDiskCacheEntry.cpp поставляемый
Просмотреть файл

@ -143,7 +143,7 @@ CreateDiskCacheEntry(nsDiskCacheBinding * binding)
* nsDiskCacheEntryInfo
*****************************************************************************/
NS_IMPL_ISUPPORTS1(nsDiskCacheEntryInfo, nsICacheEntryInfo);
NS_IMPL_ISUPPORTS1(nsDiskCacheEntryInfo, nsICacheEntryInfo)
NS_IMETHODIMP nsDiskCacheEntryInfo::GetClientID(char ** clientID)
{

2
netwerk/cache/src/nsMemoryCacheDevice.cpp поставляемый
Просмотреть файл

@ -503,7 +503,7 @@ nsMemoryCacheDevice::CheckEntryCount()
*****************************************************************************/
NS_IMPL_ISUPPORTS1(nsMemoryCacheDeviceInfo, nsICacheDeviceInfo);
NS_IMPL_ISUPPORTS1(nsMemoryCacheDeviceInfo, nsICacheDeviceInfo)
NS_IMETHODIMP

Разница между файлами не показана из-за своего большого размера Загрузить разницу

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

@ -65,7 +65,7 @@ static const PRUint32 kMaxDNSNodeLen = 63;
NS_IMPL_THREADSAFE_ISUPPORTS3(nsIDNService,
nsIIDNService,
nsIObserver,
nsISupportsWeakReference);
nsISupportsWeakReference)
nsresult nsIDNService::Init()
{

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

@ -41,7 +41,7 @@
#include "nsStringEnumerator.h"
// nsISupports methods
NS_IMPL_THREADSAFE_ISUPPORTS1(nsMIMEInfoImpl, nsIMIMEInfo);
NS_IMPL_THREADSAFE_ISUPPORTS1(nsMIMEInfoImpl, nsIMIMEInfo)
// nsMIMEInfoImpl methods
nsMIMEInfoImpl::nsMIMEInfoImpl() {

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

@ -41,7 +41,7 @@
#include "nsIStringStream.h"
#include "nsNetUtil.h"
NS_IMPL_ISUPPORTS1(nsAboutBlank, nsIAboutModule);
NS_IMPL_ISUPPORTS1(nsAboutBlank, nsIAboutModule)
static const char kBlankPage[] = "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">"
"<html><head><title></title></head><body></body></html>";

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

@ -70,7 +70,7 @@ nsFileProtocolHandler::Init()
NS_IMPL_THREADSAFE_ISUPPORTS3(nsFileProtocolHandler,
nsIFileProtocolHandler,
nsIProtocolHandler,
nsISupportsWeakReference);
nsISupportsWeakReference)
//-----------------------------------------------------------------------------
// nsIProtocolHandler methods:

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

@ -54,4 +54,4 @@ static const nsModuleComponentInfo components[] =
}
};
NS_IMPL_NSGETMODULE(nsFileProtocolModule, components);
NS_IMPL_NSGETMODULE(nsFileProtocolModule, components)

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

@ -359,7 +359,7 @@ DataRequestForwarder::OnTransportStatus(nsITransport *transport, nsresult status
NS_IMPL_THREADSAFE_ISUPPORTS3(nsFtpState,
nsIStreamListener,
nsIRequestObserver,
nsIRequest);
nsIRequest)
nsFtpState::nsFtpState()
{

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

@ -58,7 +58,7 @@ static NS_DEFINE_CID(kSocketTransportServiceCID, NS_SOCKETTRANSPORTSERVICE_CID);
NS_IMPL_THREADSAFE_ISUPPORTS2(nsFtpControlConnection,
nsIStreamListener,
nsIRequestObserver);
nsIRequestObserver)
nsFtpControlConnection::nsFtpControlConnection(const char* host,
PRUint32 port)

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

@ -104,7 +104,7 @@ NS_IMPL_THREADSAFE_ISUPPORTS4(nsFtpProtocolHandler,
nsIProtocolHandler,
nsIProxiedProtocolHandler,
nsIObserver,
nsISupportsWeakReference);
nsISupportsWeakReference)
nsresult
nsFtpProtocolHandler::Init()

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

@ -80,7 +80,7 @@ NS_IMPL_THREADSAFE_ISUPPORTS6(nsGopherChannel,
nsIStreamListener,
nsIRequestObserver,
nsIDirectoryListing,
nsITransportEventSink);
nsITransportEventSink)
nsresult
nsGopherChannel::Init(nsIURI* uri, nsIProxyInfo* proxyInfo)

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

@ -59,7 +59,7 @@ nsGopherHandler::~nsGopherHandler() {
NS_IMPL_THREADSAFE_ISUPPORTS2(nsGopherHandler,
nsIProxiedProtocolHandler,
nsIProtocolHandler);
nsIProtocolHandler)
NS_METHOD
nsGopherHandler::Create(nsISupports* aOuter, const nsIID& aIID, void* *aResult) {

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

@ -63,7 +63,7 @@ nsHttpBasicAuth::~nsHttpBasicAuth()
// nsHttpBasicAuth::nsISupports
//-----------------------------------------------------------------------------
NS_IMPL_ISUPPORTS1(nsHttpBasicAuth, nsIHttpAuthenticator);
NS_IMPL_ISUPPORTS1(nsHttpBasicAuth, nsIHttpAuthenticator)
//-----------------------------------------------------------------------------
// nsHttpBasicAuth::nsIHttpAuthenticator

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

@ -62,7 +62,7 @@ nsHttpDigestAuth::nsHttpDigestAuth()
// nsHttpDigestAuth::nsISupports
//-----------------------------------------------------------------------------
NS_IMPL_ISUPPORTS1(nsHttpDigestAuth, nsIHttpAuthenticator);
NS_IMPL_ISUPPORTS1(nsHttpDigestAuth, nsIHttpAuthenticator)
//-----------------------------------------------------------------------------
// nsHttpDigestAuth <protected>

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

@ -200,7 +200,7 @@ nsHttpNTLMAuth::Init()
return NS_OK;
}
NS_IMPL_ISUPPORTS1(nsHttpNTLMAuth, nsIHttpAuthenticator);
NS_IMPL_ISUPPORTS1(nsHttpNTLMAuth, nsIHttpAuthenticator)
NS_IMETHODIMP
nsHttpNTLMAuth::ChallengeReceived(nsIHttpChannel *channel,

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

@ -48,6 +48,6 @@ static const nsModuleComponentInfo components[] =
},
};
NS_IMPL_NSGETMODULE(nsJarProtocolModule, components);
NS_IMPL_NSGETMODULE(nsJarProtocolModule, components)

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

@ -43,7 +43,7 @@ nsSOCKS4SocketProvider::~nsSOCKS4SocketProvider()
{
}
NS_IMPL_THREADSAFE_ISUPPORTS2(nsSOCKS4SocketProvider, nsISocketProvider, nsISOCKS4SocketProvider);
NS_IMPL_THREADSAFE_ISUPPORTS2(nsSOCKS4SocketProvider, nsISocketProvider, nsISOCKS4SocketProvider)
NS_METHOD
nsSOCKS4SocketProvider::Create(nsISupports *aOuter, REFNSIID aIID, void **aResult)

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

@ -90,7 +90,7 @@ nsSOCKSSocketInfo::~nsSOCKSSocketInfo()
PR_FREEIF(mProxyHost);
}
NS_IMPL_THREADSAFE_ISUPPORTS1(nsSOCKSSocketInfo, nsISOCKSSocketInfo);
NS_IMPL_THREADSAFE_ISUPPORTS1(nsSOCKSSocketInfo, nsISOCKSSocketInfo)
NS_IMETHODIMP
nsSOCKSSocketInfo::GetProxyHost(char * *aProxyHost)

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

@ -43,7 +43,7 @@ nsSOCKSSocketProvider::~nsSOCKSSocketProvider()
{
}
NS_IMPL_THREADSAFE_ISUPPORTS2(nsSOCKSSocketProvider, nsISocketProvider, nsISOCKSSocketProvider);
NS_IMPL_THREADSAFE_ISUPPORTS2(nsSOCKSSocketProvider, nsISocketProvider, nsISOCKSSocketProvider)
NS_METHOD
nsSOCKSSocketProvider::Create(nsISupports *aOuter, REFNSIID aIID, void **aResult)

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

@ -82,7 +82,7 @@ nsSocketProviderService::Create(nsISupports *aOuter, REFNSIID aIID, void **aResu
return rv;
}
NS_IMPL_THREADSAFE_ISUPPORTS1(nsSocketProviderService, nsISocketProviderService);
NS_IMPL_THREADSAFE_ISUPPORTS1(nsSocketProviderService, nsISocketProviderService)
////////////////////////////////////////////////////////////////////////////////

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

@ -85,8 +85,8 @@ nsBinHexDecoder::~nsBinHexDecoder()
nsMemory::Free(mOutgoingBuffer);
}
NS_IMPL_ADDREF(nsBinHexDecoder);
NS_IMPL_RELEASE(nsBinHexDecoder);
NS_IMPL_ADDREF(nsBinHexDecoder)
NS_IMPL_RELEASE(nsBinHexDecoder)
NS_INTERFACE_MAP_BEGIN(nsBinHexDecoder)
NS_INTERFACE_MAP_ENTRY(nsIStreamConverter)

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

@ -41,16 +41,16 @@
#include "nsISupportsObsolete.h"
NS_IMPL_THREADSAFE_ISUPPORTS1(nsDirIndex,
nsIDirIndex);
nsIDirIndex)
nsDirIndex::nsDirIndex() : mType(TYPE_UNKNOWN),
mSize((PRUint32)(-1)),
mLastModified(-1) {
};
}
nsDirIndex::~nsDirIndex() {};
nsDirIndex::~nsDirIndex() {}
NS_IMPL_GETSET(nsDirIndex, Type, PRUint32, mType);
NS_IMPL_GETSET(nsDirIndex, Type, PRUint32, mType)
// GETSET macros for modern strings would be nice...
@ -99,6 +99,6 @@ nsDirIndex::SetDescription(const PRUnichar* aDescription) {
return NS_OK;
}
NS_IMPL_GETSET(nsDirIndex, Size, PRUint32, mSize);
NS_IMPL_GETSET(nsDirIndex, LastModified, PRInt64, mLastModified);
NS_IMPL_GETSET(nsDirIndex, Size, PRUint32, mSize)
NS_IMPL_GETSET(nsDirIndex, LastModified, PRInt64, mLastModified)

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

@ -105,7 +105,7 @@ nsDirIndexParser::~nsDirIndexParser() {
if (--gRefCntParser == 0) {
NS_IF_RELEASE(gTextToSubURI);
}
};
}
NS_IMETHODIMP
nsDirIndexParser::SetListener(nsIDirIndexListener* aListener) {

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

@ -77,7 +77,7 @@ PRLogModuleInfo* gFTPDirListConvLog = nsnull;
NS_IMPL_THREADSAFE_ISUPPORTS3(nsFTPDirListingConv,
nsIStreamConverter,
nsIStreamListener,
nsIRequestObserver);
nsIRequestObserver)
// nsIStreamConverter implementation

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

@ -45,7 +45,7 @@
NS_IMPL_THREADSAFE_ISUPPORTS3(nsGopherDirListingConv,
nsIStreamConverter,
nsIStreamListener,
nsIRequestObserver);
nsIRequestObserver)
// nsIStreamConverter implementation

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

@ -406,7 +406,7 @@ nsPartChannel::GetBaseChannel(nsIChannel ** aReturn)
NS_IMPL_THREADSAFE_ISUPPORTS3(nsMultiMixedConv,
nsIStreamConverter,
nsIStreamListener,
nsIRequestObserver);
nsIRequestObserver)
// nsIStreamConverter implementation

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

@ -46,7 +46,7 @@ NS_IMPL_THREADSAFE_ISUPPORTS4(nsTXTToHTMLConv,
nsIStreamConverter,
nsITXTToHTMLConv,
nsIRequestObserver,
nsIStreamListener);
nsIStreamListener)
// nsIStreamConverter methods

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

@ -92,8 +92,8 @@ nsUnknownDecoder::~nsUnknownDecoder()
//
// ----
NS_IMPL_ADDREF(nsUnknownDecoder);
NS_IMPL_RELEASE(nsUnknownDecoder);
NS_IMPL_ADDREF(nsUnknownDecoder)
NS_IMPL_RELEASE(nsUnknownDecoder)
NS_INTERFACE_MAP_BEGIN(nsUnknownDecoder)
NS_INTERFACE_MAP_ENTRY(nsIStreamConverter)

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

@ -41,7 +41,7 @@
#include "nsCRT.h"
NS_IMPL_THREADSAFE_ISUPPORTS2(nsAppleFileDecoder, nsIAppleFileDecoder, nsIOutputStream);
NS_IMPL_THREADSAFE_ISUPPORTS2(nsAppleFileDecoder, nsIAppleFileDecoder, nsIOutputStream)
nsAppleFileDecoder::nsAppleFileDecoder()
{

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

@ -103,4 +103,4 @@ static const nsModuleComponentInfo components[] =
},
};
NS_IMPL_NSGETMODULE(nsStreamConvModule, components);
NS_IMPL_NSGETMODULE(nsStreamConvModule, components)

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

@ -50,7 +50,7 @@
////////////////////////////////////////////////////////////
// nsISupports methods
NS_IMPL_THREADSAFE_ISUPPORTS1(nsStreamConverterService, nsIStreamConverterService);
NS_IMPL_THREADSAFE_ISUPPORTS1(nsStreamConverterService, nsIStreamConverterService)
////////////////////////////////////////////////////////////
@ -74,7 +74,7 @@ static PRBool PR_CALLBACK DeleteAdjacencyEntry(nsHashKey *aKey, void *aData, voi
delete entry->data.edges;
delete entry;
return PR_TRUE;
};
}
nsresult
nsStreamConverterService::Init() {
@ -263,7 +263,7 @@ static PRBool PR_CALLBACK InitBFSTable(nsHashKey *aKey, void *aData, void* closu
BFSTable->Put(aKey, data);
return PR_TRUE;
};
}
// cleans up the BFS state table
static PRBool PR_CALLBACK DeleteBFSEntry(nsHashKey *aKey, void *aData, void *closure) {

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

@ -7,7 +7,7 @@
// TestConverter
//////////////////////////////////////////////////
NS_IMPL_ISUPPORTS2(TestConverter, nsIStreamConverter, nsIStreamListener);
NS_IMPL_ISUPPORTS2(TestConverter, nsIStreamConverter, nsIStreamListener)
TestConverter::TestConverter() {
}
@ -69,7 +69,7 @@ TestConverter::AsyncConvertData(const PRUnichar *aFromType,
toType = aToType;
return NS_OK;
};
}
// nsIStreamListener method
/* This method handles asyncronous conversion of data. */
@ -90,20 +90,20 @@ TestConverter::OnDataAvailable(nsIRequest* request,
PRUint32 len;
convertedStream->Available(&len);
return mListener->OnDataAvailable(request, ctxt, convertedStream, sourceOffset, len);
};
}
// nsIRequestObserver methods
/* These methods just pass through directly to the mListener */
NS_IMETHODIMP
TestConverter::OnStartRequest(nsIRequest* request, nsISupports *ctxt) {
return mListener->OnStartRequest(request, ctxt);
};
}
NS_IMETHODIMP
TestConverter::OnStopRequest(nsIRequest* request, nsISupports *ctxt,
nsresult aStatus) {
return mListener->OnStopRequest(request, ctxt, aStatus);
};
}
////////////////////////////////////////////////////////////////////////

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

@ -118,7 +118,7 @@ public:
nsresult aStatus) { return NS_OK; }
};
NS_IMPL_ISUPPORTS1(EndListener, nsIStreamListener);
NS_IMPL_ISUPPORTS1(EndListener, nsIStreamListener)
////////////////////////////////////////////////////////////////////////
// EndListener END
////////////////////////////////////////////////////////////////////////

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

@ -88,7 +88,7 @@ public:
};
};
NS_IMPL_THREADSAFE_ISUPPORTS1(ConsumerContext, nsIEquals);
NS_IMPL_THREADSAFE_ISUPPORTS1(ConsumerContext, nsIEquals)
class Consumer : public nsIStreamListener {
public:
@ -111,7 +111,7 @@ public:
};
// nsISupports implementation
NS_IMPL_THREADSAFE_ISUPPORTS2(Consumer, nsIStreamListener, nsIRequestObserver);
NS_IMPL_THREADSAFE_ISUPPORTS2(Consumer, nsIStreamListener, nsIRequestObserver)
// nsIRequestObserver implementation

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

@ -191,8 +191,8 @@ private:
PRMonitor* mMonitor;
};
NS_IMPL_ADDREF(nsReader);
NS_IMPL_RELEASE(nsReader);
NS_IMPL_ADDREF(nsReader)
NS_IMPL_RELEASE(nsReader)
NS_IMETHODIMP
nsReader::QueryInterface(const nsIID& aIID, void* *aInstancePtr)

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

@ -182,7 +182,7 @@ protected:
PRUint32 mStopCount;
};
NS_IMPL_THREADSAFE_ISUPPORTS2(MyListener, nsIStreamListener, nsIRequestObserver);
NS_IMPL_THREADSAFE_ISUPPORTS2(MyListener, nsIStreamListener, nsIRequestObserver)
////////////////////////////////////////////////////////////////////////////////
@ -332,7 +332,7 @@ public:
virtual ~MyOpenObserver() {}
};
NS_IMPL_ISUPPORTS1(MyOpenObserver, nsIRequestObserver);
NS_IMPL_ISUPPORTS1(MyOpenObserver, nsIRequestObserver)
#endif
////////////////////////////////////////////////////////////////////////////////

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

@ -173,7 +173,7 @@ TestHttpEventSink::~TestHttpEventSink()
}
NS_IMPL_ISUPPORTS1(TestHttpEventSink, nsIHttpEventSink);
NS_IMPL_ISUPPORTS1(TestHttpEventSink, nsIHttpEventSink)
NS_IMETHODIMP
TestHttpEventSink::OnRedirect(nsIHttpChannel *channel, nsIChannel *newChannel)

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

@ -125,7 +125,7 @@ TestListener::~TestListener() {
printf( "TestListener dtor called on thread %d\n", mThreadNo );
}
NS_IMPL_ISUPPORTS2( TestListener, nsIStreamListener, nsIRequestObserver );
NS_IMPL_ISUPPORTS2( TestListener, nsIStreamListener, nsIRequestObserver )
NS_IMETHODIMP
TestListener::OnStartRequest( nsIChannel *aChannel, nsISupports *aContext ) {

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

@ -2043,8 +2043,8 @@ CPluginManager::QueryInterface(const nsIID& iid, void** ptr)
return NS_NOINTERFACE;
}
NS_IMPL_ADDREF(CPluginManager);
NS_IMPL_RELEASE(CPluginManager);
NS_IMPL_ADDREF(CPluginManager)
NS_IMPL_RELEASE(CPluginManager)
//////////////////////////////////////////////////////////////////////////////
//
@ -2324,8 +2324,8 @@ CPluginInstancePeer::SetWindowSize(PRUint32 width, PRUint32 height)
// nsISupports functions
//+++++++++++++++++++++++++++++++++++++++++++++++++
NS_IMPL_ADDREF(CPluginInstancePeer);
NS_IMPL_RELEASE(CPluginInstancePeer);
NS_IMPL_ADDREF(CPluginInstancePeer)
NS_IMPL_RELEASE(CPluginInstancePeer)
NS_METHOD
CPluginInstancePeer::QueryInterface(const nsIID& iid, void** ptr)

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

@ -302,7 +302,7 @@ void CSecureEnv::sendMessageFromJava(JNIEnv* javaEnv, JavaMessage* msg, Boolean
// Thes macro expands to the aggregated query interface scheme.
#if 0
NS_IMPL_AGGREGATED(CSecureEnv);
NS_IMPL_AGGREGATED(CSecureEnv)
NS_METHOD
CSecureEnv::AggregatedQueryInterface(const nsIID& aIID, void** aInstancePtr)

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

@ -124,7 +124,7 @@ public:
OSStatus read(void* buffer, SInt32 bufferSize, SInt32* bytesRead);
};
NS_IMPL_ISUPPORTS1(MRJInputStream, nsIPluginStreamListener);
NS_IMPL_ISUPPORTS1(MRJInputStream, nsIPluginStreamListener)
NS_IMETHODIMP
MRJInputStream::OnDataAvailable(nsIPluginStreamInfo* pluginInfo, nsIInputStream* input, PRUint32 length)

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

@ -1,54 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 2002
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Conrad Carlen <ccarlen@netscape.com>
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "nsProfile.h"
#include "nsIModule.h"
#include "nsIGenericFactory.h"
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsProfile, Init);
static const nsModuleComponentInfo components[] =
{
{ "Profile Manager",
NS_PROFILE_CID,
NS_PROFILE_CONTRACTID,
nsProfileConstructor,
},
};
NS_IMPL_NSGETMODULE(nsProfileModule, components);

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

@ -76,4 +76,4 @@ static const nsModuleComponentInfo components[] =
NS_PREFCONVERTER_CONTRACTID, nsPrefConverterConstructor}
};
NS_IMPL_NSGETMODULE(nsPrefMigrationModule, components);
NS_IMPL_NSGETMODULE(nsPrefMigrationModule, components)

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

@ -41,7 +41,7 @@
#include "nsStringEnumerator.h"
// nsISupports methods
NS_IMPL_THREADSAFE_ISUPPORTS1(nsMIMEInfoImpl, nsIMIMEInfo);
NS_IMPL_THREADSAFE_ISUPPORTS1(nsMIMEInfoImpl, nsIMIMEInfo)
// nsMIMEInfoImpl methods
nsMIMEInfoImpl::nsMIMEInfoImpl() {