michael@0: /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ michael@0: /* vim: set sw=4 ts=8 et tw=80 : */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #include "necko-config.h" michael@0: michael@0: #define ALLOW_LATE_HTTPLOG_H_INCLUDE 1 michael@0: #include "base/basictypes.h" michael@0: michael@0: #include "nsCOMPtr.h" michael@0: #include "nsIClassInfoImpl.h" michael@0: #include "mozilla/ModuleUtils.h" michael@0: #include "nsIComponentManager.h" michael@0: #include "nsIServiceManager.h" michael@0: #include "nsICategoryManager.h" michael@0: #include "nsSocketProviderService.h" michael@0: #include "nscore.h" michael@0: #include "nsSimpleURI.h" michael@0: #include "nsSimpleNestedURI.h" michael@0: #include "nsLoadGroup.h" michael@0: #include "nsStreamLoader.h" michael@0: #include "nsUnicharStreamLoader.h" michael@0: #include "nsFileStreams.h" michael@0: #include "nsBufferedStreams.h" michael@0: #include "nsMIMEInputStream.h" michael@0: #include "nsSOCKSSocketProvider.h" michael@0: #include "nsCacheService.h" michael@0: #include "nsDiskCacheDeviceSQL.h" michael@0: #include "nsApplicationCache.h" michael@0: #include "nsApplicationCacheService.h" michael@0: #include "nsMimeTypes.h" michael@0: #include "nsNetStrings.h" michael@0: #include "nsDNSPrefetch.h" michael@0: #include "nsAboutProtocolHandler.h" michael@0: #include "nsXULAppAPI.h" michael@0: #include "nsCategoryCache.h" michael@0: #include "nsIContentSniffer.h" michael@0: #include "Seer.h" michael@0: #include "nsNetUtil.h" michael@0: #include "nsIThreadPool.h" michael@0: #include "mozilla/net/NeckoChild.h" michael@0: michael@0: #include "nsNetCID.h" michael@0: michael@0: #ifndef XP_MACOSX michael@0: #define BUILD_BINHEX_DECODER 1 michael@0: #endif michael@0: michael@0: typedef nsCategoryCache ContentSnifferCache; michael@0: NS_HIDDEN_(ContentSnifferCache*) gNetSniffers = nullptr; michael@0: NS_HIDDEN_(ContentSnifferCache*) gDataSniffers = nullptr; michael@0: michael@0: /////////////////////////////////////////////////////////////////////////////// michael@0: michael@0: #include "nsIOService.h" michael@0: NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(nsIOService, nsIOService::GetInstance) michael@0: michael@0: #include "nsDNSService2.h" michael@0: NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(nsIDNSService, michael@0: nsDNSService::GetXPCOMSingleton) michael@0: michael@0: #include "nsProtocolProxyService.h" michael@0: NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsProtocolProxyService, Init) michael@0: michael@0: #include "nsStreamTransportService.h" michael@0: NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsStreamTransportService, Init) michael@0: michael@0: #include "nsSocketTransportService2.h" michael@0: #undef LOG michael@0: #undef LOG_ENABLED michael@0: NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsSocketTransportService, Init) michael@0: michael@0: #include "nsServerSocket.h" michael@0: NS_GENERIC_FACTORY_CONSTRUCTOR(nsServerSocket) michael@0: michael@0: #include "nsUDPSocket.h" michael@0: NS_GENERIC_FACTORY_CONSTRUCTOR(nsUDPSocket) michael@0: michael@0: #include "nsUDPSocketProvider.h" michael@0: NS_GENERIC_FACTORY_CONSTRUCTOR(nsUDPSocketProvider) michael@0: michael@0: #include "nsAsyncStreamCopier.h" michael@0: NS_GENERIC_FACTORY_CONSTRUCTOR(nsAsyncStreamCopier) michael@0: michael@0: #include "nsInputStreamPump.h" michael@0: NS_GENERIC_FACTORY_CONSTRUCTOR(nsInputStreamPump) michael@0: michael@0: #include "nsInputStreamChannel.h" michael@0: NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsInputStreamChannel, Init) michael@0: michael@0: #include "nsDownloader.h" michael@0: NS_GENERIC_FACTORY_CONSTRUCTOR(nsDownloader) michael@0: michael@0: #include "BackgroundFileSaver.h" michael@0: namespace mozilla { michael@0: namespace net { michael@0: NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(BackgroundFileSaverOutputStream, Init) michael@0: NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(BackgroundFileSaverStreamListener, Init) michael@0: } // namespace net michael@0: } // namespace mozilla michael@0: michael@0: #include "nsSyncStreamListener.h" michael@0: NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsSyncStreamListener, Init) michael@0: michael@0: NS_GENERIC_FACTORY_CONSTRUCTOR(nsAtomicFileOutputStream) michael@0: michael@0: NS_GENERIC_FACTORY_CONSTRUCTOR(nsSafeFileOutputStream) michael@0: michael@0: NS_GENERIC_FACTORY_CONSTRUCTOR(nsFileStream) michael@0: michael@0: NS_GENERIC_AGGREGATED_CONSTRUCTOR_INIT(nsLoadGroup, Init) michael@0: michael@0: #include "ArrayBufferInputStream.h" michael@0: NS_GENERIC_FACTORY_CONSTRUCTOR(ArrayBufferInputStream) michael@0: michael@0: #include "nsEffectiveTLDService.h" michael@0: NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsEffectiveTLDService, Init) michael@0: michael@0: #include "nsSerializationHelper.h" michael@0: NS_GENERIC_FACTORY_CONSTRUCTOR(nsSerializationHelper) michael@0: michael@0: #include "RedirectChannelRegistrar.h" michael@0: typedef mozilla::net::RedirectChannelRegistrar RedirectChannelRegistrar; michael@0: NS_GENERIC_FACTORY_CONSTRUCTOR(RedirectChannelRegistrar) michael@0: michael@0: #include "CacheStorageService.h" michael@0: typedef mozilla::net::CacheStorageService CacheStorageService; michael@0: NS_GENERIC_FACTORY_CONSTRUCTOR(CacheStorageService) michael@0: michael@0: /////////////////////////////////////////////////////////////////////////////// michael@0: michael@0: extern nsresult michael@0: net_NewIncrementalDownload(nsISupports *, const nsIID &, void **); michael@0: michael@0: #define NS_INCREMENTALDOWNLOAD_CID \ michael@0: { /* a62af1ba-79b3-4896-8aaf-b148bfce4280 */ \ michael@0: 0xa62af1ba, \ michael@0: 0x79b3, \ michael@0: 0x4896, \ michael@0: {0x8a, 0xaf, 0xb1, 0x48, 0xbf, 0xce, 0x42, 0x80} \ michael@0: } michael@0: michael@0: /////////////////////////////////////////////////////////////////////////////// michael@0: michael@0: #include "nsMIMEHeaderParamImpl.h" michael@0: michael@0: NS_GENERIC_FACTORY_CONSTRUCTOR(nsMIMEHeaderParamImpl) michael@0: /////////////////////////////////////////////////////////////////////////////// michael@0: michael@0: #include "nsRequestObserverProxy.h" michael@0: #include "nsSimpleStreamListener.h" michael@0: #include "nsDirIndexParser.h" michael@0: #include "nsDirIndex.h" michael@0: michael@0: NS_GENERIC_FACTORY_CONSTRUCTOR(nsRequestObserverProxy) michael@0: NS_GENERIC_FACTORY_CONSTRUCTOR(nsSimpleStreamListener) michael@0: NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsDirIndexParser, Init) michael@0: NS_GENERIC_FACTORY_CONSTRUCTOR(nsDirIndex) michael@0: michael@0: /////////////////////////////////////////////////////////////////////////////// michael@0: michael@0: #include "nsStreamListenerTee.h" michael@0: NS_GENERIC_FACTORY_CONSTRUCTOR(nsStreamListenerTee) michael@0: michael@0: /////////////////////////////////////////////////////////////////////////////// michael@0: michael@0: #ifdef NECKO_COOKIES michael@0: #include "nsCookieService.h" michael@0: NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(nsICookieService, michael@0: nsCookieService::GetXPCOMSingleton) michael@0: #endif michael@0: michael@0: /////////////////////////////////////////////////////////////////////////////// michael@0: #ifdef NECKO_WIFI michael@0: michael@0: #include "nsWifiMonitor.h" michael@0: #undef LOG michael@0: #undef LOG_ENABLED michael@0: NS_GENERIC_FACTORY_CONSTRUCTOR(nsWifiMonitor) michael@0: michael@0: #endif michael@0: michael@0: /////////////////////////////////////////////////////////////////////////////// michael@0: // protocols michael@0: /////////////////////////////////////////////////////////////////////////////// michael@0: michael@0: // about:blank is mandatory michael@0: #include "nsAboutProtocolHandler.h" michael@0: #include "nsAboutBlank.h" michael@0: NS_GENERIC_FACTORY_CONSTRUCTOR(nsAboutProtocolHandler) michael@0: NS_GENERIC_FACTORY_CONSTRUCTOR(nsSafeAboutProtocolHandler) michael@0: NS_GENERIC_FACTORY_CONSTRUCTOR(nsNestedAboutURI) michael@0: michael@0: #ifdef NECKO_PROTOCOL_about michael@0: // about michael@0: #ifdef NS_BUILD_REFCNT_LOGGING michael@0: #include "nsAboutBloat.h" michael@0: #endif michael@0: #include "nsAboutCache.h" michael@0: #include "nsAboutCacheEntry.h" michael@0: NS_GENERIC_FACTORY_CONSTRUCTOR(nsAboutCacheEntry) michael@0: #endif michael@0: michael@0: NS_GENERIC_FACTORY_CONSTRUCTOR(nsApplicationCacheService) michael@0: NS_GENERIC_FACTORY_CONSTRUCTOR(nsApplicationCacheNamespace) michael@0: NS_GENERIC_FACTORY_CONSTRUCTOR(nsApplicationCache) michael@0: michael@0: #ifdef NECKO_PROTOCOL_file michael@0: // file michael@0: #include "nsFileProtocolHandler.h" michael@0: NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsFileProtocolHandler, Init) michael@0: #endif michael@0: michael@0: #ifdef NECKO_PROTOCOL_ftp michael@0: // ftp michael@0: #include "nsFtpProtocolHandler.h" michael@0: NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsFtpProtocolHandler, Init) michael@0: #endif michael@0: michael@0: #ifdef NECKO_PROTOCOL_http michael@0: // http/https michael@0: #include "nsHttpHandler.h" michael@0: #undef LOG michael@0: #undef LOG_ENABLED michael@0: #include "nsHttpAuthManager.h" michael@0: #include "nsHttpChannelAuthProvider.h" michael@0: #include "nsHttpBasicAuth.h" michael@0: #include "nsHttpDigestAuth.h" michael@0: #include "nsHttpNTLMAuth.h" michael@0: #include "nsHttpActivityDistributor.h" michael@0: #undef LOG michael@0: #undef LOG_ENABLED michael@0: namespace mozilla { michael@0: namespace net { michael@0: NS_GENERIC_FACTORY_CONSTRUCTOR(nsHttpNTLMAuth) michael@0: NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsHttpHandler, Init) michael@0: NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsHttpsHandler, Init) michael@0: NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsHttpAuthManager, Init) michael@0: NS_GENERIC_FACTORY_CONSTRUCTOR(nsHttpChannelAuthProvider) michael@0: NS_GENERIC_FACTORY_CONSTRUCTOR(nsHttpActivityDistributor) michael@0: NS_GENERIC_FACTORY_CONSTRUCTOR(nsHttpBasicAuth) michael@0: NS_GENERIC_FACTORY_CONSTRUCTOR(nsHttpDigestAuth) michael@0: } michael@0: } michael@0: #endif // !NECKO_PROTOCOL_http michael@0: michael@0: #include "mozilla/net/Dashboard.h" michael@0: namespace mozilla { michael@0: namespace net { michael@0: NS_GENERIC_FACTORY_CONSTRUCTOR(Dashboard) michael@0: } michael@0: } michael@0: #include "AppProtocolHandler.h" michael@0: michael@0: #ifdef NECKO_PROTOCOL_res michael@0: // resource michael@0: #include "nsResProtocolHandler.h" michael@0: NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsResProtocolHandler, Init) michael@0: NS_GENERIC_FACTORY_CONSTRUCTOR(nsResURL) michael@0: #endif michael@0: michael@0: #ifdef NECKO_PROTOCOL_device michael@0: #include "nsDeviceProtocolHandler.h" michael@0: NS_GENERIC_FACTORY_CONSTRUCTOR(nsDeviceProtocolHandler) michael@0: #endif michael@0: michael@0: #ifdef NECKO_PROTOCOL_viewsource michael@0: #include "nsViewSourceHandler.h" michael@0: NS_GENERIC_FACTORY_CONSTRUCTOR(nsViewSourceHandler) michael@0: #endif michael@0: michael@0: #ifdef NECKO_PROTOCOL_data michael@0: #include "nsDataHandler.h" michael@0: #endif michael@0: michael@0: #ifdef NECKO_PROTOCOL_wyciwyg michael@0: #include "nsWyciwygProtocolHandler.h" michael@0: NS_GENERIC_FACTORY_CONSTRUCTOR(nsWyciwygProtocolHandler) michael@0: #endif michael@0: michael@0: #ifdef NECKO_PROTOCOL_websocket michael@0: #include "WebSocketChannel.h" michael@0: #include "WebSocketChannelChild.h" michael@0: namespace mozilla { michael@0: namespace net { michael@0: static BaseWebSocketChannel* michael@0: WebSocketChannelConstructor(bool aSecure) michael@0: { michael@0: if (IsNeckoChild()) { michael@0: return new WebSocketChannelChild(aSecure); michael@0: } michael@0: michael@0: if (aSecure) { michael@0: return new WebSocketSSLChannel; michael@0: } else { michael@0: return new WebSocketChannel; michael@0: } michael@0: } michael@0: michael@0: #define WEB_SOCKET_HANDLER_CONSTRUCTOR(type, secure) \ michael@0: static nsresult \ michael@0: type##Constructor(nsISupports *aOuter, REFNSIID aIID, \ michael@0: void **aResult) \ michael@0: { \ michael@0: nsresult rv; \ michael@0: \ michael@0: BaseWebSocketChannel * inst; \ michael@0: \ michael@0: *aResult = nullptr; \ michael@0: if (nullptr != aOuter) { \ michael@0: rv = NS_ERROR_NO_AGGREGATION; \ michael@0: return rv; \ michael@0: } \ michael@0: inst = WebSocketChannelConstructor(secure); \ michael@0: NS_ADDREF(inst); \ michael@0: rv = inst->QueryInterface(aIID, aResult); \ michael@0: NS_RELEASE(inst); \ michael@0: return rv; \ michael@0: } michael@0: michael@0: WEB_SOCKET_HANDLER_CONSTRUCTOR(WebSocketChannel, false) michael@0: WEB_SOCKET_HANDLER_CONSTRUCTOR(WebSocketSSLChannel, true) michael@0: #undef WEB_SOCKET_HANDLER_CONSTRUCTOR michael@0: } // namespace mozilla::net michael@0: } // namespace mozilla michael@0: #endif michael@0: michael@0: #ifdef NECKO_PROTOCOL_rtsp michael@0: #include "RtspHandler.h" michael@0: namespace mozilla { michael@0: namespace net { michael@0: NS_GENERIC_FACTORY_CONSTRUCTOR(RtspHandler) michael@0: } // namespace mozilla::net michael@0: } // namespace mozilla michael@0: #endif michael@0: michael@0: /////////////////////////////////////////////////////////////////////////////// michael@0: michael@0: #include "nsURIChecker.h" michael@0: NS_GENERIC_FACTORY_CONSTRUCTOR(nsURIChecker) michael@0: michael@0: /////////////////////////////////////////////////////////////////////////////// michael@0: michael@0: #include "nsURLParsers.h" michael@0: NS_GENERIC_FACTORY_CONSTRUCTOR(nsNoAuthURLParser) michael@0: NS_GENERIC_FACTORY_CONSTRUCTOR(nsAuthURLParser) michael@0: NS_GENERIC_FACTORY_CONSTRUCTOR(nsStdURLParser) michael@0: michael@0: #include "nsStandardURL.h" michael@0: NS_GENERIC_FACTORY_CONSTRUCTOR(nsStandardURL) michael@0: michael@0: NS_GENERIC_FACTORY_CONSTRUCTOR(nsSimpleURI) michael@0: michael@0: NS_GENERIC_FACTORY_CONSTRUCTOR(nsSimpleNestedURI) michael@0: michael@0: /////////////////////////////////////////////////////////////////////////////// michael@0: michael@0: #include "nsIDNService.h" michael@0: NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsIDNService, Init) michael@0: michael@0: /////////////////////////////////////////////////////////////////////////////// michael@0: #if defined(XP_WIN) michael@0: #include "nsNotifyAddrListener.h" michael@0: NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsNotifyAddrListener, Init) michael@0: #elif defined(MOZ_WIDGET_COCOA) michael@0: #include "nsNetworkLinkService.h" michael@0: NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsNetworkLinkService, Init) michael@0: #elif defined(MOZ_ENABLE_QTNETWORK) michael@0: #include "nsQtNetworkLinkService.h" michael@0: NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsQtNetworkLinkService, Init) michael@0: #elif defined(MOZ_WIDGET_ANDROID) michael@0: #include "nsAndroidNetworkLinkService.h" michael@0: NS_GENERIC_FACTORY_CONSTRUCTOR(nsAndroidNetworkLinkService) michael@0: #endif michael@0: michael@0: /////////////////////////////////////////////////////////////////////////////// michael@0: michael@0: #ifdef NECKO_PROTOCOL_ftp michael@0: #include "nsFTPDirListingConv.h" michael@0: nsresult NS_NewFTPDirListingConv(nsFTPDirListingConv** result); michael@0: #endif michael@0: michael@0: #include "nsStreamConverterService.h" michael@0: #include "nsMultiMixedConv.h" michael@0: #include "nsHTTPCompressConv.h" michael@0: #include "mozTXTToHTMLConv.h" michael@0: #include "nsUnknownDecoder.h" michael@0: #include "nsTXTToHTMLConv.h" michael@0: #include "nsIndexedToHTML.h" michael@0: #ifdef BUILD_BINHEX_DECODER michael@0: #include "nsBinHexDecoder.h" michael@0: #endif michael@0: michael@0: nsresult NS_NewMultiMixedConv (nsMultiMixedConv** result); michael@0: nsresult MOZ_NewTXTToHTMLConv (mozTXTToHTMLConv** result); michael@0: nsresult NS_NewHTTPCompressConv (nsHTTPCompressConv ** result); michael@0: nsresult NS_NewNSTXTToHTMLConv(nsTXTToHTMLConv** result); michael@0: nsresult NS_NewStreamConv(nsStreamConverterService **aStreamConv); michael@0: michael@0: #define FTP_TO_INDEX "?from=text/ftp-dir&to=application/http-index-format" michael@0: #define INDEX_TO_HTML "?from=application/http-index-format&to=text/html" michael@0: #define MULTI_MIXED_X "?from=multipart/x-mixed-replace&to=*/*" michael@0: #define MULTI_MIXED "?from=multipart/mixed&to=*/*" michael@0: #define MULTI_BYTERANGES "?from=multipart/byteranges&to=*/*" michael@0: #define UNKNOWN_CONTENT "?from=" UNKNOWN_CONTENT_TYPE "&to=*/*" michael@0: #define GZIP_TO_UNCOMPRESSED "?from=gzip&to=uncompressed" michael@0: #define XGZIP_TO_UNCOMPRESSED "?from=x-gzip&to=uncompressed" michael@0: #define COMPRESS_TO_UNCOMPRESSED "?from=compress&to=uncompressed" michael@0: #define XCOMPRESS_TO_UNCOMPRESSED "?from=x-compress&to=uncompressed" michael@0: #define DEFLATE_TO_UNCOMPRESSED "?from=deflate&to=uncompressed" michael@0: #define PLAIN_TO_HTML "?from=text/plain&to=text/html" michael@0: michael@0: #ifdef BUILD_BINHEX_DECODER michael@0: #define BINHEX_TO_WILD "?from=application/mac-binhex40&to=*/*" michael@0: #endif michael@0: michael@0: static const mozilla::Module::CategoryEntry kNeckoCategories[] = { michael@0: { NS_ISTREAMCONVERTER_KEY, FTP_TO_INDEX, "" }, michael@0: { NS_ISTREAMCONVERTER_KEY, INDEX_TO_HTML, "" }, michael@0: { NS_ISTREAMCONVERTER_KEY, MULTI_MIXED_X, "" }, michael@0: { NS_ISTREAMCONVERTER_KEY, MULTI_MIXED, "" }, michael@0: { NS_ISTREAMCONVERTER_KEY, MULTI_BYTERANGES, "" }, michael@0: { NS_ISTREAMCONVERTER_KEY, UNKNOWN_CONTENT, "" }, michael@0: { NS_ISTREAMCONVERTER_KEY, GZIP_TO_UNCOMPRESSED, "" }, michael@0: { NS_ISTREAMCONVERTER_KEY, XGZIP_TO_UNCOMPRESSED, "" }, michael@0: { NS_ISTREAMCONVERTER_KEY, COMPRESS_TO_UNCOMPRESSED, "" }, michael@0: { NS_ISTREAMCONVERTER_KEY, XCOMPRESS_TO_UNCOMPRESSED, "" }, michael@0: { NS_ISTREAMCONVERTER_KEY, DEFLATE_TO_UNCOMPRESSED, "" }, michael@0: #ifdef BUILD_BINHEX_DECODER michael@0: { NS_ISTREAMCONVERTER_KEY, BINHEX_TO_WILD, "" }, michael@0: #endif michael@0: { NS_ISTREAMCONVERTER_KEY, PLAIN_TO_HTML, "" }, michael@0: NS_BINARYDETECTOR_CATEGORYENTRY, michael@0: { nullptr } michael@0: }; michael@0: michael@0: #ifdef BUILD_BINHEX_DECODER michael@0: NS_GENERIC_FACTORY_CONSTRUCTOR(nsBinHexDecoder) michael@0: #endif michael@0: michael@0: static nsresult michael@0: CreateNewStreamConvServiceFactory(nsISupports* aOuter, REFNSIID aIID, void **aResult) michael@0: { michael@0: if (!aResult) { michael@0: return NS_ERROR_INVALID_POINTER; michael@0: } michael@0: if (aOuter) { michael@0: *aResult = nullptr; michael@0: return NS_ERROR_NO_AGGREGATION; michael@0: } michael@0: nsStreamConverterService* inst = nullptr; michael@0: nsresult rv = NS_NewStreamConv(&inst); michael@0: if (NS_FAILED(rv)) { michael@0: *aResult = nullptr; michael@0: return rv; michael@0: } michael@0: rv = inst->QueryInterface(aIID, aResult); michael@0: if (NS_FAILED(rv)) { michael@0: *aResult = nullptr; michael@0: } michael@0: NS_RELEASE(inst); /* get rid of extra refcnt */ michael@0: return rv; michael@0: } michael@0: michael@0: #ifdef NECKO_PROTOCOL_ftp michael@0: static nsresult michael@0: CreateNewFTPDirListingConv(nsISupports* aOuter, REFNSIID aIID, void **aResult) michael@0: { michael@0: if (!aResult) { michael@0: return NS_ERROR_INVALID_POINTER; michael@0: } michael@0: if (aOuter) { michael@0: *aResult = nullptr; michael@0: return NS_ERROR_NO_AGGREGATION; michael@0: } michael@0: nsFTPDirListingConv* inst = nullptr; michael@0: nsresult rv = NS_NewFTPDirListingConv(&inst); michael@0: if (NS_FAILED(rv)) { michael@0: *aResult = nullptr; michael@0: return rv; michael@0: } michael@0: rv = inst->QueryInterface(aIID, aResult); michael@0: if (NS_FAILED(rv)) { michael@0: *aResult = nullptr; michael@0: } michael@0: NS_RELEASE(inst); /* get rid of extra refcnt */ michael@0: return rv; michael@0: } michael@0: #endif michael@0: michael@0: static nsresult michael@0: CreateNewMultiMixedConvFactory(nsISupports* aOuter, REFNSIID aIID, void **aResult) michael@0: { michael@0: if (!aResult) { michael@0: return NS_ERROR_INVALID_POINTER; michael@0: } michael@0: if (aOuter) { michael@0: *aResult = nullptr; michael@0: return NS_ERROR_NO_AGGREGATION; michael@0: } michael@0: nsMultiMixedConv* inst = nullptr; michael@0: nsresult rv = NS_NewMultiMixedConv(&inst); michael@0: if (NS_FAILED(rv)) { michael@0: *aResult = nullptr; michael@0: return rv; michael@0: } michael@0: rv = inst->QueryInterface(aIID, aResult); michael@0: if (NS_FAILED(rv)) { michael@0: *aResult = nullptr; michael@0: } michael@0: NS_RELEASE(inst); /* get rid of extra refcnt */ michael@0: return rv; michael@0: } michael@0: michael@0: static nsresult michael@0: CreateNewTXTToHTMLConvFactory(nsISupports* aOuter, REFNSIID aIID, void **aResult) michael@0: { michael@0: if (!aResult) { michael@0: return NS_ERROR_INVALID_POINTER; michael@0: } michael@0: if (aOuter) { michael@0: *aResult = nullptr; michael@0: return NS_ERROR_NO_AGGREGATION; michael@0: } michael@0: mozTXTToHTMLConv* inst = nullptr; michael@0: nsresult rv = MOZ_NewTXTToHTMLConv(&inst); michael@0: if (NS_FAILED(rv)) { michael@0: *aResult = nullptr; michael@0: return rv; michael@0: } michael@0: rv = inst->QueryInterface(aIID, aResult); michael@0: if (NS_FAILED(rv)) { michael@0: *aResult = nullptr; michael@0: } michael@0: NS_RELEASE(inst); /* get rid of extra refcnt */ michael@0: return rv; michael@0: } michael@0: michael@0: static nsresult michael@0: CreateNewHTTPCompressConvFactory (nsISupports* aOuter, REFNSIID aIID, void **aResult) michael@0: { michael@0: if (!aResult) { michael@0: return NS_ERROR_INVALID_POINTER; michael@0: } michael@0: if (aOuter) { michael@0: *aResult = nullptr; michael@0: return NS_ERROR_NO_AGGREGATION; michael@0: } michael@0: nsHTTPCompressConv* inst = nullptr; michael@0: nsresult rv = NS_NewHTTPCompressConv (&inst); michael@0: if (NS_FAILED(rv)) { michael@0: *aResult = nullptr; michael@0: return rv; michael@0: } michael@0: rv = inst->QueryInterface(aIID, aResult); michael@0: if (NS_FAILED(rv)) { michael@0: *aResult = nullptr; michael@0: } michael@0: NS_RELEASE(inst); /* get rid of extra refcnt */ michael@0: return rv; michael@0: } michael@0: michael@0: static nsresult michael@0: CreateNewUnknownDecoderFactory(nsISupports *aOuter, REFNSIID aIID, void **aResult) michael@0: { michael@0: nsresult rv; michael@0: michael@0: if (!aResult) { michael@0: return NS_ERROR_NULL_POINTER; michael@0: } michael@0: *aResult = nullptr; michael@0: michael@0: if (aOuter) { michael@0: return NS_ERROR_NO_AGGREGATION; michael@0: } michael@0: michael@0: nsUnknownDecoder *inst; michael@0: michael@0: inst = new nsUnknownDecoder(); michael@0: if (!inst) { michael@0: return NS_ERROR_OUT_OF_MEMORY; michael@0: } michael@0: NS_ADDREF(inst); michael@0: rv = inst->QueryInterface(aIID, aResult); michael@0: NS_RELEASE(inst); michael@0: michael@0: return rv; michael@0: } michael@0: michael@0: static nsresult michael@0: CreateNewBinaryDetectorFactory(nsISupports *aOuter, REFNSIID aIID, void **aResult) michael@0: { michael@0: nsresult rv; michael@0: michael@0: if (!aResult) { michael@0: return NS_ERROR_NULL_POINTER; michael@0: } michael@0: *aResult = nullptr; michael@0: michael@0: if (aOuter) { michael@0: return NS_ERROR_NO_AGGREGATION; michael@0: } michael@0: michael@0: nsBinaryDetector* inst = new nsBinaryDetector(); michael@0: if (!inst) { michael@0: return NS_ERROR_OUT_OF_MEMORY; michael@0: } michael@0: NS_ADDREF(inst); michael@0: rv = inst->QueryInterface(aIID, aResult); michael@0: NS_RELEASE(inst); michael@0: michael@0: return rv; michael@0: } michael@0: michael@0: static nsresult michael@0: CreateNewNSTXTToHTMLConvFactory(nsISupports *aOuter, REFNSIID aIID, void **aResult) michael@0: { michael@0: nsresult rv; michael@0: michael@0: if (!aResult) { michael@0: return NS_ERROR_NULL_POINTER; michael@0: } michael@0: *aResult = nullptr; michael@0: michael@0: if (aOuter) { michael@0: return NS_ERROR_NO_AGGREGATION; michael@0: } michael@0: michael@0: nsTXTToHTMLConv *inst; michael@0: michael@0: inst = new nsTXTToHTMLConv(); michael@0: if (!inst) return NS_ERROR_OUT_OF_MEMORY; michael@0: michael@0: NS_ADDREF(inst); michael@0: rv = inst->Init(); michael@0: if (NS_FAILED(rv)) { michael@0: delete inst; michael@0: return rv; michael@0: } michael@0: rv = inst->QueryInterface(aIID, aResult); michael@0: NS_RELEASE(inst); michael@0: michael@0: return rv; michael@0: } michael@0: michael@0: /////////////////////////////////////////////////////////////////////////////// michael@0: // Module implementation for the net library michael@0: michael@0: // Net module startup hook michael@0: static nsresult nsNetStartup() michael@0: { michael@0: gNetStrings = new nsNetStrings(); michael@0: return gNetStrings ? NS_OK : NS_ERROR_OUT_OF_MEMORY; michael@0: } michael@0: michael@0: michael@0: // Net module shutdown hook michael@0: static void nsNetShutdown() michael@0: { michael@0: // Release the url parser that the stdurl is holding. michael@0: nsStandardURL::ShutdownGlobalObjects(); michael@0: michael@0: // Release global state used by the URL helper module. michael@0: net_ShutdownURLHelper(); michael@0: #ifdef XP_MACOSX michael@0: net_ShutdownURLHelperOSX(); michael@0: #endif michael@0: michael@0: // Release necko strings michael@0: delete gNetStrings; michael@0: gNetStrings = nullptr; michael@0: michael@0: // Release DNS service reference. michael@0: nsDNSPrefetch::Shutdown(); michael@0: michael@0: #ifdef NECKO_PROTOCOL_websocket michael@0: // Release the Websocket Admission Manager michael@0: mozilla::net::WebSocketChannel::Shutdown(); michael@0: #endif // NECKO_PROTOCOL_websocket michael@0: michael@0: delete gNetSniffers; michael@0: gNetSniffers = nullptr; michael@0: delete gDataSniffers; michael@0: gDataSniffers = nullptr; michael@0: } michael@0: michael@0: NS_DEFINE_NAMED_CID(NS_IOSERVICE_CID); michael@0: NS_DEFINE_NAMED_CID(NS_STREAMTRANSPORTSERVICE_CID); michael@0: NS_DEFINE_NAMED_CID(NS_SOCKETTRANSPORTSERVICE_CID); michael@0: NS_DEFINE_NAMED_CID(NS_SERVERSOCKET_CID); michael@0: NS_DEFINE_NAMED_CID(NS_UDPSOCKET_CID); michael@0: NS_DEFINE_NAMED_CID(NS_SOCKETPROVIDERSERVICE_CID); michael@0: NS_DEFINE_NAMED_CID(NS_DNSSERVICE_CID); michael@0: NS_DEFINE_NAMED_CID(NS_IDNSERVICE_CID); michael@0: NS_DEFINE_NAMED_CID(NS_EFFECTIVETLDSERVICE_CID); michael@0: NS_DEFINE_NAMED_CID(NS_SIMPLEURI_CID); michael@0: NS_DEFINE_NAMED_CID(NS_SIMPLENESTEDURI_CID); michael@0: NS_DEFINE_NAMED_CID(NS_ASYNCSTREAMCOPIER_CID); michael@0: NS_DEFINE_NAMED_CID(NS_INPUTSTREAMPUMP_CID); michael@0: NS_DEFINE_NAMED_CID(NS_INPUTSTREAMCHANNEL_CID); michael@0: NS_DEFINE_NAMED_CID(NS_STREAMLOADER_CID); michael@0: NS_DEFINE_NAMED_CID(NS_UNICHARSTREAMLOADER_CID); michael@0: NS_DEFINE_NAMED_CID(NS_DOWNLOADER_CID); michael@0: NS_DEFINE_NAMED_CID(NS_BACKGROUNDFILESAVEROUTPUTSTREAM_CID); michael@0: NS_DEFINE_NAMED_CID(NS_BACKGROUNDFILESAVERSTREAMLISTENER_CID); michael@0: NS_DEFINE_NAMED_CID(NS_SYNCSTREAMLISTENER_CID); michael@0: NS_DEFINE_NAMED_CID(NS_REQUESTOBSERVERPROXY_CID); michael@0: NS_DEFINE_NAMED_CID(NS_SIMPLESTREAMLISTENER_CID); michael@0: NS_DEFINE_NAMED_CID(NS_STREAMLISTENERTEE_CID); michael@0: NS_DEFINE_NAMED_CID(NS_LOADGROUP_CID); michael@0: NS_DEFINE_NAMED_CID(NS_LOCALFILEINPUTSTREAM_CID); michael@0: NS_DEFINE_NAMED_CID(NS_LOCALFILEOUTPUTSTREAM_CID); michael@0: NS_DEFINE_NAMED_CID(NS_PARTIALLOCALFILEINPUTSTREAM_CID); michael@0: NS_DEFINE_NAMED_CID(NS_ATOMICLOCALFILEOUTPUTSTREAM_CID); michael@0: NS_DEFINE_NAMED_CID(NS_SAFELOCALFILEOUTPUTSTREAM_CID); michael@0: NS_DEFINE_NAMED_CID(NS_LOCALFILESTREAM_CID); michael@0: NS_DEFINE_NAMED_CID(NS_URICHECKER_CID); michael@0: NS_DEFINE_NAMED_CID(NS_INCREMENTALDOWNLOAD_CID); michael@0: NS_DEFINE_NAMED_CID(NS_STDURLPARSER_CID); michael@0: NS_DEFINE_NAMED_CID(NS_NOAUTHURLPARSER_CID); michael@0: NS_DEFINE_NAMED_CID(NS_AUTHURLPARSER_CID); michael@0: NS_DEFINE_NAMED_CID(NS_STANDARDURL_CID); michael@0: NS_DEFINE_NAMED_CID(NS_ARRAYBUFFERINPUTSTREAM_CID); michael@0: NS_DEFINE_NAMED_CID(NS_BUFFEREDINPUTSTREAM_CID); michael@0: NS_DEFINE_NAMED_CID(NS_BUFFEREDOUTPUTSTREAM_CID); michael@0: NS_DEFINE_NAMED_CID(NS_MIMEINPUTSTREAM_CID); michael@0: NS_DEFINE_NAMED_CID(NS_PROTOCOLPROXYSERVICE_CID); michael@0: NS_DEFINE_NAMED_CID(NS_STREAMCONVERTERSERVICE_CID); michael@0: NS_DEFINE_NAMED_CID(NS_DASHBOARD_CID); michael@0: #ifdef NECKO_PROTOCOL_ftp michael@0: NS_DEFINE_NAMED_CID(NS_FTPDIRLISTINGCONVERTER_CID); michael@0: #endif michael@0: NS_DEFINE_NAMED_CID(NS_NSINDEXEDTOHTMLCONVERTER_CID); michael@0: NS_DEFINE_NAMED_CID(NS_DIRINDEXPARSER_CID); michael@0: NS_DEFINE_NAMED_CID(NS_MULTIMIXEDCONVERTER_CID); michael@0: NS_DEFINE_NAMED_CID(NS_UNKNOWNDECODER_CID); michael@0: NS_DEFINE_NAMED_CID(NS_BINARYDETECTOR_CID); michael@0: NS_DEFINE_NAMED_CID(NS_HTTPCOMPRESSCONVERTER_CID); michael@0: NS_DEFINE_NAMED_CID(NS_NSTXTTOHTMLCONVERTER_CID); michael@0: #ifdef BUILD_BINHEX_DECODER michael@0: NS_DEFINE_NAMED_CID(NS_BINHEXDECODER_CID); michael@0: #endif michael@0: NS_DEFINE_NAMED_CID(MOZITXTTOHTMLCONV_CID); michael@0: NS_DEFINE_NAMED_CID(NS_DIRINDEX_CID); michael@0: NS_DEFINE_NAMED_CID(NS_MIMEHEADERPARAM_CID); michael@0: #ifdef NECKO_PROTOCOL_file michael@0: NS_DEFINE_NAMED_CID(NS_FILEPROTOCOLHANDLER_CID); michael@0: #endif michael@0: #ifdef NECKO_PROTOCOL_http michael@0: NS_DEFINE_NAMED_CID(NS_HTTPPROTOCOLHANDLER_CID); michael@0: NS_DEFINE_NAMED_CID(NS_HTTPSPROTOCOLHANDLER_CID); michael@0: NS_DEFINE_NAMED_CID(NS_HTTPBASICAUTH_CID); michael@0: NS_DEFINE_NAMED_CID(NS_HTTPDIGESTAUTH_CID); michael@0: NS_DEFINE_NAMED_CID(NS_HTTPNTLMAUTH_CID); michael@0: NS_DEFINE_NAMED_CID(NS_HTTPAUTHMANAGER_CID); michael@0: NS_DEFINE_NAMED_CID(NS_HTTPCHANNELAUTHPROVIDER_CID); michael@0: NS_DEFINE_NAMED_CID(NS_HTTPACTIVITYDISTRIBUTOR_CID); michael@0: #endif // !NECKO_PROTOCOL_http michael@0: #ifdef NECKO_PROTOCOL_ftp michael@0: NS_DEFINE_NAMED_CID(NS_FTPPROTOCOLHANDLER_CID); michael@0: #endif michael@0: #ifdef NECKO_PROTOCOL_res michael@0: NS_DEFINE_NAMED_CID(NS_RESPROTOCOLHANDLER_CID); michael@0: NS_DEFINE_NAMED_CID(NS_RESURL_CID); michael@0: #endif michael@0: NS_DEFINE_NAMED_CID(NS_ABOUTPROTOCOLHANDLER_CID); michael@0: NS_DEFINE_NAMED_CID(NS_SAFEABOUTPROTOCOLHANDLER_CID); michael@0: NS_DEFINE_NAMED_CID(NS_ABOUT_BLANK_MODULE_CID); michael@0: NS_DEFINE_NAMED_CID(NS_NESTEDABOUTURI_CID); michael@0: #ifdef NECKO_PROTOCOL_about michael@0: #ifdef NS_BUILD_REFCNT_LOGGING michael@0: NS_DEFINE_NAMED_CID(NS_ABOUT_BLOAT_MODULE_CID); michael@0: #endif michael@0: NS_DEFINE_NAMED_CID(NS_ABOUT_CACHE_MODULE_CID); michael@0: NS_DEFINE_NAMED_CID(NS_ABOUT_CACHE_ENTRY_MODULE_CID); michael@0: #endif michael@0: NS_DEFINE_NAMED_CID(NS_SOCKSSOCKETPROVIDER_CID); michael@0: NS_DEFINE_NAMED_CID(NS_SOCKS4SOCKETPROVIDER_CID); michael@0: NS_DEFINE_NAMED_CID(NS_UDPSOCKETPROVIDER_CID); michael@0: NS_DEFINE_NAMED_CID(NS_CACHESERVICE_CID); michael@0: NS_DEFINE_NAMED_CID(NS_APPLICATIONCACHESERVICE_CID); michael@0: NS_DEFINE_NAMED_CID(NS_APPLICATIONCACHENAMESPACE_CID); michael@0: NS_DEFINE_NAMED_CID(NS_APPLICATIONCACHE_CID); michael@0: NS_DEFINE_NAMED_CID(NS_APPPROTOCOLHANDLER_CID); michael@0: #ifdef NECKO_COOKIES michael@0: NS_DEFINE_NAMED_CID(NS_COOKIEMANAGER_CID); michael@0: NS_DEFINE_NAMED_CID(NS_COOKIESERVICE_CID); michael@0: #endif michael@0: #ifdef NECKO_WIFI michael@0: NS_DEFINE_NAMED_CID(NS_WIFI_MONITOR_COMPONENT_CID); michael@0: #endif michael@0: #ifdef NECKO_PROTOCOL_data michael@0: NS_DEFINE_NAMED_CID(NS_DATAPROTOCOLHANDLER_CID); michael@0: #endif michael@0: #ifdef NECKO_PROTOCOL_device michael@0: NS_DEFINE_NAMED_CID(NS_DEVICEPROTOCOLHANDLER_CID); michael@0: #endif michael@0: #ifdef NECKO_PROTOCOL_viewsource michael@0: NS_DEFINE_NAMED_CID(NS_VIEWSOURCEHANDLER_CID); michael@0: #endif michael@0: #ifdef NECKO_PROTOCOL_wyciwyg michael@0: NS_DEFINE_NAMED_CID(NS_WYCIWYGPROTOCOLHANDLER_CID); michael@0: #endif michael@0: #ifdef NECKO_PROTOCOL_websocket michael@0: NS_DEFINE_NAMED_CID(NS_WEBSOCKETPROTOCOLHANDLER_CID); michael@0: NS_DEFINE_NAMED_CID(NS_WEBSOCKETSSLPROTOCOLHANDLER_CID); michael@0: #endif michael@0: #ifdef NECKO_PROTOCOL_rtsp michael@0: NS_DEFINE_NAMED_CID(NS_RTSPPROTOCOLHANDLER_CID); michael@0: #endif michael@0: #if defined(XP_WIN) michael@0: NS_DEFINE_NAMED_CID(NS_NETWORK_LINK_SERVICE_CID); michael@0: #elif defined(MOZ_WIDGET_COCOA) michael@0: NS_DEFINE_NAMED_CID(NS_NETWORK_LINK_SERVICE_CID); michael@0: #elif defined(MOZ_ENABLE_QTNETWORK) michael@0: NS_DEFINE_NAMED_CID(NS_NETWORK_LINK_SERVICE_CID); michael@0: #elif defined(MOZ_WIDGET_ANDROID) michael@0: NS_DEFINE_NAMED_CID(NS_NETWORK_LINK_SERVICE_CID); michael@0: #endif michael@0: NS_DEFINE_NAMED_CID(NS_SERIALIZATION_HELPER_CID); michael@0: NS_DEFINE_NAMED_CID(NS_REDIRECTCHANNELREGISTRAR_CID); michael@0: NS_DEFINE_NAMED_CID(NS_CACHE_STORAGE_SERVICE_CID); michael@0: NS_DEFINE_NAMED_CID(NS_NETWORKSEER_CID); michael@0: michael@0: static const mozilla::Module::CIDEntry kNeckoCIDs[] = { michael@0: { &kNS_IOSERVICE_CID, false, nullptr, nsIOServiceConstructor }, michael@0: { &kNS_STREAMTRANSPORTSERVICE_CID, false, nullptr, nsStreamTransportServiceConstructor }, michael@0: { &kNS_SOCKETTRANSPORTSERVICE_CID, false, nullptr, nsSocketTransportServiceConstructor }, michael@0: { &kNS_SERVERSOCKET_CID, false, nullptr, nsServerSocketConstructor }, michael@0: { &kNS_UDPSOCKET_CID, false, nullptr, nsUDPSocketConstructor }, michael@0: { &kNS_SOCKETPROVIDERSERVICE_CID, false, nullptr, nsSocketProviderService::Create }, michael@0: { &kNS_DNSSERVICE_CID, false, nullptr, nsIDNSServiceConstructor }, michael@0: { &kNS_IDNSERVICE_CID, false, nullptr, nsIDNServiceConstructor }, michael@0: { &kNS_EFFECTIVETLDSERVICE_CID, false, nullptr, nsEffectiveTLDServiceConstructor }, michael@0: { &kNS_SIMPLEURI_CID, false, nullptr, nsSimpleURIConstructor }, michael@0: { &kNS_SIMPLENESTEDURI_CID, false, nullptr, nsSimpleNestedURIConstructor }, michael@0: { &kNS_ASYNCSTREAMCOPIER_CID, false, nullptr, nsAsyncStreamCopierConstructor }, michael@0: { &kNS_INPUTSTREAMPUMP_CID, false, nullptr, nsInputStreamPumpConstructor }, michael@0: { &kNS_INPUTSTREAMCHANNEL_CID, false, nullptr, nsInputStreamChannelConstructor }, michael@0: { &kNS_STREAMLOADER_CID, false, nullptr, nsStreamLoader::Create }, michael@0: { &kNS_UNICHARSTREAMLOADER_CID, false, nullptr, nsUnicharStreamLoader::Create }, michael@0: { &kNS_DOWNLOADER_CID, false, nullptr, nsDownloaderConstructor }, michael@0: { &kNS_BACKGROUNDFILESAVEROUTPUTSTREAM_CID, false, nullptr, michael@0: mozilla::net::BackgroundFileSaverOutputStreamConstructor }, michael@0: { &kNS_BACKGROUNDFILESAVERSTREAMLISTENER_CID, false, nullptr, michael@0: mozilla::net::BackgroundFileSaverStreamListenerConstructor }, michael@0: { &kNS_SYNCSTREAMLISTENER_CID, false, nullptr, nsSyncStreamListenerConstructor }, michael@0: { &kNS_REQUESTOBSERVERPROXY_CID, false, nullptr, nsRequestObserverProxyConstructor }, michael@0: { &kNS_SIMPLESTREAMLISTENER_CID, false, nullptr, nsSimpleStreamListenerConstructor }, michael@0: { &kNS_STREAMLISTENERTEE_CID, false, nullptr, nsStreamListenerTeeConstructor }, michael@0: { &kNS_LOADGROUP_CID, false, nullptr, nsLoadGroupConstructor }, michael@0: { &kNS_LOCALFILEINPUTSTREAM_CID, false, nullptr, nsFileInputStream::Create }, michael@0: { &kNS_LOCALFILEOUTPUTSTREAM_CID, false, nullptr, nsFileOutputStream::Create }, michael@0: { &kNS_PARTIALLOCALFILEINPUTSTREAM_CID, false, nullptr, nsPartialFileInputStream::Create }, michael@0: { &kNS_ATOMICLOCALFILEOUTPUTSTREAM_CID, false, nullptr, nsAtomicFileOutputStreamConstructor }, michael@0: { &kNS_SAFELOCALFILEOUTPUTSTREAM_CID, false, nullptr, nsSafeFileOutputStreamConstructor }, michael@0: { &kNS_LOCALFILESTREAM_CID, false, nullptr, nsFileStreamConstructor }, michael@0: { &kNS_URICHECKER_CID, false, nullptr, nsURICheckerConstructor }, michael@0: { &kNS_INCREMENTALDOWNLOAD_CID, false, nullptr, net_NewIncrementalDownload }, michael@0: { &kNS_STDURLPARSER_CID, false, nullptr, nsStdURLParserConstructor }, michael@0: { &kNS_NOAUTHURLPARSER_CID, false, nullptr, nsNoAuthURLParserConstructor }, michael@0: { &kNS_AUTHURLPARSER_CID, false, nullptr, nsAuthURLParserConstructor }, michael@0: { &kNS_STANDARDURL_CID, false, nullptr, nsStandardURLConstructor }, michael@0: { &kNS_ARRAYBUFFERINPUTSTREAM_CID, false, nullptr, ArrayBufferInputStreamConstructor }, michael@0: { &kNS_BUFFEREDINPUTSTREAM_CID, false, nullptr, nsBufferedInputStream::Create }, michael@0: { &kNS_BUFFEREDOUTPUTSTREAM_CID, false, nullptr, nsBufferedOutputStream::Create }, michael@0: { &kNS_MIMEINPUTSTREAM_CID, false, nullptr, nsMIMEInputStreamConstructor }, michael@0: { &kNS_PROTOCOLPROXYSERVICE_CID, true, nullptr, nsProtocolProxyServiceConstructor }, michael@0: { &kNS_STREAMCONVERTERSERVICE_CID, false, nullptr, CreateNewStreamConvServiceFactory }, michael@0: { &kNS_DASHBOARD_CID, false, nullptr, mozilla::net::DashboardConstructor }, michael@0: #ifdef NECKO_PROTOCOL_ftp michael@0: { &kNS_FTPDIRLISTINGCONVERTER_CID, false, nullptr, CreateNewFTPDirListingConv }, michael@0: #endif michael@0: { &kNS_NSINDEXEDTOHTMLCONVERTER_CID, false, nullptr, nsIndexedToHTML::Create }, michael@0: { &kNS_DIRINDEXPARSER_CID, false, nullptr, nsDirIndexParserConstructor }, michael@0: { &kNS_MULTIMIXEDCONVERTER_CID, false, nullptr, CreateNewMultiMixedConvFactory }, michael@0: { &kNS_UNKNOWNDECODER_CID, false, nullptr, CreateNewUnknownDecoderFactory }, michael@0: { &kNS_BINARYDETECTOR_CID, false, nullptr, CreateNewBinaryDetectorFactory }, michael@0: { &kNS_HTTPCOMPRESSCONVERTER_CID, false, nullptr, CreateNewHTTPCompressConvFactory }, michael@0: { &kNS_NSTXTTOHTMLCONVERTER_CID, false, nullptr, CreateNewNSTXTToHTMLConvFactory }, michael@0: #ifdef BUILD_BINHEX_DECODER michael@0: { &kNS_BINHEXDECODER_CID, false, nullptr, nsBinHexDecoderConstructor }, michael@0: #endif michael@0: { &kMOZITXTTOHTMLCONV_CID, false, nullptr, CreateNewTXTToHTMLConvFactory }, michael@0: { &kNS_DIRINDEX_CID, false, nullptr, nsDirIndexConstructor }, michael@0: { &kNS_MIMEHEADERPARAM_CID, false, nullptr, nsMIMEHeaderParamImplConstructor }, michael@0: #ifdef NECKO_PROTOCOL_file michael@0: { &kNS_FILEPROTOCOLHANDLER_CID, false, nullptr, nsFileProtocolHandlerConstructor }, michael@0: #endif michael@0: #ifdef NECKO_PROTOCOL_http michael@0: { &kNS_HTTPPROTOCOLHANDLER_CID, false, nullptr, mozilla::net::nsHttpHandlerConstructor }, michael@0: { &kNS_HTTPSPROTOCOLHANDLER_CID, false, nullptr, mozilla::net::nsHttpsHandlerConstructor }, michael@0: { &kNS_HTTPBASICAUTH_CID, false, nullptr, mozilla::net::nsHttpBasicAuthConstructor }, michael@0: { &kNS_HTTPDIGESTAUTH_CID, false, nullptr, mozilla::net::nsHttpDigestAuthConstructor }, michael@0: { &kNS_HTTPNTLMAUTH_CID, false, nullptr, mozilla::net::nsHttpNTLMAuthConstructor }, michael@0: { &kNS_HTTPAUTHMANAGER_CID, false, nullptr, mozilla::net::nsHttpAuthManagerConstructor }, michael@0: { &kNS_HTTPCHANNELAUTHPROVIDER_CID, false, nullptr, mozilla::net::nsHttpChannelAuthProviderConstructor }, michael@0: { &kNS_HTTPACTIVITYDISTRIBUTOR_CID, false, nullptr, mozilla::net::nsHttpActivityDistributorConstructor }, michael@0: #endif // !NECKO_PROTOCOL_http michael@0: #ifdef NECKO_PROTOCOL_ftp michael@0: { &kNS_FTPPROTOCOLHANDLER_CID, false, nullptr, nsFtpProtocolHandlerConstructor }, michael@0: #endif michael@0: #ifdef NECKO_PROTOCOL_res michael@0: { &kNS_RESPROTOCOLHANDLER_CID, false, nullptr, nsResProtocolHandlerConstructor }, michael@0: { &kNS_RESURL_CID, false, nullptr, nsResURLConstructor }, michael@0: #endif michael@0: { &kNS_ABOUTPROTOCOLHANDLER_CID, false, nullptr, nsAboutProtocolHandlerConstructor }, michael@0: { &kNS_SAFEABOUTPROTOCOLHANDLER_CID, false, nullptr, nsSafeAboutProtocolHandlerConstructor }, michael@0: { &kNS_ABOUT_BLANK_MODULE_CID, false, nullptr, nsAboutBlank::Create }, michael@0: { &kNS_NESTEDABOUTURI_CID, false, nullptr, nsNestedAboutURIConstructor }, michael@0: #ifdef NECKO_PROTOCOL_about michael@0: #ifdef NS_BUILD_REFCNT_LOGGING michael@0: { &kNS_ABOUT_BLOAT_MODULE_CID, false, nullptr, nsAboutBloat::Create }, michael@0: #endif michael@0: { &kNS_ABOUT_CACHE_MODULE_CID, false, nullptr, nsAboutCache::Create }, michael@0: { &kNS_ABOUT_CACHE_ENTRY_MODULE_CID, false, nullptr, nsAboutCacheEntryConstructor }, michael@0: #endif michael@0: { &kNS_SOCKSSOCKETPROVIDER_CID, false, nullptr, nsSOCKSSocketProvider::CreateV5 }, michael@0: { &kNS_SOCKS4SOCKETPROVIDER_CID, false, nullptr, nsSOCKSSocketProvider::CreateV4 }, michael@0: { &kNS_UDPSOCKETPROVIDER_CID, false, nullptr, nsUDPSocketProviderConstructor }, michael@0: { &kNS_CACHESERVICE_CID, false, nullptr, nsCacheService::Create }, michael@0: { &kNS_APPLICATIONCACHESERVICE_CID, false, nullptr, nsApplicationCacheServiceConstructor }, michael@0: { &kNS_APPLICATIONCACHENAMESPACE_CID, false, nullptr, nsApplicationCacheNamespaceConstructor }, michael@0: { &kNS_APPLICATIONCACHE_CID, false, nullptr, nsApplicationCacheConstructor }, michael@0: { &kNS_APPPROTOCOLHANDLER_CID, false, nullptr, AppProtocolHandler::Create }, michael@0: #ifdef NECKO_COOKIES michael@0: { &kNS_COOKIEMANAGER_CID, false, nullptr, nsICookieServiceConstructor }, michael@0: { &kNS_COOKIESERVICE_CID, false, nullptr, nsICookieServiceConstructor }, michael@0: #endif michael@0: #ifdef NECKO_WIFI michael@0: { &kNS_WIFI_MONITOR_COMPONENT_CID, false, nullptr, nsWifiMonitorConstructor }, michael@0: #endif michael@0: #ifdef NECKO_PROTOCOL_data michael@0: { &kNS_DATAPROTOCOLHANDLER_CID, false, nullptr, nsDataHandler::Create }, michael@0: #endif michael@0: #ifdef NECKO_PROTOCOL_device michael@0: { &kNS_DEVICEPROTOCOLHANDLER_CID, false, nullptr, nsDeviceProtocolHandlerConstructor}, michael@0: #endif michael@0: #ifdef NECKO_PROTOCOL_viewsource michael@0: { &kNS_VIEWSOURCEHANDLER_CID, false, nullptr, nsViewSourceHandlerConstructor }, michael@0: #endif michael@0: #ifdef NECKO_PROTOCOL_wyciwyg michael@0: { &kNS_WYCIWYGPROTOCOLHANDLER_CID, false, nullptr, nsWyciwygProtocolHandlerConstructor }, michael@0: #endif michael@0: #ifdef NECKO_PROTOCOL_websocket michael@0: { &kNS_WEBSOCKETPROTOCOLHANDLER_CID, false, nullptr, michael@0: mozilla::net::WebSocketChannelConstructor }, michael@0: { &kNS_WEBSOCKETSSLPROTOCOLHANDLER_CID, false, nullptr, michael@0: mozilla::net::WebSocketSSLChannelConstructor }, michael@0: #endif michael@0: #ifdef NECKO_PROTOCOL_rtsp michael@0: { &kNS_RTSPPROTOCOLHANDLER_CID, false, nullptr, mozilla::net::RtspHandlerConstructor }, michael@0: #endif michael@0: #if defined(XP_WIN) michael@0: { &kNS_NETWORK_LINK_SERVICE_CID, false, nullptr, nsNotifyAddrListenerConstructor }, michael@0: #elif defined(MOZ_WIDGET_COCOA) michael@0: { &kNS_NETWORK_LINK_SERVICE_CID, false, nullptr, nsNetworkLinkServiceConstructor }, michael@0: #elif defined(MOZ_ENABLE_QTNETWORK) michael@0: { &kNS_NETWORK_LINK_SERVICE_CID, false, nullptr, nsQtNetworkLinkServiceConstructor }, michael@0: #elif defined(MOZ_WIDGET_ANDROID) michael@0: { &kNS_NETWORK_LINK_SERVICE_CID, false, nullptr, nsAndroidNetworkLinkServiceConstructor }, michael@0: #endif michael@0: { &kNS_SERIALIZATION_HELPER_CID, false, nullptr, nsSerializationHelperConstructor }, michael@0: { &kNS_REDIRECTCHANNELREGISTRAR_CID, false, nullptr, RedirectChannelRegistrarConstructor }, michael@0: { &kNS_CACHE_STORAGE_SERVICE_CID, false, nullptr, CacheStorageServiceConstructor }, michael@0: { &kNS_NETWORKSEER_CID, false, nullptr, mozilla::net::Seer::Create }, michael@0: { nullptr } michael@0: }; michael@0: michael@0: static const mozilla::Module::ContractIDEntry kNeckoContracts[] = { michael@0: { NS_IOSERVICE_CONTRACTID, &kNS_IOSERVICE_CID }, michael@0: { NS_NETUTIL_CONTRACTID, &kNS_IOSERVICE_CID }, michael@0: { NS_STREAMTRANSPORTSERVICE_CONTRACTID, &kNS_STREAMTRANSPORTSERVICE_CID }, michael@0: { NS_SOCKETTRANSPORTSERVICE_CONTRACTID, &kNS_SOCKETTRANSPORTSERVICE_CID }, michael@0: { NS_SERVERSOCKET_CONTRACTID, &kNS_SERVERSOCKET_CID }, michael@0: { NS_UDPSOCKET_CONTRACTID, &kNS_UDPSOCKET_CID }, michael@0: { NS_SOCKETPROVIDERSERVICE_CONTRACTID, &kNS_SOCKETPROVIDERSERVICE_CID }, michael@0: { NS_DNSSERVICE_CONTRACTID, &kNS_DNSSERVICE_CID }, michael@0: { NS_IDNSERVICE_CONTRACTID, &kNS_IDNSERVICE_CID }, michael@0: { NS_EFFECTIVETLDSERVICE_CONTRACTID, &kNS_EFFECTIVETLDSERVICE_CID }, michael@0: { NS_SIMPLEURI_CONTRACTID, &kNS_SIMPLEURI_CID }, michael@0: { NS_ASYNCSTREAMCOPIER_CONTRACTID, &kNS_ASYNCSTREAMCOPIER_CID }, michael@0: { NS_INPUTSTREAMPUMP_CONTRACTID, &kNS_INPUTSTREAMPUMP_CID }, michael@0: { NS_INPUTSTREAMCHANNEL_CONTRACTID, &kNS_INPUTSTREAMCHANNEL_CID }, michael@0: { NS_STREAMLOADER_CONTRACTID, &kNS_STREAMLOADER_CID }, michael@0: { NS_UNICHARSTREAMLOADER_CONTRACTID, &kNS_UNICHARSTREAMLOADER_CID }, michael@0: { NS_DOWNLOADER_CONTRACTID, &kNS_DOWNLOADER_CID }, michael@0: { NS_BACKGROUNDFILESAVEROUTPUTSTREAM_CONTRACTID, &kNS_BACKGROUNDFILESAVEROUTPUTSTREAM_CID }, michael@0: { NS_BACKGROUNDFILESAVERSTREAMLISTENER_CONTRACTID, &kNS_BACKGROUNDFILESAVERSTREAMLISTENER_CID }, michael@0: { NS_SYNCSTREAMLISTENER_CONTRACTID, &kNS_SYNCSTREAMLISTENER_CID }, michael@0: { NS_REQUESTOBSERVERPROXY_CONTRACTID, &kNS_REQUESTOBSERVERPROXY_CID }, michael@0: { NS_SIMPLESTREAMLISTENER_CONTRACTID, &kNS_SIMPLESTREAMLISTENER_CID }, michael@0: { NS_STREAMLISTENERTEE_CONTRACTID, &kNS_STREAMLISTENERTEE_CID }, michael@0: { NS_LOADGROUP_CONTRACTID, &kNS_LOADGROUP_CID }, michael@0: { NS_LOCALFILEINPUTSTREAM_CONTRACTID, &kNS_LOCALFILEINPUTSTREAM_CID }, michael@0: { NS_LOCALFILEOUTPUTSTREAM_CONTRACTID, &kNS_LOCALFILEOUTPUTSTREAM_CID }, michael@0: { NS_PARTIALLOCALFILEINPUTSTREAM_CONTRACTID, &kNS_PARTIALLOCALFILEINPUTSTREAM_CID }, michael@0: { NS_ATOMICLOCALFILEOUTPUTSTREAM_CONTRACTID, &kNS_ATOMICLOCALFILEOUTPUTSTREAM_CID }, michael@0: { NS_SAFELOCALFILEOUTPUTSTREAM_CONTRACTID, &kNS_SAFELOCALFILEOUTPUTSTREAM_CID }, michael@0: { NS_LOCALFILESTREAM_CONTRACTID, &kNS_LOCALFILESTREAM_CID }, michael@0: { NS_URICHECKER_CONTRACT_ID, &kNS_URICHECKER_CID }, michael@0: { NS_INCREMENTALDOWNLOAD_CONTRACTID, &kNS_INCREMENTALDOWNLOAD_CID }, michael@0: { NS_STDURLPARSER_CONTRACTID, &kNS_STDURLPARSER_CID }, michael@0: { NS_NOAUTHURLPARSER_CONTRACTID, &kNS_NOAUTHURLPARSER_CID }, michael@0: { NS_AUTHURLPARSER_CONTRACTID, &kNS_AUTHURLPARSER_CID }, michael@0: { NS_STANDARDURL_CONTRACTID, &kNS_STANDARDURL_CID }, michael@0: { NS_ARRAYBUFFERINPUTSTREAM_CONTRACTID, &kNS_ARRAYBUFFERINPUTSTREAM_CID }, michael@0: { NS_BUFFEREDINPUTSTREAM_CONTRACTID, &kNS_BUFFEREDINPUTSTREAM_CID }, michael@0: { NS_BUFFEREDOUTPUTSTREAM_CONTRACTID, &kNS_BUFFEREDOUTPUTSTREAM_CID }, michael@0: { NS_MIMEINPUTSTREAM_CONTRACTID, &kNS_MIMEINPUTSTREAM_CID }, michael@0: { NS_PROTOCOLPROXYSERVICE_CONTRACTID, &kNS_PROTOCOLPROXYSERVICE_CID }, michael@0: { NS_STREAMCONVERTERSERVICE_CONTRACTID, &kNS_STREAMCONVERTERSERVICE_CID }, michael@0: { NS_DASHBOARD_CONTRACTID, &kNS_DASHBOARD_CID }, michael@0: #ifdef NECKO_PROTOCOL_ftp michael@0: { NS_ISTREAMCONVERTER_KEY FTP_TO_INDEX, &kNS_FTPDIRLISTINGCONVERTER_CID }, michael@0: #endif michael@0: { NS_ISTREAMCONVERTER_KEY INDEX_TO_HTML, &kNS_NSINDEXEDTOHTMLCONVERTER_CID }, michael@0: { NS_DIRINDEXPARSER_CONTRACTID, &kNS_DIRINDEXPARSER_CID }, michael@0: { NS_ISTREAMCONVERTER_KEY MULTI_MIXED_X, &kNS_MULTIMIXEDCONVERTER_CID }, michael@0: { NS_ISTREAMCONVERTER_KEY MULTI_BYTERANGES, &kNS_MULTIMIXEDCONVERTER_CID }, michael@0: { NS_ISTREAMCONVERTER_KEY MULTI_MIXED, &kNS_MULTIMIXEDCONVERTER_CID }, michael@0: { NS_ISTREAMCONVERTER_KEY UNKNOWN_CONTENT, &kNS_UNKNOWNDECODER_CID }, michael@0: { NS_GENERIC_CONTENT_SNIFFER, &kNS_UNKNOWNDECODER_CID }, michael@0: { NS_BINARYDETECTOR_CONTRACTID, &kNS_BINARYDETECTOR_CID }, michael@0: { NS_ISTREAMCONVERTER_KEY GZIP_TO_UNCOMPRESSED, &kNS_HTTPCOMPRESSCONVERTER_CID }, michael@0: { NS_ISTREAMCONVERTER_KEY XGZIP_TO_UNCOMPRESSED, &kNS_HTTPCOMPRESSCONVERTER_CID }, michael@0: { NS_ISTREAMCONVERTER_KEY COMPRESS_TO_UNCOMPRESSED, &kNS_HTTPCOMPRESSCONVERTER_CID }, michael@0: { NS_ISTREAMCONVERTER_KEY XCOMPRESS_TO_UNCOMPRESSED, &kNS_HTTPCOMPRESSCONVERTER_CID }, michael@0: { NS_ISTREAMCONVERTER_KEY DEFLATE_TO_UNCOMPRESSED, &kNS_HTTPCOMPRESSCONVERTER_CID }, michael@0: { NS_ISTREAMCONVERTER_KEY PLAIN_TO_HTML, &kNS_NSTXTTOHTMLCONVERTER_CID }, michael@0: #ifdef BUILD_BINHEX_DECODER michael@0: { NS_ISTREAMCONVERTER_KEY BINHEX_TO_WILD, &kNS_BINHEXDECODER_CID }, michael@0: #endif michael@0: { MOZ_TXTTOHTMLCONV_CONTRACTID, &kMOZITXTTOHTMLCONV_CID }, michael@0: { "@mozilla.org/dirIndex;1", &kNS_DIRINDEX_CID }, michael@0: { NS_MIMEHEADERPARAM_CONTRACTID, &kNS_MIMEHEADERPARAM_CID }, michael@0: #ifdef NECKO_PROTOCOL_file michael@0: { NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "file", &kNS_FILEPROTOCOLHANDLER_CID }, michael@0: #endif michael@0: #ifdef NECKO_PROTOCOL_http michael@0: { NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "http", &kNS_HTTPPROTOCOLHANDLER_CID }, michael@0: { NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "https", &kNS_HTTPSPROTOCOLHANDLER_CID }, michael@0: { NS_HTTP_AUTHENTICATOR_CONTRACTID_PREFIX "basic", &kNS_HTTPBASICAUTH_CID }, michael@0: { NS_HTTP_AUTHENTICATOR_CONTRACTID_PREFIX "digest", &kNS_HTTPDIGESTAUTH_CID }, michael@0: { NS_HTTP_AUTHENTICATOR_CONTRACTID_PREFIX "ntlm", &kNS_HTTPNTLMAUTH_CID }, michael@0: { NS_HTTPAUTHMANAGER_CONTRACTID, &kNS_HTTPAUTHMANAGER_CID }, michael@0: { NS_HTTPCHANNELAUTHPROVIDER_CONTRACTID, &kNS_HTTPCHANNELAUTHPROVIDER_CID }, michael@0: { NS_HTTPACTIVITYDISTRIBUTOR_CONTRACTID, &kNS_HTTPACTIVITYDISTRIBUTOR_CID }, michael@0: #endif // !NECKO_PROTOCOL_http michael@0: #ifdef NECKO_PROTOCOL_ftp michael@0: { NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "ftp", &kNS_FTPPROTOCOLHANDLER_CID }, michael@0: #endif michael@0: #ifdef NECKO_PROTOCOL_res michael@0: { NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "resource", &kNS_RESPROTOCOLHANDLER_CID }, michael@0: #endif michael@0: { NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "about", &kNS_ABOUTPROTOCOLHANDLER_CID }, michael@0: { NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "moz-safe-about", &kNS_SAFEABOUTPROTOCOLHANDLER_CID }, michael@0: { NS_ABOUT_MODULE_CONTRACTID_PREFIX "blank", &kNS_ABOUT_BLANK_MODULE_CID }, michael@0: #ifdef NECKO_PROTOCOL_about michael@0: #ifdef NS_BUILD_REFCNT_LOGGING michael@0: { NS_ABOUT_MODULE_CONTRACTID_PREFIX "bloat", &kNS_ABOUT_BLOAT_MODULE_CID }, michael@0: #endif michael@0: { NS_ABOUT_MODULE_CONTRACTID_PREFIX "cache", &kNS_ABOUT_CACHE_MODULE_CID }, michael@0: { NS_ABOUT_MODULE_CONTRACTID_PREFIX "cache-entry", &kNS_ABOUT_CACHE_ENTRY_MODULE_CID }, michael@0: #endif michael@0: { NS_NETWORK_SOCKET_CONTRACTID_PREFIX "socks", &kNS_SOCKSSOCKETPROVIDER_CID }, michael@0: { NS_NETWORK_SOCKET_CONTRACTID_PREFIX "socks4", &kNS_SOCKS4SOCKETPROVIDER_CID }, michael@0: { NS_NETWORK_SOCKET_CONTRACTID_PREFIX "udp", &kNS_UDPSOCKETPROVIDER_CID }, michael@0: { NS_CACHESERVICE_CONTRACTID, &kNS_CACHESERVICE_CID }, michael@0: { NS_APPLICATIONCACHESERVICE_CONTRACTID, &kNS_APPLICATIONCACHESERVICE_CID }, michael@0: { NS_APPLICATIONCACHENAMESPACE_CONTRACTID, &kNS_APPLICATIONCACHENAMESPACE_CID }, michael@0: { NS_APPLICATIONCACHE_CONTRACTID, &kNS_APPLICATIONCACHE_CID }, michael@0: { NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "app", &kNS_APPPROTOCOLHANDLER_CID }, michael@0: #ifdef NECKO_COOKIES michael@0: { NS_COOKIEMANAGER_CONTRACTID, &kNS_COOKIEMANAGER_CID }, michael@0: { NS_COOKIESERVICE_CONTRACTID, &kNS_COOKIESERVICE_CID }, michael@0: #endif michael@0: #ifdef NECKO_WIFI michael@0: { NS_WIFI_MONITOR_CONTRACTID, &kNS_WIFI_MONITOR_COMPONENT_CID }, michael@0: #endif michael@0: #ifdef NECKO_PROTOCOL_data michael@0: { NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "data", &kNS_DATAPROTOCOLHANDLER_CID }, michael@0: #endif michael@0: #ifdef NECKO_PROTOCOL_device michael@0: { NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "moz-device", &kNS_DEVICEPROTOCOLHANDLER_CID }, michael@0: #endif michael@0: #ifdef NECKO_PROTOCOL_viewsource michael@0: { NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "view-source", &kNS_VIEWSOURCEHANDLER_CID }, michael@0: #endif michael@0: #ifdef NECKO_PROTOCOL_wyciwyg michael@0: { NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "wyciwyg", &kNS_WYCIWYGPROTOCOLHANDLER_CID }, michael@0: #endif michael@0: #ifdef NECKO_PROTOCOL_websocket michael@0: { NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "ws", &kNS_WEBSOCKETPROTOCOLHANDLER_CID }, michael@0: { NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "wss", &kNS_WEBSOCKETSSLPROTOCOLHANDLER_CID }, michael@0: #endif michael@0: #ifdef NECKO_PROTOCOL_rtsp michael@0: { NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "rtsp", &kNS_RTSPPROTOCOLHANDLER_CID }, michael@0: #endif michael@0: #if defined(XP_WIN) michael@0: { NS_NETWORK_LINK_SERVICE_CONTRACTID, &kNS_NETWORK_LINK_SERVICE_CID }, michael@0: #elif defined(MOZ_WIDGET_COCOA) michael@0: { NS_NETWORK_LINK_SERVICE_CONTRACTID, &kNS_NETWORK_LINK_SERVICE_CID }, michael@0: #elif defined(MOZ_ENABLE_QTNETWORK) michael@0: { NS_NETWORK_LINK_SERVICE_CONTRACTID, &kNS_NETWORK_LINK_SERVICE_CID }, michael@0: #elif defined(MOZ_WIDGET_ANDROID) michael@0: { NS_NETWORK_LINK_SERVICE_CONTRACTID, &kNS_NETWORK_LINK_SERVICE_CID }, michael@0: #endif michael@0: { NS_SERIALIZATION_HELPER_CONTRACTID, &kNS_SERIALIZATION_HELPER_CID }, michael@0: { NS_REDIRECTCHANNELREGISTRAR_CONTRACTID, &kNS_REDIRECTCHANNELREGISTRAR_CID }, michael@0: { NS_CACHE_STORAGE_SERVICE_CONTRACTID, &kNS_CACHE_STORAGE_SERVICE_CID }, michael@0: { NS_NETWORKSEER_CONTRACTID, &kNS_NETWORKSEER_CID }, michael@0: { nullptr } michael@0: }; michael@0: michael@0: static const mozilla::Module kNeckoModule = { michael@0: mozilla::Module::kVersion, michael@0: kNeckoCIDs, michael@0: kNeckoContracts, michael@0: kNeckoCategories, michael@0: nullptr, michael@0: nsNetStartup, michael@0: nsNetShutdown michael@0: }; michael@0: michael@0: NSMODULE_DEFN(necko) = &kNeckoModule;