2013-12-11 23:03:51 +04:00
|
|
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
|
|
|
/* vim: set sw=4 ts=8 et tw=80 : */
|
2012-05-21 15:12:37 +04:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2001-10-03 04:40:10 +04:00
|
|
|
|
2003-04-23 07:47:43 +04:00
|
|
|
#include "necko-config.h"
|
|
|
|
|
2013-06-22 20:01:06 +04:00
|
|
|
#define ALLOW_LATE_HTTPLOG_H_INCLUDE 1
|
2009-10-22 03:01:16 +04:00
|
|
|
#include "base/basictypes.h"
|
|
|
|
|
1999-09-30 05:53:31 +04:00
|
|
|
#include "nsCOMPtr.h"
|
2006-03-30 21:31:15 +04:00
|
|
|
#include "nsIClassInfoImpl.h"
|
2010-06-10 22:11:40 +04:00
|
|
|
#include "mozilla/ModuleUtils.h"
|
1999-09-30 05:53:31 +04:00
|
|
|
#include "nsIComponentManager.h"
|
|
|
|
#include "nsIServiceManager.h"
|
2000-06-02 04:23:56 +04:00
|
|
|
#include "nsICategoryManager.h"
|
1999-09-30 05:53:31 +04:00
|
|
|
#include "nscore.h"
|
|
|
|
#include "nsSimpleURI.h"
|
2006-06-20 01:02:12 +04:00
|
|
|
#include "nsSimpleNestedURI.h"
|
1999-09-30 05:53:31 +04:00
|
|
|
#include "nsLoadGroup.h"
|
2000-02-03 02:04:47 +03:00
|
|
|
#include "nsStreamLoader.h"
|
2015-11-30 17:54:11 +03:00
|
|
|
#include "nsIncrementalStreamLoader.h"
|
2000-01-25 00:28:28 +03:00
|
|
|
#include "nsFileStreams.h"
|
2000-02-04 10:31:43 +03:00
|
|
|
#include "nsBufferedStreams.h"
|
2002-02-16 04:19:24 +03:00
|
|
|
#include "nsMIMEInputStream.h"
|
2000-07-01 14:25:25 +04:00
|
|
|
#include "nsSOCKSSocketProvider.h"
|
2002-09-19 22:29:56 +04:00
|
|
|
#include "nsCacheService.h"
|
2008-08-27 03:09:02 +04:00
|
|
|
#include "nsDiskCacheDeviceSQL.h"
|
2012-04-30 21:57:09 +04:00
|
|
|
#include "nsApplicationCacheService.h"
|
2004-01-08 06:56:02 +03:00
|
|
|
#include "nsMimeTypes.h"
|
2008-11-08 02:00:26 +03:00
|
|
|
#include "nsDNSPrefetch.h"
|
2009-03-17 03:59:33 +03:00
|
|
|
#include "nsAboutProtocolHandler.h"
|
2011-05-04 17:36:23 +04:00
|
|
|
#include "nsXULAppAPI.h"
|
2012-11-21 04:19:53 +04:00
|
|
|
#include "nsCategoryCache.h"
|
|
|
|
#include "nsIContentSniffer.h"
|
2014-06-04 00:37:46 +04:00
|
|
|
#include "Predictor.h"
|
2013-09-22 07:04:57 +04:00
|
|
|
#include "nsIThreadPool.h"
|
2018-09-26 03:27:32 +03:00
|
|
|
#include "mozilla/net/BackgroundChannelRegistrar.h"
|
2013-06-22 20:01:06 +04:00
|
|
|
#include "mozilla/net/NeckoChild.h"
|
2018-08-22 07:37:28 +03:00
|
|
|
#include "RedirectChannelRegistrar.h"
|
2018-11-01 13:39:58 +03:00
|
|
|
#include "nsAuthGSSAPI.h"
|
1999-09-30 05:53:31 +04:00
|
|
|
|
2001-01-24 01:10:34 +03:00
|
|
|
#include "nsNetCID.h"
|
|
|
|
|
2016-06-02 23:42:36 +03:00
|
|
|
#if defined(XP_MACOSX) || defined(XP_WIN) || defined(XP_LINUX)
|
2016-06-01 23:16:40 +03:00
|
|
|
#define BUILD_NETWORK_INFO_SERVICE 1
|
|
|
|
#endif
|
|
|
|
|
2012-11-21 04:19:53 +04:00
|
|
|
typedef nsCategoryCache<nsIContentSniffer> ContentSnifferCache;
|
2014-06-02 16:08:21 +04:00
|
|
|
ContentSnifferCache* gNetSniffers = nullptr;
|
|
|
|
ContentSnifferCache* gDataSniffers = nullptr;
|
2012-11-21 04:19:53 +04:00
|
|
|
|
2000-05-06 13:15:56 +04:00
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2003-01-18 05:15:14 +03:00
|
|
|
#include "nsIOService.h"
|
2016-05-19 05:02:57 +03:00
|
|
|
typedef mozilla::net::nsIOService nsIOService;
|
2006-03-01 21:45:14 +03:00
|
|
|
NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(nsIOService, nsIOService::GetInstance)
|
2003-09-12 00:32:33 +04:00
|
|
|
|
|
|
|
#include "nsDNSService2.h"
|
2013-12-11 23:03:51 +04:00
|
|
|
NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(nsIDNSService,
|
2018-11-30 13:46:48 +03:00
|
|
|
nsDNSService::GetXPCOMSingleton)
|
2013-12-11 23:03:51 +04:00
|
|
|
|
2003-04-11 22:24:55 +04:00
|
|
|
#include "nsProtocolProxyService.h"
|
2016-05-19 05:02:57 +03:00
|
|
|
typedef mozilla::net::nsProtocolProxyService nsProtocolProxyService;
|
2003-04-11 22:24:55 +04:00
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsProtocolProxyService, Init)
|
2003-01-18 05:15:14 +03:00
|
|
|
|
|
|
|
#include "nsStreamTransportService.h"
|
2016-05-19 05:02:57 +03:00
|
|
|
typedef mozilla::net::nsStreamTransportService nsStreamTransportService;
|
2006-05-10 21:30:15 +04:00
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsStreamTransportService, Init)
|
2003-01-18 05:15:14 +03:00
|
|
|
|
|
|
|
#include "nsSocketTransportService2.h"
|
2016-05-19 05:02:57 +03:00
|
|
|
typedef mozilla::net::nsSocketTransportService nsSocketTransportService;
|
2003-01-18 05:15:14 +03:00
|
|
|
#undef LOG
|
2003-04-11 05:19:07 +04:00
|
|
|
#undef LOG_ENABLED
|
2003-01-18 05:15:14 +03:00
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsSocketTransportService, Init)
|
|
|
|
|
2003-11-15 03:13:59 +03:00
|
|
|
#include "nsServerSocket.h"
|
2016-05-19 05:02:57 +03:00
|
|
|
typedef mozilla::net::nsServerSocket nsServerSocket;
|
2003-11-15 03:13:59 +03:00
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsServerSocket)
|
|
|
|
|
2014-09-19 19:25:00 +04:00
|
|
|
#include "TLSServerSocket.h"
|
|
|
|
typedef mozilla::net::TLSServerSocket TLSServerSocket;
|
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(TLSServerSocket)
|
|
|
|
|
2013-05-10 16:00:22 +04:00
|
|
|
#include "nsUDPSocket.h"
|
2016-05-19 05:02:57 +03:00
|
|
|
typedef mozilla::net::nsUDPSocket nsUDPSocket;
|
2013-05-10 16:00:22 +04:00
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsUDPSocket)
|
2013-03-03 12:06:38 +04:00
|
|
|
|
2003-01-18 05:15:14 +03:00
|
|
|
#include "nsAsyncStreamCopier.h"
|
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsAsyncStreamCopier)
|
|
|
|
|
|
|
|
#include "nsInputStreamPump.h"
|
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsInputStreamPump)
|
|
|
|
|
|
|
|
#include "nsInputStreamChannel.h"
|
2016-05-19 05:02:57 +03:00
|
|
|
typedef mozilla::net::nsInputStreamChannel nsInputStreamChannel;
|
2005-11-12 21:17:19 +03:00
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsInputStreamChannel, Init)
|
2003-01-18 05:15:14 +03:00
|
|
|
|
2003-06-24 02:58:28 +04:00
|
|
|
#include "nsDownloader.h"
|
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsDownloader)
|
|
|
|
|
2012-12-11 00:06:37 +04:00
|
|
|
#include "BackgroundFileSaver.h"
|
|
|
|
namespace mozilla {
|
|
|
|
namespace net {
|
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(BackgroundFileSaverOutputStream, Init)
|
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(BackgroundFileSaverStreamListener, Init)
|
2018-11-30 13:46:48 +03:00
|
|
|
} // namespace net
|
|
|
|
} // namespace mozilla
|
2012-12-11 00:06:37 +04:00
|
|
|
|
2013-12-02 21:51:25 +04:00
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsAtomicFileOutputStream)
|
|
|
|
|
2004-07-07 00:35:40 +04:00
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsSafeFileOutputStream)
|
|
|
|
|
2016-05-19 05:02:57 +03:00
|
|
|
typedef mozilla::net::nsLoadGroup nsLoadGroup;
|
2015-07-31 23:50:08 +03:00
|
|
|
NS_GENERIC_AGGREGATED_CONSTRUCTOR_INIT(nsLoadGroup, Init)
|
2005-09-28 17:13:27 +04:00
|
|
|
|
2013-04-19 13:25:33 +04:00
|
|
|
#include "ArrayBufferInputStream.h"
|
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(ArrayBufferInputStream)
|
|
|
|
|
2006-06-09 22:23:10 +04:00
|
|
|
#include "nsEffectiveTLDService.h"
|
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsEffectiveTLDService, Init)
|
|
|
|
|
2010-10-26 15:57:18 +04:00
|
|
|
#include "nsSerializationHelper.h"
|
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsSerializationHelper)
|
|
|
|
|
2013-09-20 13:11:25 +04:00
|
|
|
#include "CacheStorageService.h"
|
|
|
|
typedef mozilla::net::CacheStorageService CacheStorageService;
|
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(CacheStorageService)
|
|
|
|
|
2015-10-11 19:13:09 +03:00
|
|
|
#include "LoadContextInfo.h"
|
|
|
|
typedef mozilla::net::LoadContextInfoFactory LoadContextInfoFactory;
|
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(LoadContextInfoFactory)
|
|
|
|
|
2014-10-14 01:34:03 +04:00
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#include "mozilla/net/CaptivePortalService.h"
|
|
|
|
namespace mozilla {
|
|
|
|
namespace net {
|
2018-11-30 13:46:48 +03:00
|
|
|
NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(nsICaptivePortalService,
|
|
|
|
CaptivePortalService::GetSingleton)
|
|
|
|
} // namespace net
|
|
|
|
} // namespace mozilla
|
2014-10-14 01:34:03 +04:00
|
|
|
|
2018-10-29 14:22:40 +03:00
|
|
|
#include "mozilla/net/NetworkConnectivityService.h"
|
|
|
|
namespace mozilla {
|
|
|
|
namespace net {
|
2018-11-30 13:46:48 +03:00
|
|
|
NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(
|
|
|
|
nsINetworkConnectivityService, NetworkConnectivityService::GetSingleton)
|
|
|
|
} // namespace net
|
|
|
|
} // namespace mozilla
|
2018-10-29 14:22:40 +03:00
|
|
|
|
2003-01-18 05:15:14 +03:00
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2018-11-30 13:46:48 +03:00
|
|
|
extern nsresult net_NewIncrementalDownload(nsISupports*, const nsIID&, void**);
|
2005-06-01 22:05:36 +04:00
|
|
|
|
2018-11-30 13:46:48 +03:00
|
|
|
#define NS_INCREMENTALDOWNLOAD_CID \
|
|
|
|
{ /* a62af1ba-79b3-4896-8aaf-b148bfce4280 */ \
|
|
|
|
0xa62af1ba, 0x79b3, 0x4896, { \
|
|
|
|
0x8a, 0xaf, 0xb1, 0x48, 0xbf, 0xce, 0x42, 0x80 \
|
|
|
|
} \
|
|
|
|
}
|
2005-06-01 22:05:36 +04:00
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2003-06-13 01:57:49 +04:00
|
|
|
#include "nsMIMEHeaderParamImpl.h"
|
|
|
|
|
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsMIMEHeaderParamImpl)
|
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2001-01-24 01:10:34 +03:00
|
|
|
#include "nsSimpleStreamListener.h"
|
|
|
|
|
2016-05-19 05:02:57 +03:00
|
|
|
typedef mozilla::net::nsSimpleStreamListener nsSimpleStreamListener;
|
2001-01-24 01:10:34 +03:00
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsSimpleStreamListener)
|
2000-05-06 13:15:56 +04:00
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2001-03-08 03:58:06 +03:00
|
|
|
#include "nsStreamListenerTee.h"
|
2016-05-19 05:02:57 +03:00
|
|
|
typedef mozilla::net::nsStreamListenerTee nsStreamListenerTee;
|
2001-03-08 03:58:06 +03:00
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsStreamListenerTee)
|
|
|
|
|
2003-10-11 03:08:01 +04:00
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2004-07-19 08:57:02 +04:00
|
|
|
#ifdef NECKO_COOKIES
|
2003-10-11 03:08:01 +04:00
|
|
|
#include "nsCookieService.h"
|
2010-03-26 02:02:28 +03:00
|
|
|
NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(nsICookieService,
|
2018-11-30 13:46:48 +03:00
|
|
|
nsCookieService::GetXPCOMSingleton)
|
2004-07-19 08:57:02 +04:00
|
|
|
#endif
|
2003-10-11 03:08:01 +04:00
|
|
|
|
2009-03-17 03:30:58 +03:00
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
#ifdef NECKO_WIFI
|
|
|
|
|
|
|
|
#include "nsWifiMonitor.h"
|
2009-08-21 02:55:07 +04:00
|
|
|
#undef LOG
|
|
|
|
#undef LOG_ENABLED
|
2009-03-17 03:30:58 +03:00
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsWifiMonitor)
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
2001-03-08 03:58:06 +03:00
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
2003-04-23 07:47:43 +04:00
|
|
|
// protocols
|
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
// about:blank is mandatory
|
|
|
|
#include "nsAboutProtocolHandler.h"
|
|
|
|
#include "nsAboutBlank.h"
|
2016-05-19 05:02:57 +03:00
|
|
|
typedef mozilla::net::nsAboutProtocolHandler nsAboutProtocolHandler;
|
|
|
|
typedef mozilla::net::nsSafeAboutProtocolHandler nsSafeAboutProtocolHandler;
|
2018-03-19 22:22:32 +03:00
|
|
|
typedef mozilla::net::nsNestedAboutURI::Mutator nsNestedAboutURIMutator;
|
2006-06-20 01:02:12 +04:00
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsAboutProtocolHandler)
|
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsSafeAboutProtocolHandler)
|
2018-03-19 22:22:32 +03:00
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsNestedAboutURIMutator)
|
2003-04-23 07:47:43 +04:00
|
|
|
|
|
|
|
// about
|
|
|
|
#include "nsAboutCache.h"
|
|
|
|
#include "nsAboutCacheEntry.h"
|
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsAboutCacheEntry)
|
2008-08-27 03:09:02 +04:00
|
|
|
|
2012-04-30 21:57:09 +04:00
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsApplicationCacheService)
|
2008-08-27 03:09:02 +04:00
|
|
|
|
2003-04-23 07:47:43 +04:00
|
|
|
// file
|
|
|
|
#include "nsFileProtocolHandler.h"
|
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsFileProtocolHandler, Init)
|
2001-03-08 03:58:06 +03:00
|
|
|
|
2003-04-23 07:47:43 +04:00
|
|
|
// ftp
|
|
|
|
#include "nsFtpProtocolHandler.h"
|
2003-09-08 03:12:15 +04:00
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsFtpProtocolHandler, Init)
|
2003-04-23 07:47:43 +04:00
|
|
|
|
|
|
|
// http/https
|
2001-05-12 01:04:09 +04:00
|
|
|
#include "nsHttpHandler.h"
|
2015-05-27 10:49:00 +03:00
|
|
|
#include "Http2Compression.h"
|
2009-08-21 02:55:07 +04:00
|
|
|
#undef LOG
|
|
|
|
#undef LOG_ENABLED
|
2003-03-27 22:31:53 +03:00
|
|
|
#include "nsHttpAuthManager.h"
|
2009-09-02 00:55:50 +04:00
|
|
|
#include "nsHttpActivityDistributor.h"
|
2016-02-24 00:26:45 +03:00
|
|
|
#include "ThrottleQueue.h"
|
2003-01-18 05:15:14 +03:00
|
|
|
#undef LOG
|
2003-04-11 05:19:07 +04:00
|
|
|
#undef LOG_ENABLED
|
2014-01-08 02:05:56 +04:00
|
|
|
namespace mozilla {
|
|
|
|
namespace net {
|
2018-11-30 13:46:48 +03:00
|
|
|
NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(nsHttpHandler,
|
|
|
|
nsHttpHandler::GetInstance)
|
2002-08-14 00:33:45 +04:00
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsHttpsHandler, Init)
|
2003-03-24 06:59:47 +03:00
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsHttpAuthManager, Init)
|
Rollup of bug 645263 and bug 646259: Switch to mozilla:: sync primitives. r=cjones,dbaron,doublec,ehsan src=bsmedberg
Bug 645263, part 0: Count sync primitive ctor/dtors. r=dbaron
Bug 645263, part 1: Migrate content/media to mozilla:: sync primitives. r=doublec
Bug 645263, part 2: Migrate modules/plugin to mozilla:: sync primitives. sr=bsmedberg
Bug 645263, part 3: Migrate nsComponentManagerImpl to mozilla:: sync primitives. sr=bsmedberg
Bug 645263, part 4: Migrate everything else to mozilla:: sync primitives. r=dbaron
Bug 645263, part 5: Remove nsAutoLock.*. sr=bsmedberg
Bug 645263, part 6: Make editor test be nicer to deadlock detector. r=ehsan
Bug 645263, part 7: Disable tracemalloc backtraces for xpcshell tests. r=dbaron
Bug 646259: Fix nsCacheService to use a CondVar for notifying. r=cjones
2011-04-01 08:29:02 +04:00
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsHttpActivityDistributor)
|
2016-02-24 00:26:45 +03:00
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(ThrottleQueue)
|
2018-11-30 13:46:48 +03:00
|
|
|
} // namespace net
|
|
|
|
} // namespace mozilla
|
2009-09-02 00:55:50 +04:00
|
|
|
|
2012-12-10 18:13:55 +04:00
|
|
|
#include "mozilla/net/Dashboard.h"
|
|
|
|
namespace mozilla {
|
|
|
|
namespace net {
|
2018-11-30 13:46:48 +03:00
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(Dashboard)
|
|
|
|
} // namespace net
|
|
|
|
} // namespace mozilla
|
2012-12-10 18:13:55 +04:00
|
|
|
|
2003-04-23 07:47:43 +04:00
|
|
|
// resource
|
2001-09-20 05:32:16 +04:00
|
|
|
#include "nsResProtocolHandler.h"
|
2015-07-20 04:42:16 +03:00
|
|
|
#include "ExtensionProtocolHandler.h"
|
2015-07-17 01:50:07 +03:00
|
|
|
#include "SubstitutingProtocolHandler.h"
|
2018-05-30 22:21:17 +03:00
|
|
|
typedef mozilla::net::ExtensionProtocolHandler ExtensionProtocolHandler;
|
2018-03-19 22:22:32 +03:00
|
|
|
typedef mozilla::net::SubstitutingURL::Mutator SubstitutingURLMutator;
|
2001-09-20 05:32:16 +04:00
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsResProtocolHandler, Init)
|
2015-07-17 01:50:07 +03:00
|
|
|
|
|
|
|
namespace mozilla {
|
2017-06-24 03:10:54 +03:00
|
|
|
NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(ExtensionProtocolHandler,
|
2018-11-30 13:46:48 +03:00
|
|
|
ExtensionProtocolHandler::GetSingleton)
|
2018-03-19 22:22:32 +03:00
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(SubstitutingURLMutator)
|
2018-11-30 13:46:48 +03:00
|
|
|
} // namespace mozilla
|
2001-09-20 05:32:16 +04:00
|
|
|
|
2005-11-12 21:17:19 +03:00
|
|
|
#include "nsViewSourceHandler.h"
|
2016-05-19 05:02:57 +03:00
|
|
|
typedef mozilla::net::nsViewSourceHandler nsViewSourceHandler;
|
2005-11-12 21:17:19 +03:00
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsViewSourceHandler)
|
|
|
|
|
|
|
|
#include "nsDataHandler.h"
|
|
|
|
|
2010-10-11 15:35:10 +04:00
|
|
|
#include "nsWyciwygProtocolHandler.h"
|
2013-11-21 02:20:16 +04:00
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsWyciwygProtocolHandler)
|
2010-10-11 15:35:10 +04:00
|
|
|
|
2011-07-05 08:18:33 +04:00
|
|
|
#include "WebSocketChannel.h"
|
2011-05-04 17:36:23 +04:00
|
|
|
#include "WebSocketChannelChild.h"
|
2011-05-22 05:27:52 +04:00
|
|
|
namespace mozilla {
|
|
|
|
namespace net {
|
2018-11-30 13:46:48 +03:00
|
|
|
static BaseWebSocketChannel* WebSocketChannelConstructor(bool aSecure) {
|
2011-05-04 17:36:23 +04:00
|
|
|
if (IsNeckoChild()) {
|
|
|
|
return new WebSocketChannelChild(aSecure);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (aSecure) {
|
2011-07-05 08:18:33 +04:00
|
|
|
return new WebSocketSSLChannel;
|
2011-05-04 17:36:23 +04:00
|
|
|
}
|
2017-02-09 13:21:38 +03:00
|
|
|
return new WebSocketChannel;
|
2011-05-04 17:36:23 +04:00
|
|
|
}
|
|
|
|
|
2018-11-30 13:46:48 +03:00
|
|
|
#define WEB_SOCKET_HANDLER_CONSTRUCTOR(type, secure) \
|
|
|
|
static nsresult type##Constructor(nsISupports* aOuter, REFNSIID aIID, \
|
|
|
|
void** aResult) { \
|
|
|
|
nsresult rv; \
|
|
|
|
\
|
|
|
|
BaseWebSocketChannel* inst; \
|
|
|
|
\
|
|
|
|
*aResult = nullptr; \
|
|
|
|
if (nullptr != aOuter) { \
|
|
|
|
rv = NS_ERROR_NO_AGGREGATION; \
|
|
|
|
return rv; \
|
|
|
|
} \
|
|
|
|
inst = WebSocketChannelConstructor(secure); \
|
|
|
|
NS_ADDREF(inst); \
|
|
|
|
rv = inst->QueryInterface(aIID, aResult); \
|
|
|
|
NS_RELEASE(inst); \
|
|
|
|
return rv; \
|
|
|
|
}
|
2011-05-04 17:36:23 +04:00
|
|
|
|
2011-07-05 08:18:33 +04:00
|
|
|
WEB_SOCKET_HANDLER_CONSTRUCTOR(WebSocketChannel, false)
|
|
|
|
WEB_SOCKET_HANDLER_CONSTRUCTOR(WebSocketSSLChannel, true)
|
2011-05-04 17:36:23 +04:00
|
|
|
#undef WEB_SOCKET_HANDLER_CONSTRUCTOR
|
2018-11-30 13:46:48 +03:00
|
|
|
} // namespace net
|
|
|
|
} // namespace mozilla
|
2013-09-23 14:12:11 +04:00
|
|
|
|
2001-09-20 05:32:16 +04:00
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2001-11-16 05:09:13 +03:00
|
|
|
#include "nsURLParsers.h"
|
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsNoAuthURLParser)
|
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsAuthURLParser)
|
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsStdURLParser)
|
|
|
|
|
|
|
|
#include "nsStandardURL.h"
|
2017-11-20 19:11:30 +03:00
|
|
|
typedef mozilla::net::nsStandardURL::Mutator nsStandardURLMutator;
|
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsStandardURLMutator)
|
|
|
|
typedef mozilla::net::nsSimpleURI::Mutator nsSimpleURIMutator;
|
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsSimpleURIMutator)
|
2005-09-28 17:13:27 +04:00
|
|
|
|
2018-03-19 22:22:32 +03:00
|
|
|
typedef mozilla::net::nsSimpleNestedURI::Mutator nsSimpleNestedURIMutator;
|
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsSimpleNestedURIMutator)
|
2006-06-20 01:02:12 +04:00
|
|
|
|
2001-11-16 05:09:13 +03:00
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2002-09-27 03:30:18 +04:00
|
|
|
#include "nsIDNService.h"
|
2003-04-11 21:05:56 +04:00
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsIDNService, Init)
|
2002-09-27 03:30:18 +04:00
|
|
|
|
2006-05-02 22:08:55 +04:00
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
2009-03-18 09:46:19 +03:00
|
|
|
#if defined(XP_WIN)
|
2006-05-02 22:08:55 +04:00
|
|
|
#include "nsNotifyAddrListener.h"
|
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsNotifyAddrListener, Init)
|
2008-10-01 02:27:06 +04:00
|
|
|
#elif defined(MOZ_WIDGET_COCOA)
|
|
|
|
#include "nsNetworkLinkService.h"
|
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsNetworkLinkService, Init)
|
2011-11-11 04:17:46 +04:00
|
|
|
#elif defined(MOZ_WIDGET_ANDROID)
|
2011-01-20 14:06:13 +03:00
|
|
|
#include "nsAndroidNetworkLinkService.h"
|
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsAndroidNetworkLinkService)
|
2015-01-15 02:22:00 +03:00
|
|
|
#elif defined(XP_LINUX)
|
|
|
|
#include "nsNotifyAddrListener_Linux.h"
|
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsNotifyAddrListener, Init)
|
2006-05-02 22:08:55 +04:00
|
|
|
#endif
|
|
|
|
|
2002-09-27 03:30:18 +04:00
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2000-05-06 13:15:56 +04:00
|
|
|
#include "nsFTPDirListingConv.h"
|
2003-07-12 02:13:30 +04:00
|
|
|
nsresult NS_NewFTPDirListingConv(nsFTPDirListingConv** result);
|
|
|
|
|
2013-10-11 11:32:47 +04:00
|
|
|
#include "nsStreamConverterService.h"
|
2000-05-06 13:15:56 +04:00
|
|
|
#include "nsMultiMixedConv.h"
|
|
|
|
#include "nsHTTPCompressConv.h"
|
|
|
|
#include "mozTXTToHTMLConv.h"
|
|
|
|
#include "nsUnknownDecoder.h"
|
2014-07-08 22:50:14 +04:00
|
|
|
|
2016-06-01 23:16:40 +03:00
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifdef BUILD_NETWORK_INFO_SERVICE
|
|
|
|
#include "nsNetworkInfoService.h"
|
|
|
|
typedef mozilla::net::nsNetworkInfoService nsNetworkInfoService;
|
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsNetworkInfoService, Init)
|
2018-11-30 13:46:48 +03:00
|
|
|
#endif // BUILD_NETWORK_INFO_SERVICE
|
2016-06-01 23:16:40 +03:00
|
|
|
|
2001-03-06 05:14:42 +03:00
|
|
|
#include "nsIndexedToHTML.h"
|
2001-03-08 03:41:53 +03:00
|
|
|
|
2018-11-30 13:46:48 +03:00
|
|
|
nsresult NS_NewMultiMixedConv(nsMultiMixedConv** result);
|
|
|
|
nsresult MOZ_NewTXTToHTMLConv(mozTXTToHTMLConv** result);
|
|
|
|
nsresult NS_NewHTTPCompressConv(mozilla::net::nsHTTPCompressConv** result);
|
|
|
|
nsresult NS_NewStreamConv(nsStreamConverterService** aStreamConv);
|
|
|
|
|
|
|
|
#define FTP_TO_INDEX "?from=text/ftp-dir&to=application/http-index-format"
|
|
|
|
#define INDEX_TO_HTML "?from=application/http-index-format&to=text/html"
|
|
|
|
#define MULTI_MIXED_X "?from=multipart/x-mixed-replace&to=*/*"
|
|
|
|
#define MULTI_MIXED "?from=multipart/mixed&to=*/*"
|
|
|
|
#define MULTI_BYTERANGES "?from=multipart/byteranges&to=*/*"
|
|
|
|
#define UNKNOWN_CONTENT "?from=" UNKNOWN_CONTENT_TYPE "&to=*/*"
|
|
|
|
#define GZIP_TO_UNCOMPRESSED "?from=gzip&to=uncompressed"
|
|
|
|
#define XGZIP_TO_UNCOMPRESSED "?from=x-gzip&to=uncompressed"
|
|
|
|
#define BROTLI_TO_UNCOMPRESSED "?from=br&to=uncompressed"
|
|
|
|
#define COMPRESS_TO_UNCOMPRESSED "?from=compress&to=uncompressed"
|
|
|
|
#define XCOMPRESS_TO_UNCOMPRESSED "?from=x-compress&to=uncompressed"
|
|
|
|
#define DEFLATE_TO_UNCOMPRESSED "?from=deflate&to=uncompressed"
|
2001-03-08 03:41:53 +03:00
|
|
|
|
2010-06-10 22:11:40 +04:00
|
|
|
static const mozilla::Module::CategoryEntry kNeckoCategories[] = {
|
2018-11-30 13:46:48 +03:00
|
|
|
{NS_ISTREAMCONVERTER_KEY, FTP_TO_INDEX, ""},
|
|
|
|
{NS_ISTREAMCONVERTER_KEY, INDEX_TO_HTML, ""},
|
|
|
|
{NS_ISTREAMCONVERTER_KEY, MULTI_MIXED_X, ""},
|
|
|
|
{NS_ISTREAMCONVERTER_KEY, MULTI_MIXED, ""},
|
|
|
|
{NS_ISTREAMCONVERTER_KEY, MULTI_BYTERANGES, ""},
|
|
|
|
{NS_ISTREAMCONVERTER_KEY, UNKNOWN_CONTENT, ""},
|
|
|
|
{NS_ISTREAMCONVERTER_KEY, GZIP_TO_UNCOMPRESSED, ""},
|
|
|
|
{NS_ISTREAMCONVERTER_KEY, XGZIP_TO_UNCOMPRESSED, ""},
|
|
|
|
{NS_ISTREAMCONVERTER_KEY, BROTLI_TO_UNCOMPRESSED, ""},
|
|
|
|
{NS_ISTREAMCONVERTER_KEY, COMPRESS_TO_UNCOMPRESSED, ""},
|
|
|
|
{NS_ISTREAMCONVERTER_KEY, XCOMPRESS_TO_UNCOMPRESSED, ""},
|
|
|
|
{NS_ISTREAMCONVERTER_KEY, DEFLATE_TO_UNCOMPRESSED, ""},
|
2010-06-10 22:11:40 +04:00
|
|
|
NS_BINARYDETECTOR_CATEGORYENTRY,
|
2018-11-30 13:46:48 +03:00
|
|
|
{nullptr}};
|
2001-03-08 03:41:53 +03:00
|
|
|
|
2018-11-30 13:46:48 +03:00
|
|
|
static nsresult CreateNewStreamConvServiceFactory(nsISupports* aOuter,
|
|
|
|
REFNSIID aIID,
|
|
|
|
void** aResult) {
|
|
|
|
if (!aResult) {
|
|
|
|
return NS_ERROR_INVALID_POINTER;
|
|
|
|
}
|
|
|
|
if (aOuter) {
|
|
|
|
*aResult = nullptr;
|
|
|
|
return NS_ERROR_NO_AGGREGATION;
|
|
|
|
}
|
|
|
|
nsStreamConverterService* inst = nullptr;
|
|
|
|
nsresult rv = NS_NewStreamConv(&inst);
|
|
|
|
if (NS_FAILED(rv)) {
|
|
|
|
*aResult = nullptr;
|
2017-07-06 15:00:35 +03:00
|
|
|
return rv;
|
2018-11-30 13:46:48 +03:00
|
|
|
}
|
|
|
|
rv = inst->QueryInterface(aIID, aResult);
|
|
|
|
if (NS_FAILED(rv)) {
|
|
|
|
*aResult = nullptr;
|
|
|
|
}
|
|
|
|
NS_RELEASE(inst); /* get rid of extra refcnt */
|
|
|
|
return rv;
|
2001-03-08 03:41:53 +03:00
|
|
|
}
|
2000-05-06 13:15:56 +04:00
|
|
|
|
2018-11-30 13:46:48 +03:00
|
|
|
static nsresult CreateNewFTPDirListingConv(nsISupports* aOuter, REFNSIID aIID,
|
|
|
|
void** aResult) {
|
|
|
|
if (!aResult) {
|
|
|
|
return NS_ERROR_INVALID_POINTER;
|
|
|
|
}
|
|
|
|
if (aOuter) {
|
|
|
|
*aResult = nullptr;
|
|
|
|
return NS_ERROR_NO_AGGREGATION;
|
|
|
|
}
|
|
|
|
nsFTPDirListingConv* inst = nullptr;
|
|
|
|
nsresult rv = NS_NewFTPDirListingConv(&inst);
|
|
|
|
if (NS_FAILED(rv)) {
|
|
|
|
*aResult = nullptr;
|
2017-07-06 15:00:35 +03:00
|
|
|
return rv;
|
2018-11-30 13:46:48 +03:00
|
|
|
}
|
|
|
|
rv = inst->QueryInterface(aIID, aResult);
|
|
|
|
if (NS_FAILED(rv)) {
|
|
|
|
*aResult = nullptr;
|
|
|
|
}
|
|
|
|
NS_RELEASE(inst); /* get rid of extra refcnt */
|
|
|
|
return rv;
|
2000-05-06 13:15:56 +04:00
|
|
|
}
|
|
|
|
|
2018-11-30 13:46:48 +03:00
|
|
|
static nsresult CreateNewMultiMixedConvFactory(nsISupports* aOuter,
|
|
|
|
REFNSIID aIID, void** aResult) {
|
|
|
|
if (!aResult) {
|
|
|
|
return NS_ERROR_INVALID_POINTER;
|
|
|
|
}
|
|
|
|
if (aOuter) {
|
|
|
|
*aResult = nullptr;
|
|
|
|
return NS_ERROR_NO_AGGREGATION;
|
|
|
|
}
|
|
|
|
nsMultiMixedConv* inst = nullptr;
|
|
|
|
nsresult rv = NS_NewMultiMixedConv(&inst);
|
|
|
|
if (NS_FAILED(rv)) {
|
|
|
|
*aResult = nullptr;
|
2017-07-06 15:00:35 +03:00
|
|
|
return rv;
|
2018-11-30 13:46:48 +03:00
|
|
|
}
|
|
|
|
rv = inst->QueryInterface(aIID, aResult);
|
|
|
|
if (NS_FAILED(rv)) {
|
|
|
|
*aResult = nullptr;
|
|
|
|
}
|
|
|
|
NS_RELEASE(inst); /* get rid of extra refcnt */
|
|
|
|
return rv;
|
2000-05-06 13:15:56 +04:00
|
|
|
}
|
|
|
|
|
2018-11-30 13:46:48 +03:00
|
|
|
static nsresult CreateNewTXTToHTMLConvFactory(nsISupports* aOuter,
|
|
|
|
REFNSIID aIID, void** aResult) {
|
|
|
|
if (!aResult) {
|
|
|
|
return NS_ERROR_INVALID_POINTER;
|
|
|
|
}
|
|
|
|
if (aOuter) {
|
|
|
|
*aResult = nullptr;
|
|
|
|
return NS_ERROR_NO_AGGREGATION;
|
|
|
|
}
|
|
|
|
mozTXTToHTMLConv* inst = nullptr;
|
|
|
|
nsresult rv = MOZ_NewTXTToHTMLConv(&inst);
|
|
|
|
if (NS_FAILED(rv)) {
|
|
|
|
*aResult = nullptr;
|
2017-07-06 15:00:35 +03:00
|
|
|
return rv;
|
2018-11-30 13:46:48 +03:00
|
|
|
}
|
|
|
|
rv = inst->QueryInterface(aIID, aResult);
|
|
|
|
if (NS_FAILED(rv)) {
|
|
|
|
*aResult = nullptr;
|
|
|
|
}
|
|
|
|
NS_RELEASE(inst); /* get rid of extra refcnt */
|
|
|
|
return rv;
|
2000-05-06 13:15:56 +04:00
|
|
|
}
|
|
|
|
|
2018-11-30 13:46:48 +03:00
|
|
|
static nsresult CreateNewHTTPCompressConvFactory(nsISupports* aOuter,
|
|
|
|
REFNSIID aIID,
|
|
|
|
void** aResult) {
|
|
|
|
if (!aResult) {
|
|
|
|
return NS_ERROR_INVALID_POINTER;
|
|
|
|
}
|
|
|
|
if (aOuter) {
|
|
|
|
*aResult = nullptr;
|
|
|
|
return NS_ERROR_NO_AGGREGATION;
|
|
|
|
}
|
|
|
|
mozilla::net::nsHTTPCompressConv* inst = nullptr;
|
|
|
|
nsresult rv = NS_NewHTTPCompressConv(&inst);
|
|
|
|
if (NS_FAILED(rv)) {
|
|
|
|
*aResult = nullptr;
|
2017-07-06 15:00:35 +03:00
|
|
|
return rv;
|
2018-11-30 13:46:48 +03:00
|
|
|
}
|
|
|
|
rv = inst->QueryInterface(aIID, aResult);
|
|
|
|
if (NS_FAILED(rv)) {
|
|
|
|
*aResult = nullptr;
|
|
|
|
}
|
|
|
|
NS_RELEASE(inst); /* get rid of extra refcnt */
|
|
|
|
return rv;
|
2000-05-06 13:15:56 +04:00
|
|
|
}
|
|
|
|
|
2018-11-30 13:46:48 +03:00
|
|
|
static nsresult CreateNewUnknownDecoderFactory(nsISupports* aOuter,
|
|
|
|
REFNSIID aIID, void** aResult) {
|
2000-05-06 13:15:56 +04:00
|
|
|
nsresult rv;
|
|
|
|
|
|
|
|
if (!aResult) {
|
|
|
|
return NS_ERROR_NULL_POINTER;
|
|
|
|
}
|
2012-07-30 18:20:58 +04:00
|
|
|
*aResult = nullptr;
|
2000-05-06 13:15:56 +04:00
|
|
|
|
|
|
|
if (aOuter) {
|
|
|
|
return NS_ERROR_NO_AGGREGATION;
|
|
|
|
}
|
|
|
|
|
2018-11-30 13:46:48 +03:00
|
|
|
nsUnknownDecoder* inst;
|
2017-07-06 15:00:35 +03:00
|
|
|
|
2000-05-06 13:15:56 +04:00
|
|
|
inst = new nsUnknownDecoder();
|
|
|
|
if (!inst) {
|
|
|
|
return NS_ERROR_OUT_OF_MEMORY;
|
|
|
|
}
|
|
|
|
NS_ADDREF(inst);
|
|
|
|
rv = inst->QueryInterface(aIID, aResult);
|
|
|
|
NS_RELEASE(inst);
|
|
|
|
|
|
|
|
return rv;
|
|
|
|
}
|
|
|
|
|
2018-11-30 13:46:48 +03:00
|
|
|
static nsresult CreateNewBinaryDetectorFactory(nsISupports* aOuter,
|
|
|
|
REFNSIID aIID, void** aResult) {
|
2004-01-08 06:56:02 +03:00
|
|
|
nsresult rv;
|
|
|
|
|
|
|
|
if (!aResult) {
|
|
|
|
return NS_ERROR_NULL_POINTER;
|
|
|
|
}
|
2012-07-30 18:20:58 +04:00
|
|
|
*aResult = nullptr;
|
2004-01-08 06:56:02 +03:00
|
|
|
|
|
|
|
if (aOuter) {
|
|
|
|
return NS_ERROR_NO_AGGREGATION;
|
|
|
|
}
|
|
|
|
|
2016-11-01 15:44:09 +03:00
|
|
|
auto* inst = new nsBinaryDetector();
|
2004-01-08 06:56:02 +03:00
|
|
|
if (!inst) {
|
|
|
|
return NS_ERROR_OUT_OF_MEMORY;
|
|
|
|
}
|
|
|
|
NS_ADDREF(inst);
|
|
|
|
rv = inst->QueryInterface(aIID, aResult);
|
|
|
|
NS_RELEASE(inst);
|
|
|
|
|
|
|
|
return rv;
|
|
|
|
}
|
|
|
|
|
1999-09-30 05:53:31 +04:00
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Module implementation for the net library
|
|
|
|
|
2005-04-05 21:40:32 +04:00
|
|
|
// Net module startup hook
|
2018-11-30 13:46:48 +03:00
|
|
|
static nsresult nsNetStartup() {
|
|
|
|
mozilla::net::nsStandardURL::InitGlobalObjects();
|
|
|
|
return NS_OK;
|
2005-04-05 21:40:32 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
// Net module shutdown hook
|
2018-11-30 13:46:48 +03:00
|
|
|
static void nsNetShutdown() {
|
|
|
|
// Release the url parser that the stdurl is holding.
|
|
|
|
mozilla::net::nsStandardURL::ShutdownGlobalObjects();
|
2002-07-02 22:15:19 +04:00
|
|
|
|
2018-11-30 13:46:48 +03:00
|
|
|
// Release global state used by the URL helper module.
|
|
|
|
net_ShutdownURLHelper();
|
2007-10-03 02:26:53 +04:00
|
|
|
#ifdef XP_MACOSX
|
2018-11-30 13:46:48 +03:00
|
|
|
net_ShutdownURLHelperOSX();
|
2007-10-03 02:26:53 +04:00
|
|
|
#endif
|
2017-07-06 15:00:35 +03:00
|
|
|
|
2018-11-30 13:46:48 +03:00
|
|
|
// Release DNS service reference.
|
|
|
|
nsDNSPrefetch::Shutdown();
|
2011-05-22 05:27:52 +04:00
|
|
|
|
2018-11-30 13:46:48 +03:00
|
|
|
// Release the Websocket Admission Manager
|
|
|
|
mozilla::net::WebSocketChannel::Shutdown();
|
2012-11-21 04:19:53 +04:00
|
|
|
|
2018-11-30 13:46:48 +03:00
|
|
|
mozilla::net::Http2CompressionCleanup();
|
2015-05-27 10:49:00 +03:00
|
|
|
|
2018-11-30 13:46:48 +03:00
|
|
|
mozilla::net::RedirectChannelRegistrar::Shutdown();
|
2018-08-22 07:37:28 +03:00
|
|
|
|
2018-11-30 13:46:48 +03:00
|
|
|
mozilla::net::BackgroundChannelRegistrar::Shutdown();
|
2018-09-26 03:27:32 +03:00
|
|
|
|
2018-11-30 13:46:48 +03:00
|
|
|
nsAuthGSSAPI::Shutdown();
|
2018-11-01 13:39:58 +03:00
|
|
|
|
2018-11-30 13:46:48 +03:00
|
|
|
delete gNetSniffers;
|
|
|
|
gNetSniffers = nullptr;
|
|
|
|
delete gDataSniffers;
|
|
|
|
gDataSniffers = nullptr;
|
2000-05-25 12:27:40 +04:00
|
|
|
}
|
|
|
|
|
2010-06-10 22:11:40 +04:00
|
|
|
NS_DEFINE_NAMED_CID(NS_IOSERVICE_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_STREAMTRANSPORTSERVICE_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_SOCKETTRANSPORTSERVICE_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_SERVERSOCKET_CID);
|
2014-09-19 19:25:00 +04:00
|
|
|
NS_DEFINE_NAMED_CID(NS_TLSSERVERSOCKET_CID);
|
2013-05-10 16:00:22 +04:00
|
|
|
NS_DEFINE_NAMED_CID(NS_UDPSOCKET_CID);
|
2010-06-10 22:11:40 +04:00
|
|
|
NS_DEFINE_NAMED_CID(NS_DNSSERVICE_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_IDNSERVICE_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_EFFECTIVETLDSERVICE_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_SIMPLEURI_CID);
|
2017-11-20 19:11:30 +03:00
|
|
|
NS_DEFINE_NAMED_CID(NS_SIMPLEURIMUTATOR_CID);
|
2010-06-10 22:11:40 +04:00
|
|
|
NS_DEFINE_NAMED_CID(NS_SIMPLENESTEDURI_CID);
|
2018-03-19 22:22:32 +03:00
|
|
|
NS_DEFINE_NAMED_CID(NS_SIMPLENESTEDURIMUTATOR_CID);
|
2010-06-10 22:11:40 +04:00
|
|
|
NS_DEFINE_NAMED_CID(NS_ASYNCSTREAMCOPIER_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_INPUTSTREAMPUMP_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_INPUTSTREAMCHANNEL_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_STREAMLOADER_CID);
|
2015-11-30 17:54:11 +03:00
|
|
|
NS_DEFINE_NAMED_CID(NS_INCREMENTALSTREAMLOADER_CID);
|
2010-06-10 22:11:40 +04:00
|
|
|
NS_DEFINE_NAMED_CID(NS_DOWNLOADER_CID);
|
2012-12-11 00:06:37 +04:00
|
|
|
NS_DEFINE_NAMED_CID(NS_BACKGROUNDFILESAVEROUTPUTSTREAM_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_BACKGROUNDFILESAVERSTREAMLISTENER_CID);
|
2010-06-10 22:11:40 +04:00
|
|
|
NS_DEFINE_NAMED_CID(NS_SIMPLESTREAMLISTENER_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_STREAMLISTENERTEE_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_LOADGROUP_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_LOCALFILEINPUTSTREAM_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_LOCALFILEOUTPUTSTREAM_CID);
|
2013-12-02 21:51:25 +04:00
|
|
|
NS_DEFINE_NAMED_CID(NS_ATOMICLOCALFILEOUTPUTSTREAM_CID);
|
2010-06-10 22:11:40 +04:00
|
|
|
NS_DEFINE_NAMED_CID(NS_SAFELOCALFILEOUTPUTSTREAM_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_INCREMENTALDOWNLOAD_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_STDURLPARSER_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_NOAUTHURLPARSER_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_AUTHURLPARSER_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_STANDARDURL_CID);
|
2017-11-20 19:11:30 +03:00
|
|
|
NS_DEFINE_NAMED_CID(NS_STANDARDURLMUTATOR_CID);
|
2013-04-19 13:25:33 +04:00
|
|
|
NS_DEFINE_NAMED_CID(NS_ARRAYBUFFERINPUTSTREAM_CID);
|
2010-06-10 22:11:40 +04:00
|
|
|
NS_DEFINE_NAMED_CID(NS_BUFFEREDINPUTSTREAM_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_BUFFEREDOUTPUTSTREAM_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_MIMEINPUTSTREAM_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_PROTOCOLPROXYSERVICE_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_STREAMCONVERTERSERVICE_CID);
|
2012-12-10 18:13:55 +04:00
|
|
|
NS_DEFINE_NAMED_CID(NS_DASHBOARD_CID);
|
2010-06-10 22:11:40 +04:00
|
|
|
NS_DEFINE_NAMED_CID(NS_FTPDIRLISTINGCONVERTER_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_NSINDEXEDTOHTMLCONVERTER_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_MULTIMIXEDCONVERTER_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_UNKNOWNDECODER_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_BINARYDETECTOR_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_HTTPCOMPRESSCONVERTER_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(MOZITXTTOHTMLCONV_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_MIMEHEADERPARAM_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_FILEPROTOCOLHANDLER_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_HTTPPROTOCOLHANDLER_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_HTTPSPROTOCOLHANDLER_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_HTTPAUTHMANAGER_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_HTTPACTIVITYDISTRIBUTOR_CID);
|
2016-02-24 00:26:45 +03:00
|
|
|
NS_DEFINE_NAMED_CID(NS_THROTTLEQUEUE_CID);
|
2010-06-10 22:11:40 +04:00
|
|
|
NS_DEFINE_NAMED_CID(NS_FTPPROTOCOLHANDLER_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_RESPROTOCOLHANDLER_CID);
|
2015-07-20 04:42:16 +03:00
|
|
|
NS_DEFINE_NAMED_CID(NS_EXTENSIONPROTOCOLHANDLER_CID);
|
2015-07-17 01:50:07 +03:00
|
|
|
NS_DEFINE_NAMED_CID(NS_SUBSTITUTINGURL_CID);
|
2018-03-19 22:22:32 +03:00
|
|
|
NS_DEFINE_NAMED_CID(NS_SUBSTITUTINGURLMUTATOR_CID);
|
2010-06-10 22:11:40 +04:00
|
|
|
NS_DEFINE_NAMED_CID(NS_ABOUTPROTOCOLHANDLER_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_SAFEABOUTPROTOCOLHANDLER_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_ABOUT_BLANK_MODULE_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_NESTEDABOUTURI_CID);
|
2018-03-19 22:22:32 +03:00
|
|
|
NS_DEFINE_NAMED_CID(NS_NESTEDABOUTURIMUTATOR_CID);
|
2010-06-10 22:11:40 +04:00
|
|
|
NS_DEFINE_NAMED_CID(NS_ABOUT_CACHE_MODULE_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_ABOUT_CACHE_ENTRY_MODULE_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_CACHESERVICE_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_APPLICATIONCACHESERVICE_CID);
|
2004-07-19 08:57:02 +04:00
|
|
|
#ifdef NECKO_COOKIES
|
2010-06-10 22:11:40 +04:00
|
|
|
NS_DEFINE_NAMED_CID(NS_COOKIEMANAGER_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_COOKIESERVICE_CID);
|
2004-07-19 08:57:02 +04:00
|
|
|
#endif
|
2009-03-17 03:30:58 +03:00
|
|
|
#ifdef NECKO_WIFI
|
2010-06-10 22:11:40 +04:00
|
|
|
NS_DEFINE_NAMED_CID(NS_WIFI_MONITOR_COMPONENT_CID);
|
2009-03-17 03:30:58 +03:00
|
|
|
#endif
|
2010-06-10 22:11:40 +04:00
|
|
|
NS_DEFINE_NAMED_CID(NS_DATAPROTOCOLHANDLER_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_VIEWSOURCEHANDLER_CID);
|
2010-10-11 15:35:10 +04:00
|
|
|
NS_DEFINE_NAMED_CID(NS_WYCIWYGPROTOCOLHANDLER_CID);
|
2011-05-22 05:27:52 +04:00
|
|
|
NS_DEFINE_NAMED_CID(NS_WEBSOCKETPROTOCOLHANDLER_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_WEBSOCKETSSLPROTOCOLHANDLER_CID);
|
2010-06-10 22:11:40 +04:00
|
|
|
#if defined(XP_WIN)
|
|
|
|
NS_DEFINE_NAMED_CID(NS_NETWORK_LINK_SERVICE_CID);
|
|
|
|
#elif defined(MOZ_WIDGET_COCOA)
|
|
|
|
NS_DEFINE_NAMED_CID(NS_NETWORK_LINK_SERVICE_CID);
|
2011-11-11 04:17:46 +04:00
|
|
|
#elif defined(MOZ_WIDGET_ANDROID)
|
2011-01-20 14:06:13 +03:00
|
|
|
NS_DEFINE_NAMED_CID(NS_NETWORK_LINK_SERVICE_CID);
|
2015-01-15 02:22:00 +03:00
|
|
|
#elif defined(XP_LINUX)
|
|
|
|
NS_DEFINE_NAMED_CID(NS_NETWORK_LINK_SERVICE_CID);
|
2010-06-10 22:11:40 +04:00
|
|
|
#endif
|
2010-10-26 15:57:18 +04:00
|
|
|
NS_DEFINE_NAMED_CID(NS_SERIALIZATION_HELPER_CID);
|
2013-09-20 13:11:25 +04:00
|
|
|
NS_DEFINE_NAMED_CID(NS_CACHE_STORAGE_SERVICE_CID);
|
2015-10-11 19:13:09 +03:00
|
|
|
NS_DEFINE_NAMED_CID(NS_NSILOADCONTEXTINFOFACTORY_CID);
|
2014-06-04 00:37:46 +04:00
|
|
|
NS_DEFINE_NAMED_CID(NS_NETWORKPREDICTOR_CID);
|
2014-10-14 01:34:03 +04:00
|
|
|
NS_DEFINE_NAMED_CID(NS_CAPTIVEPORTAL_CID);
|
2018-10-29 14:22:40 +03:00
|
|
|
NS_DEFINE_NAMED_CID(NS_NETWORKCONNECTIVITYSERVICE_CID);
|
2016-06-01 23:16:40 +03:00
|
|
|
#ifdef BUILD_NETWORK_INFO_SERVICE
|
|
|
|
NS_DEFINE_NAMED_CID(NETWORKINFOSERVICE_CID);
|
2018-11-30 13:46:48 +03:00
|
|
|
#endif // BUILD_NETWORK_INFO_SERVICE
|
2010-06-10 22:11:40 +04:00
|
|
|
|
|
|
|
static const mozilla::Module::CIDEntry kNeckoCIDs[] = {
|
2018-10-12 23:48:24 +03:00
|
|
|
// clang-format off
|
2013-09-19 23:28:26 +04:00
|
|
|
{ &kNS_IOSERVICE_CID, false, nullptr, nsIOServiceConstructor },
|
|
|
|
{ &kNS_STREAMTRANSPORTSERVICE_CID, false, nullptr, nsStreamTransportServiceConstructor },
|
|
|
|
{ &kNS_SOCKETTRANSPORTSERVICE_CID, false, nullptr, nsSocketTransportServiceConstructor },
|
|
|
|
{ &kNS_SERVERSOCKET_CID, false, nullptr, nsServerSocketConstructor },
|
2014-09-19 19:25:00 +04:00
|
|
|
{ &kNS_TLSSERVERSOCKET_CID, false, nullptr, TLSServerSocketConstructor },
|
2013-05-10 16:00:22 +04:00
|
|
|
{ &kNS_UDPSOCKET_CID, false, nullptr, nsUDPSocketConstructor },
|
2013-12-11 23:03:51 +04:00
|
|
|
{ &kNS_DNSSERVICE_CID, false, nullptr, nsIDNSServiceConstructor },
|
2013-09-19 23:28:26 +04:00
|
|
|
{ &kNS_IDNSERVICE_CID, false, nullptr, nsIDNServiceConstructor },
|
|
|
|
{ &kNS_EFFECTIVETLDSERVICE_CID, false, nullptr, nsEffectiveTLDServiceConstructor },
|
2018-03-19 22:22:32 +03:00
|
|
|
{ &kNS_SIMPLEURI_CID, false, nullptr, nsSimpleURIMutatorConstructor }, // do_CreateInstance returns mutator
|
2017-11-20 19:11:30 +03:00
|
|
|
{ &kNS_SIMPLEURIMUTATOR_CID, false, nullptr, nsSimpleURIMutatorConstructor },
|
2018-03-19 22:22:32 +03:00
|
|
|
{ &kNS_SIMPLENESTEDURI_CID, false, nullptr, nsSimpleNestedURIMutatorConstructor }, // do_CreateInstance returns mutator
|
|
|
|
{ &kNS_SIMPLENESTEDURIMUTATOR_CID, false, nullptr, nsSimpleNestedURIMutatorConstructor },
|
2013-09-19 23:28:26 +04:00
|
|
|
{ &kNS_ASYNCSTREAMCOPIER_CID, false, nullptr, nsAsyncStreamCopierConstructor },
|
|
|
|
{ &kNS_INPUTSTREAMPUMP_CID, false, nullptr, nsInputStreamPumpConstructor },
|
|
|
|
{ &kNS_INPUTSTREAMCHANNEL_CID, false, nullptr, nsInputStreamChannelConstructor },
|
2016-05-19 05:02:57 +03:00
|
|
|
{ &kNS_STREAMLOADER_CID, false, nullptr, mozilla::net::nsStreamLoader::Create },
|
2015-11-30 17:54:11 +03:00
|
|
|
{ &kNS_INCREMENTALSTREAMLOADER_CID, false, nullptr, nsIncrementalStreamLoader::Create },
|
2013-09-19 23:28:26 +04:00
|
|
|
{ &kNS_DOWNLOADER_CID, false, nullptr, nsDownloaderConstructor },
|
|
|
|
{ &kNS_BACKGROUNDFILESAVEROUTPUTSTREAM_CID, false, nullptr,
|
2012-12-11 00:06:37 +04:00
|
|
|
mozilla::net::BackgroundFileSaverOutputStreamConstructor },
|
2013-09-19 23:28:26 +04:00
|
|
|
{ &kNS_BACKGROUNDFILESAVERSTREAMLISTENER_CID, false, nullptr,
|
2012-12-11 00:06:37 +04:00
|
|
|
mozilla::net::BackgroundFileSaverStreamListenerConstructor },
|
2013-09-19 23:28:26 +04:00
|
|
|
{ &kNS_SIMPLESTREAMLISTENER_CID, false, nullptr, nsSimpleStreamListenerConstructor },
|
|
|
|
{ &kNS_STREAMLISTENERTEE_CID, false, nullptr, nsStreamListenerTeeConstructor },
|
|
|
|
{ &kNS_LOADGROUP_CID, false, nullptr, nsLoadGroupConstructor },
|
|
|
|
{ &kNS_LOCALFILEINPUTSTREAM_CID, false, nullptr, nsFileInputStream::Create },
|
|
|
|
{ &kNS_LOCALFILEOUTPUTSTREAM_CID, false, nullptr, nsFileOutputStream::Create },
|
2013-12-02 21:51:25 +04:00
|
|
|
{ &kNS_ATOMICLOCALFILEOUTPUTSTREAM_CID, false, nullptr, nsAtomicFileOutputStreamConstructor },
|
2013-09-19 23:28:26 +04:00
|
|
|
{ &kNS_SAFELOCALFILEOUTPUTSTREAM_CID, false, nullptr, nsSafeFileOutputStreamConstructor },
|
|
|
|
{ &kNS_INCREMENTALDOWNLOAD_CID, false, nullptr, net_NewIncrementalDownload },
|
|
|
|
{ &kNS_STDURLPARSER_CID, false, nullptr, nsStdURLParserConstructor },
|
|
|
|
{ &kNS_NOAUTHURLPARSER_CID, false, nullptr, nsNoAuthURLParserConstructor },
|
|
|
|
{ &kNS_AUTHURLPARSER_CID, false, nullptr, nsAuthURLParserConstructor },
|
2018-03-19 22:22:32 +03:00
|
|
|
{ &kNS_STANDARDURL_CID, false, nullptr, nsStandardURLMutatorConstructor }, // do_CreateInstance returns mutator
|
2017-11-20 19:11:30 +03:00
|
|
|
{ &kNS_STANDARDURLMUTATOR_CID, false, nullptr, nsStandardURLMutatorConstructor },
|
2013-09-19 23:28:26 +04:00
|
|
|
{ &kNS_ARRAYBUFFERINPUTSTREAM_CID, false, nullptr, ArrayBufferInputStreamConstructor },
|
|
|
|
{ &kNS_BUFFEREDINPUTSTREAM_CID, false, nullptr, nsBufferedInputStream::Create },
|
|
|
|
{ &kNS_BUFFEREDOUTPUTSTREAM_CID, false, nullptr, nsBufferedOutputStream::Create },
|
|
|
|
{ &kNS_MIMEINPUTSTREAM_CID, false, nullptr, nsMIMEInputStreamConstructor },
|
|
|
|
{ &kNS_PROTOCOLPROXYSERVICE_CID, true, nullptr, nsProtocolProxyServiceConstructor },
|
|
|
|
{ &kNS_STREAMCONVERTERSERVICE_CID, false, nullptr, CreateNewStreamConvServiceFactory },
|
|
|
|
{ &kNS_DASHBOARD_CID, false, nullptr, mozilla::net::DashboardConstructor },
|
|
|
|
{ &kNS_FTPDIRLISTINGCONVERTER_CID, false, nullptr, CreateNewFTPDirListingConv },
|
|
|
|
{ &kNS_NSINDEXEDTOHTMLCONVERTER_CID, false, nullptr, nsIndexedToHTML::Create },
|
|
|
|
{ &kNS_MULTIMIXEDCONVERTER_CID, false, nullptr, CreateNewMultiMixedConvFactory },
|
|
|
|
{ &kNS_UNKNOWNDECODER_CID, false, nullptr, CreateNewUnknownDecoderFactory },
|
|
|
|
{ &kNS_BINARYDETECTOR_CID, false, nullptr, CreateNewBinaryDetectorFactory },
|
|
|
|
{ &kNS_HTTPCOMPRESSCONVERTER_CID, false, nullptr, CreateNewHTTPCompressConvFactory },
|
|
|
|
{ &kMOZITXTTOHTMLCONV_CID, false, nullptr, CreateNewTXTToHTMLConvFactory },
|
|
|
|
{ &kNS_MIMEHEADERPARAM_CID, false, nullptr, nsMIMEHeaderParamImplConstructor },
|
|
|
|
{ &kNS_FILEPROTOCOLHANDLER_CID, false, nullptr, nsFileProtocolHandlerConstructor },
|
2014-01-08 02:05:56 +04:00
|
|
|
{ &kNS_HTTPPROTOCOLHANDLER_CID, false, nullptr, mozilla::net::nsHttpHandlerConstructor },
|
|
|
|
{ &kNS_HTTPSPROTOCOLHANDLER_CID, false, nullptr, mozilla::net::nsHttpsHandlerConstructor },
|
|
|
|
{ &kNS_HTTPAUTHMANAGER_CID, false, nullptr, mozilla::net::nsHttpAuthManagerConstructor },
|
|
|
|
{ &kNS_HTTPACTIVITYDISTRIBUTOR_CID, false, nullptr, mozilla::net::nsHttpActivityDistributorConstructor },
|
2016-02-24 00:26:45 +03:00
|
|
|
{ &kNS_THROTTLEQUEUE_CID, false, nullptr, mozilla::net::ThrottleQueueConstructor },
|
2013-09-19 23:28:26 +04:00
|
|
|
{ &kNS_FTPPROTOCOLHANDLER_CID, false, nullptr, nsFtpProtocolHandlerConstructor },
|
|
|
|
{ &kNS_RESPROTOCOLHANDLER_CID, false, nullptr, nsResProtocolHandlerConstructor },
|
2015-07-20 04:42:16 +03:00
|
|
|
{ &kNS_EXTENSIONPROTOCOLHANDLER_CID, false, nullptr, mozilla::ExtensionProtocolHandlerConstructor },
|
2018-03-19 22:22:32 +03:00
|
|
|
{ &kNS_SUBSTITUTINGURL_CID, false, nullptr, mozilla::SubstitutingURLMutatorConstructor }, // do_CreateInstance returns mutator
|
|
|
|
{ &kNS_SUBSTITUTINGURLMUTATOR_CID, false, nullptr, mozilla::SubstitutingURLMutatorConstructor },
|
2013-09-19 23:28:26 +04:00
|
|
|
{ &kNS_ABOUTPROTOCOLHANDLER_CID, false, nullptr, nsAboutProtocolHandlerConstructor },
|
|
|
|
{ &kNS_SAFEABOUTPROTOCOLHANDLER_CID, false, nullptr, nsSafeAboutProtocolHandlerConstructor },
|
|
|
|
{ &kNS_ABOUT_BLANK_MODULE_CID, false, nullptr, nsAboutBlank::Create },
|
2018-03-19 22:22:32 +03:00
|
|
|
{ &kNS_NESTEDABOUTURI_CID, false, nullptr, nsNestedAboutURIMutatorConstructor }, // do_CreateInstance returns mutator
|
|
|
|
{ &kNS_NESTEDABOUTURIMUTATOR_CID, false, nullptr, nsNestedAboutURIMutatorConstructor },
|
2013-09-19 23:28:26 +04:00
|
|
|
{ &kNS_ABOUT_CACHE_MODULE_CID, false, nullptr, nsAboutCache::Create },
|
|
|
|
{ &kNS_ABOUT_CACHE_ENTRY_MODULE_CID, false, nullptr, nsAboutCacheEntryConstructor },
|
|
|
|
{ &kNS_CACHESERVICE_CID, false, nullptr, nsCacheService::Create },
|
|
|
|
{ &kNS_APPLICATIONCACHESERVICE_CID, false, nullptr, nsApplicationCacheServiceConstructor },
|
2010-06-10 22:11:40 +04:00
|
|
|
#ifdef NECKO_COOKIES
|
2013-09-19 23:28:26 +04:00
|
|
|
{ &kNS_COOKIEMANAGER_CID, false, nullptr, nsICookieServiceConstructor },
|
|
|
|
{ &kNS_COOKIESERVICE_CID, false, nullptr, nsICookieServiceConstructor },
|
2010-06-10 22:11:40 +04:00
|
|
|
#endif
|
|
|
|
#ifdef NECKO_WIFI
|
2013-09-19 23:28:26 +04:00
|
|
|
{ &kNS_WIFI_MONITOR_COMPONENT_CID, false, nullptr, nsWifiMonitorConstructor },
|
2010-06-10 22:11:40 +04:00
|
|
|
#endif
|
2013-09-19 23:28:26 +04:00
|
|
|
{ &kNS_DATAPROTOCOLHANDLER_CID, false, nullptr, nsDataHandler::Create },
|
|
|
|
{ &kNS_VIEWSOURCEHANDLER_CID, false, nullptr, nsViewSourceHandlerConstructor },
|
|
|
|
{ &kNS_WYCIWYGPROTOCOLHANDLER_CID, false, nullptr, nsWyciwygProtocolHandlerConstructor },
|
|
|
|
{ &kNS_WEBSOCKETPROTOCOLHANDLER_CID, false, nullptr,
|
2011-07-05 08:18:33 +04:00
|
|
|
mozilla::net::WebSocketChannelConstructor },
|
2013-09-19 23:28:26 +04:00
|
|
|
{ &kNS_WEBSOCKETSSLPROTOCOLHANDLER_CID, false, nullptr,
|
2011-07-05 08:18:33 +04:00
|
|
|
mozilla::net::WebSocketSSLChannelConstructor },
|
2010-06-10 22:11:40 +04:00
|
|
|
#if defined(XP_WIN)
|
2013-09-19 23:28:26 +04:00
|
|
|
{ &kNS_NETWORK_LINK_SERVICE_CID, false, nullptr, nsNotifyAddrListenerConstructor },
|
2010-06-10 22:11:40 +04:00
|
|
|
#elif defined(MOZ_WIDGET_COCOA)
|
2013-09-19 23:28:26 +04:00
|
|
|
{ &kNS_NETWORK_LINK_SERVICE_CID, false, nullptr, nsNetworkLinkServiceConstructor },
|
2011-11-11 04:17:46 +04:00
|
|
|
#elif defined(MOZ_WIDGET_ANDROID)
|
2013-09-19 23:28:26 +04:00
|
|
|
{ &kNS_NETWORK_LINK_SERVICE_CID, false, nullptr, nsAndroidNetworkLinkServiceConstructor },
|
2015-01-15 02:22:00 +03:00
|
|
|
#elif defined(XP_LINUX)
|
|
|
|
{ &kNS_NETWORK_LINK_SERVICE_CID, false, nullptr, nsNotifyAddrListenerConstructor },
|
2010-06-10 22:11:40 +04:00
|
|
|
#endif
|
2013-09-19 23:28:26 +04:00
|
|
|
{ &kNS_SERIALIZATION_HELPER_CID, false, nullptr, nsSerializationHelperConstructor },
|
2013-09-20 13:11:25 +04:00
|
|
|
{ &kNS_CACHE_STORAGE_SERVICE_CID, false, nullptr, CacheStorageServiceConstructor },
|
2015-10-11 19:13:09 +03:00
|
|
|
{ &kNS_NSILOADCONTEXTINFOFACTORY_CID, false, nullptr, LoadContextInfoFactoryConstructor },
|
2014-06-04 00:37:46 +04:00
|
|
|
{ &kNS_NETWORKPREDICTOR_CID, false, nullptr, mozilla::net::Predictor::Create },
|
2018-07-02 16:30:33 +03:00
|
|
|
{ &kNS_CAPTIVEPORTAL_CID, false, nullptr, mozilla::net::nsICaptivePortalServiceConstructor },
|
2018-10-29 14:22:40 +03:00
|
|
|
{ &kNS_NETWORKCONNECTIVITYSERVICE_CID, false, nullptr, mozilla::net::nsINetworkConnectivityServiceConstructor },
|
2016-06-01 23:16:40 +03:00
|
|
|
#ifdef BUILD_NETWORK_INFO_SERVICE
|
|
|
|
{ &kNETWORKINFOSERVICE_CID, false, nullptr, nsNetworkInfoServiceConstructor },
|
|
|
|
#endif
|
2013-09-19 23:28:26 +04:00
|
|
|
{ nullptr }
|
2018-10-12 23:48:24 +03:00
|
|
|
// clang-format on
|
2010-06-10 22:11:40 +04:00
|
|
|
};
|
2006-05-02 22:08:55 +04:00
|
|
|
|
2010-06-10 22:11:40 +04:00
|
|
|
static const mozilla::Module::ContractIDEntry kNeckoContracts[] = {
|
2018-10-12 23:48:24 +03:00
|
|
|
// clang-format off
|
2010-06-10 22:11:40 +04:00
|
|
|
{ NS_IOSERVICE_CONTRACTID, &kNS_IOSERVICE_CID },
|
|
|
|
{ NS_NETUTIL_CONTRACTID, &kNS_IOSERVICE_CID },
|
|
|
|
{ NS_STREAMTRANSPORTSERVICE_CONTRACTID, &kNS_STREAMTRANSPORTSERVICE_CID },
|
|
|
|
{ NS_SOCKETTRANSPORTSERVICE_CONTRACTID, &kNS_SOCKETTRANSPORTSERVICE_CID },
|
|
|
|
{ NS_SERVERSOCKET_CONTRACTID, &kNS_SERVERSOCKET_CID },
|
2014-09-19 19:25:00 +04:00
|
|
|
{ NS_TLSSERVERSOCKET_CONTRACTID, &kNS_TLSSERVERSOCKET_CID },
|
2013-05-10 16:00:22 +04:00
|
|
|
{ NS_UDPSOCKET_CONTRACTID, &kNS_UDPSOCKET_CID },
|
2010-06-10 22:11:40 +04:00
|
|
|
{ NS_DNSSERVICE_CONTRACTID, &kNS_DNSSERVICE_CID },
|
|
|
|
{ NS_IDNSERVICE_CONTRACTID, &kNS_IDNSERVICE_CID },
|
|
|
|
{ NS_EFFECTIVETLDSERVICE_CONTRACTID, &kNS_EFFECTIVETLDSERVICE_CID },
|
2017-11-20 19:11:30 +03:00
|
|
|
{ NS_SIMPLEURIMUTATOR_CONTRACTID, &kNS_SIMPLEURIMUTATOR_CID },
|
2010-06-10 22:11:40 +04:00
|
|
|
{ NS_ASYNCSTREAMCOPIER_CONTRACTID, &kNS_ASYNCSTREAMCOPIER_CID },
|
|
|
|
{ NS_INPUTSTREAMPUMP_CONTRACTID, &kNS_INPUTSTREAMPUMP_CID },
|
|
|
|
{ NS_INPUTSTREAMCHANNEL_CONTRACTID, &kNS_INPUTSTREAMCHANNEL_CID },
|
|
|
|
{ NS_STREAMLOADER_CONTRACTID, &kNS_STREAMLOADER_CID },
|
2015-11-30 17:54:11 +03:00
|
|
|
{ NS_INCREMENTALSTREAMLOADER_CONTRACTID, &kNS_INCREMENTALSTREAMLOADER_CID },
|
2010-06-10 22:11:40 +04:00
|
|
|
{ NS_DOWNLOADER_CONTRACTID, &kNS_DOWNLOADER_CID },
|
2012-12-11 00:06:37 +04:00
|
|
|
{ NS_BACKGROUNDFILESAVEROUTPUTSTREAM_CONTRACTID, &kNS_BACKGROUNDFILESAVEROUTPUTSTREAM_CID },
|
|
|
|
{ NS_BACKGROUNDFILESAVERSTREAMLISTENER_CONTRACTID, &kNS_BACKGROUNDFILESAVERSTREAMLISTENER_CID },
|
2010-06-10 22:11:40 +04:00
|
|
|
{ NS_SIMPLESTREAMLISTENER_CONTRACTID, &kNS_SIMPLESTREAMLISTENER_CID },
|
|
|
|
{ NS_STREAMLISTENERTEE_CONTRACTID, &kNS_STREAMLISTENERTEE_CID },
|
|
|
|
{ NS_LOADGROUP_CONTRACTID, &kNS_LOADGROUP_CID },
|
|
|
|
{ NS_LOCALFILEINPUTSTREAM_CONTRACTID, &kNS_LOCALFILEINPUTSTREAM_CID },
|
|
|
|
{ NS_LOCALFILEOUTPUTSTREAM_CONTRACTID, &kNS_LOCALFILEOUTPUTSTREAM_CID },
|
2013-12-02 21:51:25 +04:00
|
|
|
{ NS_ATOMICLOCALFILEOUTPUTSTREAM_CONTRACTID, &kNS_ATOMICLOCALFILEOUTPUTSTREAM_CID },
|
2010-06-10 22:11:40 +04:00
|
|
|
{ NS_SAFELOCALFILEOUTPUTSTREAM_CONTRACTID, &kNS_SAFELOCALFILEOUTPUTSTREAM_CID },
|
|
|
|
{ NS_INCREMENTALDOWNLOAD_CONTRACTID, &kNS_INCREMENTALDOWNLOAD_CID },
|
|
|
|
{ NS_STDURLPARSER_CONTRACTID, &kNS_STDURLPARSER_CID },
|
|
|
|
{ NS_NOAUTHURLPARSER_CONTRACTID, &kNS_NOAUTHURLPARSER_CID },
|
|
|
|
{ NS_AUTHURLPARSER_CONTRACTID, &kNS_AUTHURLPARSER_CID },
|
2017-11-20 19:11:30 +03:00
|
|
|
{ NS_STANDARDURLMUTATOR_CONTRACTID, &kNS_STANDARDURLMUTATOR_CID },
|
2013-04-19 13:25:33 +04:00
|
|
|
{ NS_ARRAYBUFFERINPUTSTREAM_CONTRACTID, &kNS_ARRAYBUFFERINPUTSTREAM_CID },
|
2010-06-10 22:11:40 +04:00
|
|
|
{ NS_BUFFEREDINPUTSTREAM_CONTRACTID, &kNS_BUFFEREDINPUTSTREAM_CID },
|
|
|
|
{ NS_BUFFEREDOUTPUTSTREAM_CONTRACTID, &kNS_BUFFEREDOUTPUTSTREAM_CID },
|
|
|
|
{ NS_MIMEINPUTSTREAM_CONTRACTID, &kNS_MIMEINPUTSTREAM_CID },
|
|
|
|
{ NS_PROTOCOLPROXYSERVICE_CONTRACTID, &kNS_PROTOCOLPROXYSERVICE_CID },
|
|
|
|
{ NS_STREAMCONVERTERSERVICE_CONTRACTID, &kNS_STREAMCONVERTERSERVICE_CID },
|
2012-12-10 18:13:55 +04:00
|
|
|
{ NS_DASHBOARD_CONTRACTID, &kNS_DASHBOARD_CID },
|
2010-06-10 22:11:40 +04:00
|
|
|
{ NS_ISTREAMCONVERTER_KEY FTP_TO_INDEX, &kNS_FTPDIRLISTINGCONVERTER_CID },
|
|
|
|
{ NS_ISTREAMCONVERTER_KEY INDEX_TO_HTML, &kNS_NSINDEXEDTOHTMLCONVERTER_CID },
|
|
|
|
{ NS_ISTREAMCONVERTER_KEY MULTI_MIXED_X, &kNS_MULTIMIXEDCONVERTER_CID },
|
|
|
|
{ NS_ISTREAMCONVERTER_KEY MULTI_BYTERANGES, &kNS_MULTIMIXEDCONVERTER_CID },
|
|
|
|
{ NS_ISTREAMCONVERTER_KEY MULTI_MIXED, &kNS_MULTIMIXEDCONVERTER_CID },
|
|
|
|
{ NS_ISTREAMCONVERTER_KEY UNKNOWN_CONTENT, &kNS_UNKNOWNDECODER_CID },
|
|
|
|
{ NS_BINARYDETECTOR_CONTRACTID, &kNS_BINARYDETECTOR_CID },
|
|
|
|
{ NS_ISTREAMCONVERTER_KEY GZIP_TO_UNCOMPRESSED, &kNS_HTTPCOMPRESSCONVERTER_CID },
|
|
|
|
{ NS_ISTREAMCONVERTER_KEY XGZIP_TO_UNCOMPRESSED, &kNS_HTTPCOMPRESSCONVERTER_CID },
|
2015-09-22 19:55:23 +03:00
|
|
|
{ NS_ISTREAMCONVERTER_KEY BROTLI_TO_UNCOMPRESSED, &kNS_HTTPCOMPRESSCONVERTER_CID },
|
2010-06-10 22:11:40 +04:00
|
|
|
{ NS_ISTREAMCONVERTER_KEY COMPRESS_TO_UNCOMPRESSED, &kNS_HTTPCOMPRESSCONVERTER_CID },
|
|
|
|
{ NS_ISTREAMCONVERTER_KEY XCOMPRESS_TO_UNCOMPRESSED, &kNS_HTTPCOMPRESSCONVERTER_CID },
|
|
|
|
{ NS_ISTREAMCONVERTER_KEY DEFLATE_TO_UNCOMPRESSED, &kNS_HTTPCOMPRESSCONVERTER_CID },
|
|
|
|
{ MOZ_TXTTOHTMLCONV_CONTRACTID, &kMOZITXTTOHTMLCONV_CID },
|
|
|
|
{ NS_MIMEHEADERPARAM_CONTRACTID, &kNS_MIMEHEADERPARAM_CID },
|
|
|
|
{ NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "file", &kNS_FILEPROTOCOLHANDLER_CID },
|
|
|
|
{ NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "http", &kNS_HTTPPROTOCOLHANDLER_CID },
|
|
|
|
{ NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "https", &kNS_HTTPSPROTOCOLHANDLER_CID },
|
|
|
|
{ NS_HTTPAUTHMANAGER_CONTRACTID, &kNS_HTTPAUTHMANAGER_CID },
|
|
|
|
{ NS_HTTPACTIVITYDISTRIBUTOR_CONTRACTID, &kNS_HTTPACTIVITYDISTRIBUTOR_CID },
|
2016-02-24 00:26:45 +03:00
|
|
|
{ NS_THROTTLEQUEUE_CONTRACTID, &kNS_THROTTLEQUEUE_CID },
|
2010-06-10 22:11:40 +04:00
|
|
|
{ NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "ftp", &kNS_FTPPROTOCOLHANDLER_CID },
|
|
|
|
{ NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "resource", &kNS_RESPROTOCOLHANDLER_CID },
|
2015-07-20 04:42:16 +03:00
|
|
|
{ NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "moz-extension", &kNS_EXTENSIONPROTOCOLHANDLER_CID },
|
2010-06-10 22:11:40 +04:00
|
|
|
{ NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "about", &kNS_ABOUTPROTOCOLHANDLER_CID },
|
|
|
|
{ NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "moz-safe-about", &kNS_SAFEABOUTPROTOCOLHANDLER_CID },
|
|
|
|
{ NS_ABOUT_MODULE_CONTRACTID_PREFIX "blank", &kNS_ABOUT_BLANK_MODULE_CID },
|
|
|
|
{ NS_ABOUT_MODULE_CONTRACTID_PREFIX "cache", &kNS_ABOUT_CACHE_MODULE_CID },
|
|
|
|
{ NS_ABOUT_MODULE_CONTRACTID_PREFIX "cache-entry", &kNS_ABOUT_CACHE_ENTRY_MODULE_CID },
|
|
|
|
{ NS_CACHESERVICE_CONTRACTID, &kNS_CACHESERVICE_CID },
|
|
|
|
{ NS_APPLICATIONCACHESERVICE_CONTRACTID, &kNS_APPLICATIONCACHESERVICE_CID },
|
|
|
|
#ifdef NECKO_COOKIES
|
|
|
|
{ NS_COOKIEMANAGER_CONTRACTID, &kNS_COOKIEMANAGER_CID },
|
|
|
|
{ NS_COOKIESERVICE_CONTRACTID, &kNS_COOKIESERVICE_CID },
|
|
|
|
#endif
|
|
|
|
#ifdef NECKO_WIFI
|
|
|
|
{ NS_WIFI_MONITOR_CONTRACTID, &kNS_WIFI_MONITOR_COMPONENT_CID },
|
|
|
|
#endif
|
|
|
|
{ NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "data", &kNS_DATAPROTOCOLHANDLER_CID },
|
|
|
|
{ NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "view-source", &kNS_VIEWSOURCEHANDLER_CID },
|
2010-10-11 15:35:10 +04:00
|
|
|
{ NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "wyciwyg", &kNS_WYCIWYGPROTOCOLHANDLER_CID },
|
2011-05-22 05:27:52 +04:00
|
|
|
{ NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "ws", &kNS_WEBSOCKETPROTOCOLHANDLER_CID },
|
|
|
|
{ NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "wss", &kNS_WEBSOCKETSSLPROTOCOLHANDLER_CID },
|
2009-03-18 09:46:19 +03:00
|
|
|
#if defined(XP_WIN)
|
2010-06-10 22:11:40 +04:00
|
|
|
{ NS_NETWORK_LINK_SERVICE_CONTRACTID, &kNS_NETWORK_LINK_SERVICE_CID },
|
2008-10-01 02:27:06 +04:00
|
|
|
#elif defined(MOZ_WIDGET_COCOA)
|
2010-06-10 22:11:40 +04:00
|
|
|
{ NS_NETWORK_LINK_SERVICE_CONTRACTID, &kNS_NETWORK_LINK_SERVICE_CID },
|
2011-11-11 04:17:46 +04:00
|
|
|
#elif defined(MOZ_WIDGET_ANDROID)
|
2011-01-20 14:06:13 +03:00
|
|
|
{ NS_NETWORK_LINK_SERVICE_CONTRACTID, &kNS_NETWORK_LINK_SERVICE_CID },
|
2015-01-15 02:22:00 +03:00
|
|
|
#elif defined(XP_LINUX)
|
|
|
|
{ NS_NETWORK_LINK_SERVICE_CONTRACTID, &kNS_NETWORK_LINK_SERVICE_CID },
|
2005-11-12 21:17:19 +03:00
|
|
|
#endif
|
2010-10-26 15:57:18 +04:00
|
|
|
{ NS_SERIALIZATION_HELPER_CONTRACTID, &kNS_SERIALIZATION_HELPER_CID },
|
2013-09-20 13:11:25 +04:00
|
|
|
{ NS_CACHE_STORAGE_SERVICE_CONTRACTID, &kNS_CACHE_STORAGE_SERVICE_CID },
|
2014-06-13 03:45:43 +04:00
|
|
|
{ NS_CACHE_STORAGE_SERVICE_CONTRACTID2, &kNS_CACHE_STORAGE_SERVICE_CID },
|
2015-10-11 19:13:09 +03:00
|
|
|
{ NS_NSILOADCONTEXTINFOFACTORY_CONTRACTID, &kNS_NSILOADCONTEXTINFOFACTORY_CID },
|
2014-06-04 00:37:46 +04:00
|
|
|
{ NS_NETWORKPREDICTOR_CONTRACTID, &kNS_NETWORKPREDICTOR_CID },
|
2014-10-14 01:34:03 +04:00
|
|
|
{ NS_CAPTIVEPORTAL_CONTRACTID, &kNS_CAPTIVEPORTAL_CID },
|
2018-10-29 14:22:40 +03:00
|
|
|
{ NS_NETWORKCONNECTIVITYSERVICE_CONTRACTID, &kNS_NETWORKCONNECTIVITYSERVICE_CID },
|
2016-06-01 23:16:40 +03:00
|
|
|
#ifdef BUILD_NETWORK_INFO_SERVICE
|
|
|
|
{ NETWORKINFOSERVICE_CONTRACT_ID, &kNETWORKINFOSERVICE_CID },
|
|
|
|
#endif
|
2013-09-19 23:28:26 +04:00
|
|
|
{ nullptr }
|
2018-10-12 23:48:24 +03:00
|
|
|
// clang-format on
|
2010-06-10 22:11:40 +04:00
|
|
|
};
|
|
|
|
|
2018-11-30 13:46:48 +03:00
|
|
|
static const mozilla::Module kNeckoModule = {mozilla::Module::kVersion,
|
|
|
|
kNeckoCIDs,
|
|
|
|
kNeckoContracts,
|
|
|
|
kNeckoCategories,
|
|
|
|
nullptr,
|
|
|
|
nsNetStartup,
|
|
|
|
nsNetShutdown};
|
1999-09-30 05:53:31 +04:00
|
|
|
|
2010-06-10 22:11:40 +04:00
|
|
|
NSMODULE_DEFN(necko) = &kNeckoModule;
|