2001-09-29 00:14:13 +04:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
|
|
|
/* ***** BEGIN LICENSE BLOCK *****
|
2004-04-19 02:01:16 +04:00
|
|
|
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
1999-09-30 05:53:31 +04:00
|
|
|
*
|
2004-04-19 02:01:16 +04:00
|
|
|
* The contents of this file are subject to the Mozilla Public License Version
|
|
|
|
* 1.1 (the "License"); you may not use this file except in compliance with
|
|
|
|
* the License. You may obtain a copy of the License at
|
|
|
|
* http://www.mozilla.org/MPL/
|
1999-09-30 05:53:31 +04:00
|
|
|
*
|
2001-09-29 00:14:13 +04:00
|
|
|
* Software distributed under the License is distributed on an "AS IS" basis,
|
|
|
|
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
|
|
|
* for the specific language governing rights and limitations under the
|
|
|
|
* License.
|
1999-09-30 05:53:31 +04:00
|
|
|
*
|
1999-11-06 06:40:37 +03:00
|
|
|
* The Original Code is mozilla.org code.
|
|
|
|
*
|
2004-04-19 02:01:16 +04:00
|
|
|
* The Initial Developer of the Original Code is
|
2001-09-29 00:14:13 +04:00
|
|
|
* Netscape Communications Corporation.
|
|
|
|
* Portions created by the Initial Developer are Copyright (C) 1998
|
|
|
|
* the Initial Developer. All Rights Reserved.
|
1999-11-06 06:40:37 +03:00
|
|
|
*
|
2001-09-29 00:14:13 +04:00
|
|
|
* Contributor(s):
|
|
|
|
*
|
|
|
|
* Alternatively, the contents of this file may be used under the terms of
|
2004-04-19 02:01:16 +04:00
|
|
|
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
2001-09-29 00:14:13 +04:00
|
|
|
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
|
|
|
* in which case the provisions of the GPL or the LGPL are applicable instead
|
|
|
|
* of those above. If you wish to allow use of your version of this file only
|
|
|
|
* under the terms of either the GPL or the LGPL, and not to allow others to
|
2004-04-19 02:01:16 +04:00
|
|
|
* use your version of this file under the terms of the MPL, indicate your
|
2001-09-29 00:14:13 +04:00
|
|
|
* decision by deleting the provisions above and replace them with the notice
|
|
|
|
* and other provisions required by the GPL or the LGPL. If you do not delete
|
|
|
|
* the provisions above, a recipient may use your version of this file under
|
2004-04-19 02:01:16 +04:00
|
|
|
* the terms of any one of the MPL, the GPL or the LGPL.
|
2001-09-29 00:14:13 +04:00
|
|
|
*
|
|
|
|
* ***** END LICENSE BLOCK ***** */
|
2001-10-03 04:40:10 +04:00
|
|
|
|
2003-04-23 07:47:43 +04:00
|
|
|
#include "necko-config.h"
|
|
|
|
|
1999-09-30 05:53:31 +04:00
|
|
|
#include "nsCOMPtr.h"
|
|
|
|
#include "nsIModule.h"
|
2006-03-30 21:31:15 +04:00
|
|
|
#include "nsIClassInfoImpl.h"
|
1999-09-30 05:53:31 +04:00
|
|
|
#include "nsIGenericFactory.h"
|
|
|
|
#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 "nsSocketProviderService.h"
|
|
|
|
#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"
|
2002-08-28 03:47:25 +04:00
|
|
|
#include "nsUnicharStreamLoader.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"
|
2004-01-08 06:56:02 +03:00
|
|
|
#include "nsMimeTypes.h"
|
2005-04-05 21:40:32 +04:00
|
|
|
#include "nsNetStrings.h"
|
2008-11-08 02:00:26 +03:00
|
|
|
#include "nsDNSPrefetch.h"
|
2009-03-17 03:59:33 +03:00
|
|
|
#include "nsAboutProtocolHandler.h"
|
1999-09-30 05:53:31 +04:00
|
|
|
|
2001-01-24 01:10:34 +03:00
|
|
|
#include "nsNetCID.h"
|
|
|
|
|
2006-11-16 00:38:48 +03:00
|
|
|
#if defined(XP_MACOSX)
|
2009-04-22 17:05:35 +04:00
|
|
|
#if !defined(__LP64__)
|
2002-10-08 07:12:32 +04:00
|
|
|
#define BUILD_APPLEFILE_DECODER 1
|
2009-04-22 17:05:35 +04:00
|
|
|
#endif
|
2002-10-08 07:12:32 +04:00
|
|
|
#else
|
|
|
|
#define BUILD_BINHEX_DECODER 1
|
|
|
|
#endif
|
|
|
|
|
2000-05-06 13:15:56 +04:00
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2003-01-18 05:15:14 +03:00
|
|
|
#include "nsIOService.h"
|
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"
|
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsDNSService, Init)
|
2003-04-11 22:24:55 +04:00
|
|
|
|
|
|
|
#include "nsProtocolProxyService.h"
|
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsProtocolProxyService, Init)
|
2006-03-30 21:31:15 +04:00
|
|
|
NS_DECL_CLASSINFO(nsProtocolProxyService)
|
2003-01-18 05:15:14 +03:00
|
|
|
|
|
|
|
#include "nsStreamTransportService.h"
|
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"
|
|
|
|
#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"
|
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsServerSocket)
|
|
|
|
|
2007-05-31 10:07:26 +04:00
|
|
|
#include "nsUDPSocketProvider.h"
|
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsUDPSocketProvider)
|
|
|
|
|
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"
|
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)
|
|
|
|
|
2003-10-08 08:27:13 +04:00
|
|
|
#include "nsSyncStreamListener.h"
|
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsSyncStreamListener, Init)
|
|
|
|
|
2004-07-07 00:35:40 +04:00
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsSafeFileOutputStream)
|
|
|
|
|
2005-09-28 17:13:27 +04:00
|
|
|
NS_GENERIC_AGGREGATED_CONSTRUCTOR_INIT(nsLoadGroup, Init)
|
|
|
|
|
2006-06-09 22:23:10 +04:00
|
|
|
#include "nsEffectiveTLDService.h"
|
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsEffectiveTLDService, Init)
|
|
|
|
|
2003-01-18 05:15:14 +03:00
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2005-06-01 22:05:36 +04:00
|
|
|
extern NS_METHOD
|
|
|
|
net_NewIncrementalDownload(nsISupports *, const nsIID &, void **);
|
|
|
|
|
|
|
|
#define NS_INCREMENTALDOWNLOAD_CLASSNAME \
|
|
|
|
"nsIncrementalDownload"
|
|
|
|
#define NS_INCREMENTALDOWNLOAD_CID \
|
|
|
|
{ /* a62af1ba-79b3-4896-8aaf-b148bfce4280 */ \
|
|
|
|
0xa62af1ba, \
|
|
|
|
0x79b3, \
|
|
|
|
0x4896, \
|
|
|
|
{0x8a, 0xaf, 0xb1, 0x48, 0xbf, 0xce, 0x42, 0x80} \
|
|
|
|
}
|
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2000-05-06 13:15:56 +04:00
|
|
|
#include "nsStreamConverterService.h"
|
2002-10-08 07:12:32 +04:00
|
|
|
|
|
|
|
#ifdef BUILD_APPLEFILE_DECODER
|
2001-06-26 02:11:43 +04:00
|
|
|
#include "nsAppleFileDecoder.h"
|
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsAppleFileDecoder)
|
|
|
|
#endif
|
2000-05-06 13:15:56 +04:00
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2003-06-13 01:57:49 +04:00
|
|
|
#include "nsMIMEHeaderParamImpl.h"
|
|
|
|
|
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsMIMEHeaderParamImpl)
|
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2001-04-10 10:01:08 +04:00
|
|
|
#include "nsRequestObserverProxy.h"
|
2001-01-24 01:10:34 +03:00
|
|
|
#include "nsSimpleStreamListener.h"
|
2001-10-03 04:43:30 +04:00
|
|
|
#include "nsDirIndexParser.h"
|
|
|
|
#include "nsDirIndex.h"
|
2001-01-24 01:10:34 +03:00
|
|
|
|
2001-04-10 10:01:08 +04:00
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsRequestObserverProxy)
|
2001-01-24 01:10:34 +03:00
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsSimpleStreamListener)
|
2001-10-03 04:43:30 +04:00
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsDirIndexParser, Init)
|
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsDirIndex)
|
2000-05-06 13:15:56 +04:00
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2001-03-08 03:58:06 +03:00
|
|
|
#include "nsStreamListenerTee.h"
|
|
|
|
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"
|
|
|
|
NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(nsCookieService, nsCookieService::GetSingleton)
|
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"
|
2006-06-20 01:02:12 +04:00
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsAboutProtocolHandler)
|
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsSafeAboutProtocolHandler)
|
2009-03-17 03:59:33 +03:00
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsNestedAboutURI)
|
2003-04-23 07:47:43 +04:00
|
|
|
|
|
|
|
#ifdef NECKO_PROTOCOL_about
|
|
|
|
// about
|
2007-10-13 08:03:49 +04:00
|
|
|
#ifdef NS_BUILD_REFCNT_LOGGING
|
2003-04-23 07:47:43 +04:00
|
|
|
#include "nsAboutBloat.h"
|
2007-10-13 08:03:49 +04:00
|
|
|
#endif
|
2003-04-23 07:47:43 +04:00
|
|
|
#include "nsAboutCache.h"
|
|
|
|
#include "nsAboutCacheEntry.h"
|
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsAboutCacheEntry)
|
|
|
|
#endif
|
2008-08-27 03:09:02 +04:00
|
|
|
|
|
|
|
#ifdef NECKO_OFFLINE_CACHE
|
|
|
|
NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(nsOfflineCacheDevice, nsOfflineCacheDevice::GetInstance)
|
2008-09-30 22:34:23 +04:00
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsApplicationCacheNamespace)
|
2008-08-27 03:09:02 +04:00
|
|
|
#endif
|
|
|
|
|
2003-04-23 07:47:43 +04:00
|
|
|
#ifdef NECKO_PROTOCOL_file
|
|
|
|
// file
|
|
|
|
#include "nsFileProtocolHandler.h"
|
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsFileProtocolHandler, Init)
|
|
|
|
#endif
|
2001-03-08 03:58:06 +03:00
|
|
|
|
2003-04-23 07:47:43 +04:00
|
|
|
#ifdef NECKO_PROTOCOL_ftp
|
|
|
|
// 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
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef NECKO_PROTOCOL_http
|
|
|
|
// http/https
|
2001-05-12 01:04:09 +04:00
|
|
|
#include "nsHttpHandler.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"
|
2001-05-12 01:04:09 +04:00
|
|
|
#include "nsHttpBasicAuth.h"
|
2001-12-05 04:09:38 +03:00
|
|
|
#include "nsHttpDigestAuth.h"
|
2003-03-27 22:31:53 +03:00
|
|
|
#include "nsHttpNTLMAuth.h"
|
2009-09-02 00:55:50 +04:00
|
|
|
#include "nsHttpActivityDistributor.h"
|
2003-11-18 05:20:34 +03:00
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsHttpNTLMAuth)
|
2003-01-18 05:15:14 +03:00
|
|
|
#undef LOG
|
2003-04-11 05:19:07 +04:00
|
|
|
#undef LOG_ENABLED
|
2002-08-14 00:33:45 +04:00
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsHttpHandler, Init)
|
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsHttpsHandler, Init)
|
2003-03-24 06:59:47 +03:00
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsHttpAuthManager, Init)
|
2009-09-02 00:55:50 +04:00
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsHttpActivityDistributor, Init)
|
2002-08-14 00:33:45 +04:00
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsHttpBasicAuth)
|
2001-12-05 04:09:38 +03:00
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsHttpDigestAuth)
|
2003-04-23 07:47:43 +04:00
|
|
|
#endif // !NECKO_PROTOCOL_http
|
2009-09-02 00:55:50 +04:00
|
|
|
|
2003-04-23 07:47:43 +04:00
|
|
|
#ifdef NECKO_PROTOCOL_res
|
|
|
|
// resource
|
2001-09-20 05:32:16 +04:00
|
|
|
#include "nsResProtocolHandler.h"
|
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsResProtocolHandler, Init)
|
2004-12-02 09:59:34 +03:00
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsResURL)
|
2003-04-23 07:47:43 +04:00
|
|
|
#endif
|
2001-09-20 05:32:16 +04:00
|
|
|
|
2005-11-12 21:17:19 +03:00
|
|
|
#ifdef NECKO_PROTOCOL_gopher
|
|
|
|
#include "nsGopherHandler.h"
|
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsGopherHandler)
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef NECKO_PROTOCOL_viewsource
|
|
|
|
#include "nsViewSourceHandler.h"
|
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsViewSourceHandler)
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef NECKO_PROTOCOL_data
|
|
|
|
#include "nsDataHandler.h"
|
|
|
|
#endif
|
|
|
|
|
2001-09-20 05:32:16 +04:00
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2001-10-03 04:40:10 +04:00
|
|
|
#include "nsURIChecker.h"
|
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsURIChecker)
|
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
2001-06-22 02:02:47 +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"
|
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsStandardURL)
|
|
|
|
|
2005-09-28 17:13:27 +04:00
|
|
|
NS_GENERIC_AGGREGATED_CONSTRUCTOR(nsSimpleURI)
|
|
|
|
|
2006-06-20 01:02:12 +04:00
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsSimpleNestedURI)
|
|
|
|
|
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)
|
2009-11-18 18:20:45 +03:00
|
|
|
#elif defined(MOZ_ENABLE_LIBCONIC)
|
|
|
|
#include "nsMaemoNetworkLinkService.h"
|
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsMaemoNetworkLinkService, Init)
|
2006-05-02 22:08:55 +04:00
|
|
|
#endif
|
|
|
|
|
2002-09-27 03:30:18 +04:00
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2003-07-12 02:13:30 +04:00
|
|
|
#ifdef NECKO_PROTOCOL_ftp
|
2000-05-06 13:15:56 +04:00
|
|
|
#include "nsFTPDirListingConv.h"
|
2003-07-12 02:13:30 +04:00
|
|
|
nsresult NS_NewFTPDirListingConv(nsFTPDirListingConv** result);
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef NECKO_PROTOCOL_gopher
|
2001-03-14 05:51:01 +03:00
|
|
|
#include "nsGopherDirListingConv.h"
|
2005-11-12 22:40:46 +03:00
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsGopherDirListingConv)
|
2003-07-12 02:13:30 +04:00
|
|
|
#endif
|
|
|
|
|
2000-05-06 13:15:56 +04:00
|
|
|
#include "nsMultiMixedConv.h"
|
|
|
|
#include "nsHTTPCompressConv.h"
|
|
|
|
#include "mozTXTToHTMLConv.h"
|
|
|
|
#include "nsUnknownDecoder.h"
|
|
|
|
#include "nsTXTToHTMLConv.h"
|
2001-03-06 05:14:42 +03:00
|
|
|
#include "nsIndexedToHTML.h"
|
2002-10-08 07:12:32 +04:00
|
|
|
#ifdef BUILD_BINHEX_DECODER
|
2001-06-28 05:09:51 +04:00
|
|
|
#include "nsBinHexDecoder.h"
|
|
|
|
#endif
|
2001-03-08 03:41:53 +03:00
|
|
|
|
2000-05-06 13:15:56 +04:00
|
|
|
nsresult NS_NewMultiMixedConv (nsMultiMixedConv** result);
|
|
|
|
nsresult MOZ_NewTXTToHTMLConv (mozTXTToHTMLConv** result);
|
|
|
|
nsresult NS_NewHTTPCompressConv (nsHTTPCompressConv ** result);
|
|
|
|
nsresult NS_NewNSTXTToHTMLConv(nsTXTToHTMLConv** result);
|
2001-03-08 03:41:53 +03:00
|
|
|
nsresult NS_NewStreamConv(nsStreamConverterService **aStreamConv);
|
|
|
|
|
2002-08-29 07:13:18 +04:00
|
|
|
#define FTP_TO_INDEX "?from=text/ftp-dir&to=application/http-index-format"
|
2001-03-14 05:51:01 +03:00
|
|
|
#define GOPHER_TO_INDEX "?from=text/gopher-dir&to=application/http-index-format"
|
2001-03-08 03:41:53 +03:00
|
|
|
#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=*/*"
|
2001-05-19 02:20:11 +04:00
|
|
|
#define MULTI_BYTERANGES "?from=multipart/byteranges&to=*/*"
|
2004-01-08 06:56:02 +03:00
|
|
|
#define UNKNOWN_CONTENT "?from=" UNKNOWN_CONTENT_TYPE "&to=*/*"
|
2001-03-08 03:41:53 +03:00
|
|
|
#define GZIP_TO_UNCOMPRESSED "?from=gzip&to=uncompressed"
|
|
|
|
#define XGZIP_TO_UNCOMPRESSED "?from=x-gzip&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"
|
|
|
|
#define PLAIN_TO_HTML "?from=text/plain&to=text/html"
|
|
|
|
|
2002-10-08 07:12:32 +04:00
|
|
|
#ifdef BUILD_BINHEX_DECODER
|
2001-06-28 05:09:51 +04:00
|
|
|
#define BINHEX_TO_WILD "?from=application/mac-binhex40&to=*/*"
|
|
|
|
#endif
|
|
|
|
|
2006-06-03 04:19:11 +04:00
|
|
|
static const char *const sStreamConverterArray[] = {
|
|
|
|
FTP_TO_INDEX,
|
|
|
|
GOPHER_TO_INDEX,
|
|
|
|
INDEX_TO_HTML,
|
|
|
|
MULTI_MIXED_X,
|
|
|
|
MULTI_MIXED,
|
|
|
|
MULTI_BYTERANGES,
|
|
|
|
UNKNOWN_CONTENT,
|
|
|
|
GZIP_TO_UNCOMPRESSED,
|
|
|
|
XGZIP_TO_UNCOMPRESSED,
|
|
|
|
COMPRESS_TO_UNCOMPRESSED,
|
|
|
|
XCOMPRESS_TO_UNCOMPRESSED,
|
|
|
|
DEFLATE_TO_UNCOMPRESSED,
|
2002-10-08 07:12:32 +04:00
|
|
|
#ifdef BUILD_BINHEX_DECODER
|
2006-06-03 04:19:11 +04:00
|
|
|
BINHEX_TO_WILD,
|
2001-06-28 05:09:51 +04:00
|
|
|
#endif
|
2006-06-03 04:19:11 +04:00
|
|
|
PLAIN_TO_HTML
|
|
|
|
};
|
2001-03-08 03:41:53 +03:00
|
|
|
|
2006-06-03 04:19:11 +04:00
|
|
|
static const PRUint32 sStreamConverterCount =
|
|
|
|
NS_ARRAY_LENGTH(sStreamConverterArray);
|
2002-09-04 02:10:08 +04:00
|
|
|
|
2001-03-08 03:41:53 +03:00
|
|
|
// each stream converter must add its from/to key to the category manager
|
|
|
|
// in RegisterStreamConverters(). This provides a string representation
|
|
|
|
// of each registered converter, rooted in the NS_ISTREAMCONVERTER_KEY
|
|
|
|
// category. These keys are then (when the stream converter service
|
|
|
|
// needs to chain converters together) enumerated and parsed to build
|
|
|
|
// a graph of converters for potential chaining.
|
|
|
|
static NS_METHOD
|
|
|
|
RegisterStreamConverters(nsIComponentManager *aCompMgr, nsIFile *aPath,
|
2001-03-12 23:43:02 +03:00
|
|
|
const char *registryLocation,
|
|
|
|
const char *componentType,
|
|
|
|
const nsModuleComponentInfo *info) {
|
2001-03-08 03:41:53 +03:00
|
|
|
nsCOMPtr<nsICategoryManager> catmgr =
|
2006-06-03 04:19:11 +04:00
|
|
|
do_GetService(NS_CATEGORYMANAGER_CONTRACTID);
|
|
|
|
NS_ENSURE_STATE(catmgr);
|
|
|
|
|
|
|
|
for (PRUint32 count = 0; count < sStreamConverterCount; ++count) {
|
|
|
|
catmgr->AddCategoryEntry(NS_ISTREAMCONVERTER_KEY,
|
|
|
|
sStreamConverterArray[count], "",
|
|
|
|
PR_TRUE, PR_TRUE, nsnull);
|
2001-03-08 03:41:53 +03:00
|
|
|
}
|
2006-06-03 04:19:11 +04:00
|
|
|
return NS_OK;
|
2001-03-08 03:41:53 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
// same as RegisterStreamConverters except the reverse.
|
|
|
|
static NS_METHOD
|
|
|
|
UnregisterStreamConverters(nsIComponentManager *aCompMgr, nsIFile *aPath,
|
2001-03-12 23:43:02 +03:00
|
|
|
const char *registryLocation,
|
|
|
|
const nsModuleComponentInfo *info) {
|
2001-03-08 03:41:53 +03:00
|
|
|
nsCOMPtr<nsICategoryManager> catmgr =
|
2006-06-03 04:19:11 +04:00
|
|
|
do_GetService(NS_CATEGORYMANAGER_CONTRACTID);
|
|
|
|
NS_ENSURE_STATE(catmgr);
|
2001-03-08 03:41:53 +03:00
|
|
|
|
2006-06-03 04:19:11 +04:00
|
|
|
for (PRUint32 count = 0; count < sStreamConverterCount; ++count) {
|
|
|
|
catmgr->DeleteCategoryEntry(NS_ISTREAMCONVERTER_KEY,
|
|
|
|
sStreamConverterArray[count],
|
|
|
|
PR_TRUE);
|
2001-03-08 03:41:53 +03:00
|
|
|
}
|
2006-06-03 04:19:11 +04:00
|
|
|
return NS_OK;
|
2001-03-08 03:41:53 +03:00
|
|
|
}
|
2002-10-08 07:12:32 +04:00
|
|
|
|
|
|
|
#ifdef BUILD_BINHEX_DECODER
|
2003-09-08 03:12:15 +04:00
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsBinHexDecoder)
|
2001-06-28 05:09:51 +04:00
|
|
|
#endif
|
2001-03-08 03:41:53 +03:00
|
|
|
|
|
|
|
static NS_IMETHODIMP
|
|
|
|
CreateNewStreamConvServiceFactory(nsISupports* aOuter, REFNSIID aIID, void **aResult)
|
|
|
|
{
|
|
|
|
if (!aResult) {
|
|
|
|
return NS_ERROR_INVALID_POINTER;
|
|
|
|
}
|
|
|
|
if (aOuter) {
|
|
|
|
*aResult = nsnull;
|
|
|
|
return NS_ERROR_NO_AGGREGATION;
|
|
|
|
}
|
|
|
|
nsStreamConverterService* inst = nsnull;
|
|
|
|
nsresult rv = NS_NewStreamConv(&inst);
|
|
|
|
if (NS_FAILED(rv)) {
|
|
|
|
*aResult = nsnull;
|
|
|
|
return rv;
|
|
|
|
}
|
|
|
|
rv = inst->QueryInterface(aIID, aResult);
|
|
|
|
if (NS_FAILED(rv)) {
|
|
|
|
*aResult = nsnull;
|
|
|
|
}
|
|
|
|
NS_RELEASE(inst); /* get rid of extra refcnt */
|
|
|
|
return rv;
|
|
|
|
}
|
2000-05-06 13:15:56 +04:00
|
|
|
|
2003-07-12 02:13:30 +04:00
|
|
|
#ifdef NECKO_PROTOCOL_ftp
|
2000-05-06 13:15:56 +04:00
|
|
|
static NS_IMETHODIMP
|
|
|
|
CreateNewFTPDirListingConv(nsISupports* aOuter, REFNSIID aIID, void **aResult)
|
|
|
|
{
|
|
|
|
if (!aResult) {
|
|
|
|
return NS_ERROR_INVALID_POINTER;
|
|
|
|
}
|
|
|
|
if (aOuter) {
|
|
|
|
*aResult = nsnull;
|
|
|
|
return NS_ERROR_NO_AGGREGATION;
|
|
|
|
}
|
|
|
|
nsFTPDirListingConv* inst = nsnull;
|
|
|
|
nsresult rv = NS_NewFTPDirListingConv(&inst);
|
|
|
|
if (NS_FAILED(rv)) {
|
|
|
|
*aResult = nsnull;
|
|
|
|
return rv;
|
|
|
|
}
|
|
|
|
rv = inst->QueryInterface(aIID, aResult);
|
|
|
|
if (NS_FAILED(rv)) {
|
|
|
|
*aResult = nsnull;
|
|
|
|
}
|
|
|
|
NS_RELEASE(inst); /* get rid of extra refcnt */
|
|
|
|
return rv;
|
|
|
|
}
|
2003-07-12 02:13:30 +04:00
|
|
|
#endif
|
2000-05-06 13:15:56 +04:00
|
|
|
|
|
|
|
static NS_IMETHODIMP
|
|
|
|
CreateNewMultiMixedConvFactory(nsISupports* aOuter, REFNSIID aIID, void **aResult)
|
|
|
|
{
|
|
|
|
if (!aResult) {
|
|
|
|
return NS_ERROR_INVALID_POINTER;
|
|
|
|
}
|
|
|
|
if (aOuter) {
|
|
|
|
*aResult = nsnull;
|
|
|
|
return NS_ERROR_NO_AGGREGATION;
|
|
|
|
}
|
|
|
|
nsMultiMixedConv* inst = nsnull;
|
|
|
|
nsresult rv = NS_NewMultiMixedConv(&inst);
|
|
|
|
if (NS_FAILED(rv)) {
|
|
|
|
*aResult = nsnull;
|
|
|
|
return rv;
|
|
|
|
}
|
|
|
|
rv = inst->QueryInterface(aIID, aResult);
|
|
|
|
if (NS_FAILED(rv)) {
|
|
|
|
*aResult = nsnull;
|
|
|
|
}
|
|
|
|
NS_RELEASE(inst); /* get rid of extra refcnt */
|
|
|
|
return rv;
|
|
|
|
}
|
|
|
|
|
|
|
|
static NS_IMETHODIMP
|
|
|
|
CreateNewTXTToHTMLConvFactory(nsISupports* aOuter, REFNSIID aIID, void **aResult)
|
|
|
|
{
|
|
|
|
if (!aResult) {
|
|
|
|
return NS_ERROR_INVALID_POINTER;
|
|
|
|
}
|
|
|
|
if (aOuter) {
|
|
|
|
*aResult = nsnull;
|
|
|
|
return NS_ERROR_NO_AGGREGATION;
|
|
|
|
}
|
|
|
|
mozTXTToHTMLConv* inst = nsnull;
|
|
|
|
nsresult rv = MOZ_NewTXTToHTMLConv(&inst);
|
|
|
|
if (NS_FAILED(rv)) {
|
|
|
|
*aResult = nsnull;
|
|
|
|
return rv;
|
|
|
|
}
|
|
|
|
rv = inst->QueryInterface(aIID, aResult);
|
|
|
|
if (NS_FAILED(rv)) {
|
|
|
|
*aResult = nsnull;
|
|
|
|
}
|
|
|
|
NS_RELEASE(inst); /* get rid of extra refcnt */
|
|
|
|
return rv;
|
|
|
|
}
|
|
|
|
|
|
|
|
static NS_IMETHODIMP
|
|
|
|
CreateNewHTTPCompressConvFactory (nsISupports* aOuter, REFNSIID aIID, void **aResult)
|
|
|
|
{
|
|
|
|
if (!aResult) {
|
|
|
|
return NS_ERROR_INVALID_POINTER;
|
|
|
|
}
|
|
|
|
if (aOuter) {
|
|
|
|
*aResult = nsnull;
|
|
|
|
return NS_ERROR_NO_AGGREGATION;
|
|
|
|
}
|
|
|
|
nsHTTPCompressConv* inst = nsnull;
|
|
|
|
nsresult rv = NS_NewHTTPCompressConv (&inst);
|
|
|
|
if (NS_FAILED(rv)) {
|
|
|
|
*aResult = nsnull;
|
|
|
|
return rv;
|
|
|
|
}
|
|
|
|
rv = inst->QueryInterface(aIID, aResult);
|
|
|
|
if (NS_FAILED(rv)) {
|
|
|
|
*aResult = nsnull;
|
|
|
|
}
|
|
|
|
NS_RELEASE(inst); /* get rid of extra refcnt */
|
|
|
|
return rv;
|
|
|
|
}
|
|
|
|
|
|
|
|
static NS_IMETHODIMP
|
|
|
|
CreateNewUnknownDecoderFactory(nsISupports *aOuter, REFNSIID aIID, void **aResult)
|
|
|
|
{
|
|
|
|
nsresult rv;
|
|
|
|
|
|
|
|
if (!aResult) {
|
|
|
|
return NS_ERROR_NULL_POINTER;
|
|
|
|
}
|
|
|
|
*aResult = nsnull;
|
|
|
|
|
|
|
|
if (aOuter) {
|
|
|
|
return NS_ERROR_NO_AGGREGATION;
|
|
|
|
}
|
|
|
|
|
|
|
|
nsUnknownDecoder *inst;
|
|
|
|
|
|
|
|
inst = new nsUnknownDecoder();
|
|
|
|
if (!inst) {
|
|
|
|
return NS_ERROR_OUT_OF_MEMORY;
|
|
|
|
}
|
|
|
|
NS_ADDREF(inst);
|
|
|
|
rv = inst->QueryInterface(aIID, aResult);
|
|
|
|
NS_RELEASE(inst);
|
|
|
|
|
|
|
|
return rv;
|
|
|
|
}
|
|
|
|
|
2004-01-08 06:56:02 +03:00
|
|
|
static NS_IMETHODIMP
|
|
|
|
CreateNewBinaryDetectorFactory(nsISupports *aOuter, REFNSIID aIID, void **aResult)
|
|
|
|
{
|
|
|
|
nsresult rv;
|
|
|
|
|
|
|
|
if (!aResult) {
|
|
|
|
return NS_ERROR_NULL_POINTER;
|
|
|
|
}
|
|
|
|
*aResult = nsnull;
|
|
|
|
|
|
|
|
if (aOuter) {
|
|
|
|
return NS_ERROR_NO_AGGREGATION;
|
|
|
|
}
|
|
|
|
|
|
|
|
nsBinaryDetector* inst = new nsBinaryDetector();
|
|
|
|
if (!inst) {
|
|
|
|
return NS_ERROR_OUT_OF_MEMORY;
|
|
|
|
}
|
|
|
|
NS_ADDREF(inst);
|
|
|
|
rv = inst->QueryInterface(aIID, aResult);
|
|
|
|
NS_RELEASE(inst);
|
|
|
|
|
|
|
|
return rv;
|
|
|
|
}
|
|
|
|
|
2000-05-06 13:15:56 +04:00
|
|
|
static NS_IMETHODIMP
|
|
|
|
CreateNewNSTXTToHTMLConvFactory(nsISupports *aOuter, REFNSIID aIID, void **aResult)
|
|
|
|
{
|
|
|
|
nsresult rv;
|
|
|
|
|
|
|
|
if (!aResult) {
|
|
|
|
return NS_ERROR_NULL_POINTER;
|
|
|
|
}
|
|
|
|
*aResult = nsnull;
|
|
|
|
|
|
|
|
if (aOuter) {
|
|
|
|
return NS_ERROR_NO_AGGREGATION;
|
|
|
|
}
|
|
|
|
|
|
|
|
nsTXTToHTMLConv *inst;
|
|
|
|
|
|
|
|
inst = new nsTXTToHTMLConv();
|
|
|
|
if (!inst) return NS_ERROR_OUT_OF_MEMORY;
|
|
|
|
|
|
|
|
NS_ADDREF(inst);
|
|
|
|
rv = inst->Init();
|
|
|
|
if (NS_FAILED(rv)) {
|
|
|
|
delete inst;
|
|
|
|
return rv;
|
|
|
|
}
|
|
|
|
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
|
2008-10-10 19:04:34 +04:00
|
|
|
static nsresult nsNetStartup(nsIModule *neckoModule)
|
2005-04-05 21:40:32 +04:00
|
|
|
{
|
|
|
|
gNetStrings = new nsNetStrings();
|
|
|
|
return gNetStrings ? NS_OK : NS_ERROR_OUT_OF_MEMORY;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Net module shutdown hook
|
2008-10-10 19:04:34 +04:00
|
|
|
static void nsNetShutdown(nsIModule *neckoModule)
|
2000-05-25 12:27:40 +04:00
|
|
|
{
|
|
|
|
// Release the url parser that the stdurl is holding.
|
2001-11-16 05:09:13 +03:00
|
|
|
nsStandardURL::ShutdownGlobalObjects();
|
2002-07-02 22:15:19 +04:00
|
|
|
|
|
|
|
// Release buffer cache
|
|
|
|
NS_IF_RELEASE(nsIOService::gBufferCache);
|
2002-09-13 23:32:45 +04:00
|
|
|
|
|
|
|
// Release global state used by the URL helper module.
|
|
|
|
net_ShutdownURLHelper();
|
2007-10-03 02:26:53 +04:00
|
|
|
#ifdef XP_MACOSX
|
|
|
|
net_ShutdownURLHelperOSX();
|
|
|
|
#endif
|
2008-11-08 02:00:26 +03:00
|
|
|
|
2005-04-05 21:40:32 +04:00
|
|
|
// Release necko strings
|
|
|
|
delete gNetStrings;
|
|
|
|
gNetStrings = nsnull;
|
2008-11-08 02:00:26 +03:00
|
|
|
|
|
|
|
// Release DNS service reference.
|
|
|
|
nsDNSPrefetch::Shutdown();
|
2000-05-25 12:27:40 +04:00
|
|
|
}
|
|
|
|
|
2002-01-31 00:14:20 +03:00
|
|
|
static const nsModuleComponentInfo gNetModuleInfo[] = {
|
2001-04-10 10:01:08 +04:00
|
|
|
{ NS_IOSERVICE_CLASSNAME,
|
1999-11-12 12:07:26 +03:00
|
|
|
NS_IOSERVICE_CID,
|
2001-04-10 10:01:08 +04:00
|
|
|
NS_IOSERVICE_CONTRACTID,
|
2003-01-18 05:15:14 +03:00
|
|
|
nsIOServiceConstructor },
|
2005-07-26 00:27:04 +04:00
|
|
|
{ NS_IOSERVICE_CLASSNAME,
|
|
|
|
NS_IOSERVICE_CID,
|
|
|
|
NS_NETUTIL_CONTRACTID,
|
|
|
|
nsIOServiceConstructor },
|
2003-01-18 05:15:14 +03:00
|
|
|
{ NS_STREAMTRANSPORTSERVICE_CLASSNAME,
|
|
|
|
NS_STREAMTRANSPORTSERVICE_CID,
|
|
|
|
NS_STREAMTRANSPORTSERVICE_CONTRACTID,
|
|
|
|
nsStreamTransportServiceConstructor },
|
|
|
|
{ NS_SOCKETTRANSPORTSERVICE_CLASSNAME,
|
1999-11-12 12:07:26 +03:00
|
|
|
NS_SOCKETTRANSPORTSERVICE_CID,
|
2003-01-18 05:15:14 +03:00
|
|
|
NS_SOCKETTRANSPORTSERVICE_CONTRACTID,
|
|
|
|
nsSocketTransportServiceConstructor },
|
2003-11-15 03:13:59 +03:00
|
|
|
{ NS_SERVERSOCKET_CLASSNAME,
|
|
|
|
NS_SERVERSOCKET_CID,
|
|
|
|
NS_SERVERSOCKET_CONTRACTID,
|
|
|
|
nsServerSocketConstructor },
|
2003-09-12 00:32:33 +04:00
|
|
|
{ NS_SOCKETPROVIDERSERVICE_CLASSNAME,
|
1999-11-12 12:07:26 +03:00
|
|
|
NS_SOCKETPROVIDERSERVICE_CID,
|
2003-09-12 00:32:33 +04:00
|
|
|
NS_SOCKETPROVIDERSERVICE_CONTRACTID,
|
1999-11-12 12:07:26 +03:00
|
|
|
nsSocketProviderService::Create },
|
2003-09-12 00:32:33 +04:00
|
|
|
{ NS_DNSSERVICE_CLASSNAME,
|
1999-11-12 12:07:26 +03:00
|
|
|
NS_DNSSERVICE_CID,
|
2003-09-12 00:32:33 +04:00
|
|
|
NS_DNSSERVICE_CONTRACTID,
|
|
|
|
nsDNSServiceConstructor },
|
2002-09-27 03:30:18 +04:00
|
|
|
{ NS_IDNSERVICE_CLASSNAME,
|
|
|
|
NS_IDNSERVICE_CID,
|
|
|
|
NS_IDNSERVICE_CONTRACTID,
|
|
|
|
nsIDNServiceConstructor },
|
2006-06-09 22:23:10 +04:00
|
|
|
{ NS_EFFECTIVETLDSERVICE_CLASSNAME,
|
|
|
|
NS_EFFECTIVETLDSERVICE_CID,
|
|
|
|
NS_EFFECTIVETLDSERVICE_CONTRACTID,
|
|
|
|
nsEffectiveTLDServiceConstructor },
|
2001-04-10 10:01:08 +04:00
|
|
|
{ NS_SIMPLEURI_CLASSNAME,
|
1999-11-12 12:07:26 +03:00
|
|
|
NS_SIMPLEURI_CID,
|
2001-04-10 10:01:08 +04:00
|
|
|
NS_SIMPLEURI_CONTRACTID,
|
2005-09-28 17:13:27 +04:00
|
|
|
nsSimpleURIConstructor },
|
2006-06-20 01:02:12 +04:00
|
|
|
{ "Simple Nested URI",
|
|
|
|
NS_SIMPLENESTEDURI_CID,
|
|
|
|
nsnull,
|
|
|
|
nsSimpleNestedURIConstructor },
|
2003-01-18 05:15:14 +03:00
|
|
|
{ NS_ASYNCSTREAMCOPIER_CLASSNAME,
|
|
|
|
NS_ASYNCSTREAMCOPIER_CID,
|
|
|
|
NS_ASYNCSTREAMCOPIER_CONTRACTID,
|
|
|
|
nsAsyncStreamCopierConstructor },
|
|
|
|
{ NS_INPUTSTREAMPUMP_CLASSNAME,
|
|
|
|
NS_INPUTSTREAMPUMP_CID,
|
|
|
|
NS_INPUTSTREAMPUMP_CONTRACTID,
|
|
|
|
nsInputStreamPumpConstructor },
|
|
|
|
{ NS_INPUTSTREAMCHANNEL_CLASSNAME,
|
|
|
|
NS_INPUTSTREAMCHANNEL_CID,
|
|
|
|
NS_INPUTSTREAMCHANNEL_CONTRACTID,
|
|
|
|
nsInputStreamChannelConstructor },
|
2002-05-03 11:49:43 +04:00
|
|
|
{ NS_STREAMLOADER_CLASSNAME,
|
2000-02-03 02:04:47 +03:00
|
|
|
NS_STREAMLOADER_CID,
|
2002-05-03 11:49:43 +04:00
|
|
|
NS_STREAMLOADER_CONTRACTID,
|
2000-02-03 02:04:47 +03:00
|
|
|
nsStreamLoader::Create },
|
2002-08-28 03:47:25 +04:00
|
|
|
{ NS_UNICHARSTREAMLOADER_CLASSNAME,
|
|
|
|
NS_UNICHARSTREAMLOADER_CID,
|
|
|
|
NS_UNICHARSTREAMLOADER_CONTRACTID,
|
|
|
|
nsUnicharStreamLoader::Create },
|
2001-04-17 14:47:22 +04:00
|
|
|
{ NS_DOWNLOADER_CLASSNAME,
|
2000-09-15 23:27:05 +04:00
|
|
|
NS_DOWNLOADER_CID,
|
2001-04-17 14:47:22 +04:00
|
|
|
NS_DOWNLOADER_CONTRACTID,
|
2003-06-24 02:58:28 +04:00
|
|
|
nsDownloaderConstructor },
|
2003-10-08 08:27:13 +04:00
|
|
|
{ NS_SYNCSTREAMLISTENER_CLASSNAME,
|
|
|
|
NS_SYNCSTREAMLISTENER_CID,
|
|
|
|
NS_SYNCSTREAMLISTENER_CONTRACTID,
|
|
|
|
nsSyncStreamListenerConstructor },
|
2001-04-10 10:01:08 +04:00
|
|
|
{ NS_REQUESTOBSERVERPROXY_CLASSNAME,
|
|
|
|
NS_REQUESTOBSERVERPROXY_CID,
|
|
|
|
NS_REQUESTOBSERVERPROXY_CONTRACTID,
|
|
|
|
nsRequestObserverProxyConstructor },
|
2001-01-24 01:10:34 +03:00
|
|
|
{ NS_SIMPLESTREAMLISTENER_CLASSNAME,
|
|
|
|
NS_SIMPLESTREAMLISTENER_CID,
|
|
|
|
NS_SIMPLESTREAMLISTENER_CONTRACTID,
|
|
|
|
nsSimpleStreamListenerConstructor },
|
2001-03-08 03:58:06 +03:00
|
|
|
{ NS_STREAMLISTENERTEE_CLASSNAME,
|
|
|
|
NS_STREAMLISTENERTEE_CID,
|
|
|
|
NS_STREAMLISTENERTEE_CONTRACTID,
|
|
|
|
nsStreamListenerTeeConstructor },
|
2001-04-10 10:01:08 +04:00
|
|
|
{ NS_LOADGROUP_CLASSNAME,
|
1999-11-12 12:07:26 +03:00
|
|
|
NS_LOADGROUP_CID,
|
2001-04-10 10:01:08 +04:00
|
|
|
NS_LOADGROUP_CONTRACTID,
|
2005-09-28 17:13:27 +04:00
|
|
|
nsLoadGroupConstructor },
|
2000-03-29 07:58:50 +04:00
|
|
|
{ NS_LOCALFILEINPUTSTREAM_CLASSNAME,
|
|
|
|
NS_LOCALFILEINPUTSTREAM_CID,
|
2000-09-14 03:57:52 +04:00
|
|
|
NS_LOCALFILEINPUTSTREAM_CONTRACTID,
|
2000-01-25 00:28:28 +03:00
|
|
|
nsFileInputStream::Create },
|
2000-03-29 07:58:50 +04:00
|
|
|
{ NS_LOCALFILEOUTPUTSTREAM_CLASSNAME,
|
|
|
|
NS_LOCALFILEOUTPUTSTREAM_CID,
|
2000-09-14 03:57:52 +04:00
|
|
|
NS_LOCALFILEOUTPUTSTREAM_CONTRACTID,
|
2000-02-03 06:44:22 +03:00
|
|
|
nsFileOutputStream::Create },
|
2004-07-07 00:35:40 +04:00
|
|
|
{ NS_SAFELOCALFILEOUTPUTSTREAM_CLASSNAME,
|
|
|
|
NS_SAFELOCALFILEOUTPUTSTREAM_CID,
|
|
|
|
NS_SAFELOCALFILEOUTPUTSTREAM_CONTRACTID,
|
|
|
|
nsSafeFileOutputStreamConstructor
|
|
|
|
},
|
2001-06-22 02:02:47 +04:00
|
|
|
|
2001-10-03 04:40:10 +04:00
|
|
|
{ "URIChecker",
|
|
|
|
NS_URICHECKER_CID,
|
|
|
|
NS_URICHECKER_CONTRACT_ID,
|
|
|
|
nsURICheckerConstructor
|
|
|
|
},
|
|
|
|
|
2005-06-01 22:05:36 +04:00
|
|
|
{ NS_INCREMENTALDOWNLOAD_CLASSNAME,
|
|
|
|
NS_INCREMENTALDOWNLOAD_CID,
|
|
|
|
NS_INCREMENTALDOWNLOAD_CONTRACTID,
|
|
|
|
net_NewIncrementalDownload
|
|
|
|
},
|
|
|
|
|
2001-12-24 02:23:41 +03:00
|
|
|
// The register functions for the built-in
|
2001-06-22 02:02:47 +04:00
|
|
|
// parsers just need to be called once.
|
2001-11-16 05:09:13 +03:00
|
|
|
{ NS_STDURLPARSER_CLASSNAME,
|
|
|
|
NS_STDURLPARSER_CID,
|
|
|
|
NS_STDURLPARSER_CONTRACTID,
|
2002-09-13 23:32:45 +04:00
|
|
|
nsStdURLParserConstructor},
|
2001-11-16 05:09:13 +03:00
|
|
|
{ NS_NOAUTHURLPARSER_CLASSNAME,
|
|
|
|
NS_NOAUTHURLPARSER_CID,
|
|
|
|
NS_NOAUTHURLPARSER_CONTRACTID,
|
|
|
|
nsNoAuthURLParserConstructor },
|
|
|
|
{ NS_AUTHURLPARSER_CLASSNAME,
|
|
|
|
NS_AUTHURLPARSER_CID,
|
|
|
|
NS_AUTHURLPARSER_CONTRACTID,
|
|
|
|
nsAuthURLParserConstructor },
|
|
|
|
|
|
|
|
{ NS_STANDARDURL_CLASSNAME,
|
|
|
|
NS_STANDARDURL_CID,
|
|
|
|
NS_STANDARDURL_CONTRACTID,
|
|
|
|
nsStandardURLConstructor },
|
2001-06-22 02:02:47 +04:00
|
|
|
|
2000-02-04 10:31:43 +03:00
|
|
|
{ NS_BUFFEREDINPUTSTREAM_CLASSNAME,
|
|
|
|
NS_BUFFEREDINPUTSTREAM_CID,
|
2000-09-14 03:57:52 +04:00
|
|
|
NS_BUFFEREDINPUTSTREAM_CONTRACTID,
|
2000-02-04 10:31:43 +03:00
|
|
|
nsBufferedInputStream::Create },
|
|
|
|
{ NS_BUFFEREDOUTPUTSTREAM_CLASSNAME,
|
|
|
|
NS_BUFFEREDOUTPUTSTREAM_CID,
|
2000-09-14 03:57:52 +04:00
|
|
|
NS_BUFFEREDOUTPUTSTREAM_CONTRACTID,
|
2000-02-16 00:58:59 +03:00
|
|
|
nsBufferedOutputStream::Create },
|
2002-02-16 04:19:24 +03:00
|
|
|
{ NS_MIMEINPUTSTREAM_CLASSNAME,
|
|
|
|
NS_MIMEINPUTSTREAM_CID,
|
|
|
|
NS_MIMEINPUTSTREAM_CONTRACTID,
|
|
|
|
nsMIMEInputStreamConstructor },
|
2003-04-11 22:24:55 +04:00
|
|
|
{ NS_PROTOCOLPROXYSERVICE_CLASSNAME,
|
2000-02-16 00:58:59 +03:00
|
|
|
NS_PROTOCOLPROXYSERVICE_CID,
|
2003-04-11 22:24:55 +04:00
|
|
|
NS_PROTOCOLPROXYSERVICE_CONTRACTID,
|
2006-03-30 21:31:15 +04:00
|
|
|
nsProtocolProxyServiceConstructor,
|
|
|
|
nsnull, nsnull, nsnull,
|
|
|
|
NS_CI_INTERFACE_GETTER_NAME(nsProtocolProxyService),
|
|
|
|
nsnull,
|
|
|
|
&NS_CLASSINFO_NAME(nsProtocolProxyService),
|
|
|
|
nsIClassInfo::SINGLETON },
|
2000-05-06 13:15:56 +04:00
|
|
|
|
|
|
|
// from netwerk/streamconv:
|
2001-03-08 03:41:53 +03:00
|
|
|
|
2001-12-24 02:23:41 +03:00
|
|
|
// this converter is "always" built.
|
2001-03-08 03:41:53 +03:00
|
|
|
// HACK-ALERT, register *all* converters
|
2001-12-24 02:23:41 +03:00
|
|
|
// in this converter's component manager
|
2001-03-08 03:41:53 +03:00
|
|
|
// registration. just piggy backing here until
|
|
|
|
// you can add registration functions to
|
|
|
|
// the generic module macro.
|
2000-05-06 13:15:56 +04:00
|
|
|
{ "Stream Converter Service",
|
|
|
|
NS_STREAMCONVERTERSERVICE_CID,
|
2005-11-12 21:17:19 +03:00
|
|
|
NS_STREAMCONVERTERSERVICE_CONTRACTID,
|
2001-03-08 03:41:53 +03:00
|
|
|
CreateNewStreamConvServiceFactory,
|
|
|
|
RegisterStreamConverters, // registers *all* converters
|
|
|
|
UnregisterStreamConverters // unregisters *all* converters
|
|
|
|
},
|
2001-06-26 02:11:43 +04:00
|
|
|
|
2002-10-08 07:12:32 +04:00
|
|
|
#ifdef BUILD_APPLEFILE_DECODER
|
2001-06-26 02:11:43 +04:00
|
|
|
{ NS_APPLEFILEDECODER_CLASSNAME,
|
|
|
|
NS_APPLEFILEDECODER_CID,
|
|
|
|
NS_IAPPLEFILEDECODER_CONTRACTID,
|
|
|
|
nsAppleFileDecoderConstructor
|
|
|
|
},
|
|
|
|
#endif
|
2000-05-06 13:15:56 +04:00
|
|
|
|
2003-07-12 02:13:30 +04:00
|
|
|
#ifdef NECKO_PROTOCOL_ftp
|
2000-05-06 13:15:56 +04:00
|
|
|
// from netwerk/streamconv/converters:
|
|
|
|
{ "FTPDirListingConverter",
|
2001-03-08 03:41:53 +03:00
|
|
|
NS_FTPDIRLISTINGCONVERTER_CID,
|
2002-08-29 07:13:18 +04:00
|
|
|
NS_ISTREAMCONVERTER_KEY FTP_TO_INDEX,
|
2001-09-20 18:16:14 +04:00
|
|
|
CreateNewFTPDirListingConv
|
|
|
|
},
|
2003-07-12 02:13:30 +04:00
|
|
|
#endif
|
2001-09-20 18:16:14 +04:00
|
|
|
|
2003-07-12 02:13:30 +04:00
|
|
|
#ifdef NECKO_PROTOCOL_gopher
|
2001-03-14 05:51:01 +03:00
|
|
|
{ "GopherDirListingConverter",
|
|
|
|
NS_GOPHERDIRLISTINGCONVERTER_CID,
|
|
|
|
NS_ISTREAMCONVERTER_KEY GOPHER_TO_INDEX,
|
2005-11-12 21:17:19 +03:00
|
|
|
nsGopherDirListingConvConstructor
|
2003-07-12 02:13:30 +04:00
|
|
|
},
|
|
|
|
#endif
|
2001-03-14 05:51:01 +03:00
|
|
|
|
2001-03-06 05:14:42 +03:00
|
|
|
{ "Indexed to HTML Converter",
|
|
|
|
NS_NSINDEXEDTOHTMLCONVERTER_CID,
|
2001-03-08 03:41:53 +03:00
|
|
|
NS_ISTREAMCONVERTER_KEY INDEX_TO_HTML,
|
2001-03-06 05:14:42 +03:00
|
|
|
nsIndexedToHTML::Create
|
|
|
|
},
|
2001-10-03 04:43:30 +04:00
|
|
|
|
|
|
|
{ "Directory Index Parser",
|
|
|
|
NS_DIRINDEXPARSER_CID,
|
|
|
|
NS_DIRINDEXPARSER_CONTRACTID,
|
|
|
|
nsDirIndexParserConstructor
|
|
|
|
},
|
|
|
|
|
2000-05-06 13:15:56 +04:00
|
|
|
{ "MultiMixedConverter",
|
|
|
|
NS_MULTIMIXEDCONVERTER_CID,
|
2001-03-08 03:41:53 +03:00
|
|
|
NS_ISTREAMCONVERTER_KEY MULTI_MIXED_X,
|
2000-05-06 13:15:56 +04:00
|
|
|
CreateNewMultiMixedConvFactory
|
|
|
|
},
|
|
|
|
|
2001-05-19 02:20:11 +04:00
|
|
|
{ "MultiMixedByteRange",
|
|
|
|
NS_MULTIMIXEDCONVERTER_CID,
|
|
|
|
NS_ISTREAMCONVERTER_KEY MULTI_BYTERANGES,
|
|
|
|
CreateNewMultiMixedConvFactory
|
|
|
|
},
|
|
|
|
|
2000-05-06 13:15:56 +04:00
|
|
|
{ "MultiMixedConverter2",
|
|
|
|
NS_MULTIMIXEDCONVERTER_CID,
|
2001-03-08 03:41:53 +03:00
|
|
|
NS_ISTREAMCONVERTER_KEY MULTI_MIXED,
|
2000-05-06 13:15:56 +04:00
|
|
|
CreateNewMultiMixedConvFactory
|
|
|
|
},
|
2002-09-04 02:10:08 +04:00
|
|
|
|
2000-05-06 13:15:56 +04:00
|
|
|
{ "Unknown Content-Type Decoder",
|
|
|
|
NS_UNKNOWNDECODER_CID,
|
2001-03-08 03:41:53 +03:00
|
|
|
NS_ISTREAMCONVERTER_KEY UNKNOWN_CONTENT,
|
2000-05-06 13:15:56 +04:00
|
|
|
CreateNewUnknownDecoderFactory
|
|
|
|
},
|
|
|
|
|
2006-02-17 19:54:27 +03:00
|
|
|
{ "Unknown Content-Type Decoder",
|
|
|
|
NS_UNKNOWNDECODER_CID,
|
|
|
|
NS_GENERIC_CONTENT_SNIFFER,
|
|
|
|
CreateNewUnknownDecoderFactory
|
|
|
|
},
|
|
|
|
|
2004-01-08 06:56:02 +03:00
|
|
|
{ "Binary Detector",
|
|
|
|
NS_BINARYDETECTOR_CID,
|
2007-08-21 07:26:12 +04:00
|
|
|
NS_BINARYDETECTOR_CONTRACTID,
|
|
|
|
CreateNewBinaryDetectorFactory,
|
|
|
|
nsBinaryDetector::Register
|
2004-01-08 06:56:02 +03:00
|
|
|
},
|
|
|
|
|
2000-05-06 13:15:56 +04:00
|
|
|
{ "HttpCompressConverter",
|
|
|
|
NS_HTTPCOMPRESSCONVERTER_CID,
|
2001-03-08 03:41:53 +03:00
|
|
|
NS_ISTREAMCONVERTER_KEY GZIP_TO_UNCOMPRESSED,
|
2000-05-06 13:15:56 +04:00
|
|
|
CreateNewHTTPCompressConvFactory
|
|
|
|
},
|
|
|
|
|
|
|
|
{ "HttpCompressConverter",
|
|
|
|
NS_HTTPCOMPRESSCONVERTER_CID,
|
2001-03-08 03:41:53 +03:00
|
|
|
NS_ISTREAMCONVERTER_KEY XGZIP_TO_UNCOMPRESSED,
|
2000-05-06 13:15:56 +04:00
|
|
|
CreateNewHTTPCompressConvFactory
|
|
|
|
},
|
|
|
|
{ "HttpCompressConverter",
|
|
|
|
NS_HTTPCOMPRESSCONVERTER_CID,
|
2001-03-08 03:41:53 +03:00
|
|
|
NS_ISTREAMCONVERTER_KEY COMPRESS_TO_UNCOMPRESSED,
|
2000-05-06 13:15:56 +04:00
|
|
|
CreateNewHTTPCompressConvFactory
|
|
|
|
},
|
|
|
|
{ "HttpCompressConverter",
|
|
|
|
NS_HTTPCOMPRESSCONVERTER_CID,
|
2001-03-08 03:41:53 +03:00
|
|
|
NS_ISTREAMCONVERTER_KEY XCOMPRESS_TO_UNCOMPRESSED,
|
2000-05-06 13:15:56 +04:00
|
|
|
CreateNewHTTPCompressConvFactory
|
|
|
|
},
|
|
|
|
{ "HttpCompressConverter",
|
|
|
|
NS_HTTPCOMPRESSCONVERTER_CID,
|
2001-03-08 03:41:53 +03:00
|
|
|
NS_ISTREAMCONVERTER_KEY DEFLATE_TO_UNCOMPRESSED,
|
2000-05-06 13:15:56 +04:00
|
|
|
CreateNewHTTPCompressConvFactory
|
|
|
|
},
|
|
|
|
{ "NSTXTToHTMLConverter",
|
|
|
|
NS_NSTXTTOHTMLCONVERTER_CID,
|
2001-03-08 03:41:53 +03:00
|
|
|
NS_ISTREAMCONVERTER_KEY PLAIN_TO_HTML,
|
2000-05-06 13:15:56 +04:00
|
|
|
CreateNewNSTXTToHTMLConvFactory
|
2001-06-28 05:09:51 +04:00
|
|
|
},
|
2002-10-08 07:12:32 +04:00
|
|
|
#ifdef BUILD_BINHEX_DECODER
|
2001-06-28 05:09:51 +04:00
|
|
|
{ "nsBinHexConverter", NS_BINHEXDECODER_CID,
|
|
|
|
NS_ISTREAMCONVERTER_KEY BINHEX_TO_WILD,
|
|
|
|
nsBinHexDecoderConstructor
|
|
|
|
},
|
|
|
|
#endif
|
2003-07-09 06:28:07 +04:00
|
|
|
// This is not a real stream converter, it's just
|
|
|
|
// registering its cid factory here.
|
|
|
|
{ "HACK-TXTToHTMLConverter",
|
|
|
|
MOZITXTTOHTMLCONV_CID,
|
|
|
|
MOZ_TXTTOHTMLCONV_CONTRACTID,
|
|
|
|
CreateNewTXTToHTMLConvFactory
|
2000-05-06 13:15:56 +04:00
|
|
|
},
|
2001-10-03 04:43:30 +04:00
|
|
|
|
|
|
|
{ "Directory Index",
|
|
|
|
NS_DIRINDEX_CID,
|
|
|
|
"@mozilla.org/dirIndex;1",
|
|
|
|
nsDirIndexConstructor
|
|
|
|
},
|
|
|
|
|
2000-05-06 13:15:56 +04:00
|
|
|
// from netwerk/mime:
|
2003-06-13 01:57:49 +04:00
|
|
|
{ "mime header param",
|
|
|
|
NS_MIMEHEADERPARAM_CID,
|
|
|
|
NS_MIMEHEADERPARAM_CONTRACTID,
|
|
|
|
nsMIMEHeaderParamImplConstructor
|
|
|
|
},
|
|
|
|
|
2003-04-23 07:47:43 +04:00
|
|
|
#ifdef NECKO_PROTOCOL_file
|
2000-05-06 13:15:56 +04:00
|
|
|
// from netwerk/protocol/file:
|
2003-01-18 05:15:14 +03:00
|
|
|
{ NS_FILEPROTOCOLHANDLER_CLASSNAME,
|
2000-05-06 13:15:56 +04:00
|
|
|
NS_FILEPROTOCOLHANDLER_CID,
|
2000-09-14 03:57:52 +04:00
|
|
|
NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "file",
|
2003-01-18 05:15:14 +03:00
|
|
|
nsFileProtocolHandlerConstructor
|
2000-05-06 13:15:56 +04:00
|
|
|
},
|
2003-04-23 07:47:43 +04:00
|
|
|
#endif
|
2001-05-12 01:04:09 +04:00
|
|
|
|
2003-04-23 07:47:43 +04:00
|
|
|
#ifdef NECKO_PROTOCOL_http
|
2001-05-12 01:04:09 +04:00
|
|
|
{ "HTTP Handler",
|
|
|
|
NS_HTTPPROTOCOLHANDLER_CID,
|
|
|
|
NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "http",
|
2002-08-14 00:33:45 +04:00
|
|
|
nsHttpHandlerConstructor },
|
2001-05-12 01:04:09 +04:00
|
|
|
|
|
|
|
{ "HTTPS Handler",
|
2002-08-14 00:33:45 +04:00
|
|
|
NS_HTTPSPROTOCOLHANDLER_CID,
|
2001-05-12 01:04:09 +04:00
|
|
|
NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "https",
|
2002-08-14 00:33:45 +04:00
|
|
|
nsHttpsHandlerConstructor },
|
2001-05-12 01:04:09 +04:00
|
|
|
|
|
|
|
{ "HTTP Basic Auth Encoder",
|
|
|
|
NS_HTTPBASICAUTH_CID,
|
|
|
|
NS_HTTP_AUTHENTICATOR_CONTRACTID_PREFIX "basic",
|
|
|
|
nsHttpBasicAuthConstructor },
|
2000-05-06 13:15:56 +04:00
|
|
|
|
2001-12-05 04:09:38 +03:00
|
|
|
{ "HTTP Digest Auth Encoder",
|
|
|
|
NS_HTTPDIGESTAUTH_CID,
|
|
|
|
NS_HTTP_AUTHENTICATOR_CONTRACTID_PREFIX "digest",
|
|
|
|
nsHttpDigestAuthConstructor },
|
|
|
|
|
2003-03-27 22:31:53 +03:00
|
|
|
{ "HTTP NTLM Auth Encoder",
|
|
|
|
NS_HTTPNTLMAUTH_CID,
|
|
|
|
NS_HTTP_AUTHENTICATOR_CONTRACTID_PREFIX "ntlm",
|
|
|
|
nsHttpNTLMAuthConstructor },
|
|
|
|
|
2003-03-24 06:59:47 +03:00
|
|
|
{ NS_HTTPAUTHMANAGER_CLASSNAME,
|
|
|
|
NS_HTTPAUTHMANAGER_CID,
|
|
|
|
NS_HTTPAUTHMANAGER_CONTRACTID,
|
|
|
|
nsHttpAuthManagerConstructor },
|
2009-09-02 00:55:50 +04:00
|
|
|
|
|
|
|
{ NS_HTTPACTIVITYDISTRIBUTOR_CLASSNAME,
|
|
|
|
NS_HTTPACTIVITYDISTRIBUTOR_CID,
|
|
|
|
NS_HTTPACTIVITYDISTRIBUTOR_CONTRACTID,
|
|
|
|
nsHttpActivityDistributorConstructor },
|
2003-04-23 07:47:43 +04:00
|
|
|
#endif // !NECKO_PROTOCOL_http
|
2003-03-24 06:59:47 +03:00
|
|
|
|
2003-04-23 07:47:43 +04:00
|
|
|
#ifdef NECKO_PROTOCOL_ftp
|
2003-01-08 00:56:32 +03:00
|
|
|
// from netwerk/protocol/ftp:
|
2003-04-09 02:18:10 +04:00
|
|
|
{ NS_FTPPROTOCOLHANDLER_CLASSNAME,
|
2003-01-08 00:56:32 +03:00
|
|
|
NS_FTPPROTOCOLHANDLER_CID,
|
|
|
|
NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "ftp",
|
|
|
|
nsFtpProtocolHandlerConstructor
|
2000-05-06 13:15:56 +04:00
|
|
|
},
|
2003-04-23 07:47:43 +04:00
|
|
|
#endif
|
2000-05-06 13:15:56 +04:00
|
|
|
|
2003-04-23 07:47:43 +04:00
|
|
|
#ifdef NECKO_PROTOCOL_res
|
2000-05-06 13:15:56 +04:00
|
|
|
// from netwerk/protocol/res:
|
2003-01-18 05:15:14 +03:00
|
|
|
{ NS_RESPROTOCOLHANDLER_CLASSNAME,
|
2000-05-06 13:15:56 +04:00
|
|
|
NS_RESPROTOCOLHANDLER_CID,
|
2000-09-14 03:57:52 +04:00
|
|
|
NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "resource",
|
2001-09-20 05:32:16 +04:00
|
|
|
nsResProtocolHandlerConstructor
|
2000-05-06 13:15:56 +04:00
|
|
|
},
|
2004-12-02 09:59:34 +03:00
|
|
|
{ NS_RESURL_CLASSNAME, // needed only for fastload
|
|
|
|
NS_RESURL_CID,
|
|
|
|
nsnull,
|
|
|
|
nsResURLConstructor
|
|
|
|
},
|
2003-04-23 07:47:43 +04:00
|
|
|
#endif
|
2000-05-06 13:15:56 +04:00
|
|
|
|
2003-04-23 07:47:43 +04:00
|
|
|
// from netwerk/protocol/about (about:blank is mandatory):
|
2006-06-20 01:02:12 +04:00
|
|
|
{ NS_ABOUTPROTOCOLHANDLER_CLASSNAME,
|
2000-05-06 13:15:56 +04:00
|
|
|
NS_ABOUTPROTOCOLHANDLER_CID,
|
2000-09-14 03:57:52 +04:00
|
|
|
NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "about",
|
2006-06-20 01:02:12 +04:00
|
|
|
nsAboutProtocolHandlerConstructor
|
|
|
|
},
|
|
|
|
{ NS_SAFEABOUTPROTOCOLHANDLER_CLASSNAME,
|
|
|
|
NS_SAFEABOUTPROTOCOLHANDLER_CID,
|
2006-06-22 06:21:06 +04:00
|
|
|
NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "moz-safe-about",
|
2006-06-20 01:02:12 +04:00
|
|
|
nsSafeAboutProtocolHandlerConstructor
|
2000-05-06 13:15:56 +04:00
|
|
|
},
|
|
|
|
{ "about:blank",
|
|
|
|
NS_ABOUT_BLANK_MODULE_CID,
|
2000-09-14 03:57:52 +04:00
|
|
|
NS_ABOUT_MODULE_CONTRACTID_PREFIX "blank",
|
2000-05-06 13:15:56 +04:00
|
|
|
nsAboutBlank::Create
|
|
|
|
},
|
2009-03-17 03:59:33 +03:00
|
|
|
{ "Nested about: URI",
|
|
|
|
NS_NESTEDABOUTURI_CID,
|
|
|
|
nsnull,
|
|
|
|
nsNestedAboutURIConstructor },
|
2003-04-23 07:47:43 +04:00
|
|
|
#ifdef NECKO_PROTOCOL_about
|
2007-10-13 08:03:49 +04:00
|
|
|
#ifdef NS_BUILD_REFCNT_LOGGING
|
2000-05-06 13:15:56 +04:00
|
|
|
{ "about:bloat",
|
|
|
|
NS_ABOUT_BLOAT_MODULE_CID,
|
2000-09-14 03:57:52 +04:00
|
|
|
NS_ABOUT_MODULE_CONTRACTID_PREFIX "bloat",
|
2000-05-06 13:15:56 +04:00
|
|
|
nsAboutBloat::Create
|
|
|
|
},
|
2007-10-13 08:03:49 +04:00
|
|
|
#endif
|
2000-09-20 02:33:55 +04:00
|
|
|
{ "about:cache",
|
|
|
|
NS_ABOUT_CACHE_MODULE_CID,
|
|
|
|
NS_ABOUT_MODULE_CONTRACTID_PREFIX "cache",
|
|
|
|
nsAboutCache::Create
|
|
|
|
},
|
2001-03-14 01:44:34 +03:00
|
|
|
{ "about:cache-entry",
|
|
|
|
NS_ABOUT_CACHE_ENTRY_MODULE_CID,
|
|
|
|
NS_ABOUT_MODULE_CONTRACTID_PREFIX "cache-entry",
|
|
|
|
nsAboutCacheEntryConstructor
|
|
|
|
},
|
2003-04-23 07:47:43 +04:00
|
|
|
#endif
|
2003-01-18 05:15:14 +03:00
|
|
|
|
2003-09-12 00:32:33 +04:00
|
|
|
{ "nsSOCKSSocketProvider",
|
2000-07-01 14:25:25 +04:00
|
|
|
NS_SOCKSSOCKETPROVIDER_CID,
|
2003-09-12 00:32:33 +04:00
|
|
|
NS_NETWORK_SOCKET_CONTRACTID_PREFIX "socks",
|
|
|
|
nsSOCKSSocketProvider::CreateV5
|
2001-07-25 04:28:28 +04:00
|
|
|
},
|
|
|
|
|
2003-09-12 00:32:33 +04:00
|
|
|
{ "nsSOCKS4SocketProvider",
|
2001-07-25 04:28:28 +04:00
|
|
|
NS_SOCKS4SOCKETPROVIDER_CID,
|
2003-09-12 00:32:33 +04:00
|
|
|
NS_NETWORK_SOCKET_CONTRACTID_PREFIX "socks4",
|
|
|
|
nsSOCKSSocketProvider::CreateV4
|
2002-09-19 22:29:56 +04:00
|
|
|
},
|
2000-05-06 13:15:56 +04:00
|
|
|
|
2007-05-31 10:07:26 +04:00
|
|
|
{ "nsUDPSocketProvider",
|
|
|
|
NS_UDPSOCKETPROVIDER_CID,
|
|
|
|
NS_NETWORK_SOCKET_CONTRACTID_PREFIX "udp",
|
|
|
|
nsUDPSocketProviderConstructor
|
|
|
|
},
|
|
|
|
|
2002-09-19 22:29:56 +04:00
|
|
|
{ NS_CACHESERVICE_CLASSNAME,
|
|
|
|
NS_CACHESERVICE_CID,
|
|
|
|
NS_CACHESERVICE_CONTRACTID,
|
|
|
|
nsCacheService::Create
|
|
|
|
},
|
2001-07-25 04:28:28 +04:00
|
|
|
|
2008-08-27 03:09:02 +04:00
|
|
|
#ifdef NECKO_OFFLINE_CACHE
|
|
|
|
{ NS_APPLICATIONCACHESERVICE_CLASSNAME,
|
|
|
|
NS_APPLICATIONCACHESERVICE_CID,
|
|
|
|
NS_APPLICATIONCACHESERVICE_CONTRACTID,
|
|
|
|
nsOfflineCacheDeviceConstructor
|
|
|
|
},
|
2008-09-30 22:34:23 +04:00
|
|
|
{ NS_APPLICATIONCACHENAMESPACE_CLASSNAME,
|
|
|
|
NS_APPLICATIONCACHENAMESPACE_CID,
|
|
|
|
NS_APPLICATIONCACHENAMESPACE_CONTRACTID,
|
|
|
|
nsApplicationCacheNamespaceConstructor
|
|
|
|
},
|
2008-08-27 03:09:02 +04:00
|
|
|
#endif
|
|
|
|
|
2004-07-19 08:57:02 +04:00
|
|
|
#ifdef NECKO_COOKIES
|
2003-10-30 05:59:31 +03:00
|
|
|
{ NS_COOKIEMANAGER_CLASSNAME,
|
2003-10-11 03:08:01 +04:00
|
|
|
NS_COOKIEMANAGER_CID,
|
|
|
|
NS_COOKIEMANAGER_CONTRACTID,
|
|
|
|
nsCookieServiceConstructor
|
|
|
|
},
|
|
|
|
|
2003-10-30 05:59:31 +03:00
|
|
|
{ NS_COOKIESERVICE_CLASSNAME,
|
2003-10-11 03:08:01 +04:00
|
|
|
NS_COOKIESERVICE_CID,
|
|
|
|
NS_COOKIESERVICE_CONTRACTID,
|
|
|
|
nsCookieServiceConstructor
|
|
|
|
},
|
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
|
|
|
|
{
|
|
|
|
NS_WIFI_MONITOR_CLASSNAME,
|
|
|
|
NS_WIFI_MONITOR_COMPONENT_CID,
|
|
|
|
NS_WIFI_MONITOR_CONTRACTID,
|
|
|
|
nsWifiMonitorConstructor
|
|
|
|
},
|
|
|
|
#endif
|
|
|
|
|
2005-11-12 21:17:19 +03:00
|
|
|
#ifdef NECKO_PROTOCOL_gopher
|
|
|
|
//gopher:
|
|
|
|
{ "The Gopher Protocol Handler",
|
|
|
|
NS_GOPHERHANDLER_CID,
|
|
|
|
NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "gopher",
|
|
|
|
nsGopherHandlerConstructor
|
|
|
|
},
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef NECKO_PROTOCOL_data
|
|
|
|
// from netwerk/protocol/data:
|
|
|
|
{ "Data Protocol Handler",
|
|
|
|
NS_DATAPROTOCOLHANDLER_CID,
|
|
|
|
NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "data",
|
|
|
|
nsDataHandler::Create},
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef NECKO_PROTOCOL_viewsource
|
|
|
|
// from netwerk/protocol/viewsource:
|
|
|
|
{ "The ViewSource Protocol Handler",
|
|
|
|
NS_VIEWSOURCEHANDLER_CID,
|
|
|
|
NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "view-source",
|
|
|
|
nsViewSourceHandlerConstructor
|
2006-05-02 22:08:55 +04:00
|
|
|
},
|
|
|
|
#endif
|
|
|
|
|
2009-03-18 09:46:19 +03:00
|
|
|
#if defined(XP_WIN)
|
2006-05-02 22:08:55 +04:00
|
|
|
{ NS_NETWORK_LINK_SERVICE_CLASSNAME,
|
|
|
|
NS_NETWORK_LINK_SERVICE_CID,
|
|
|
|
NS_NETWORK_LINK_SERVICE_CONTRACTID,
|
|
|
|
nsNotifyAddrListenerConstructor
|
|
|
|
},
|
2008-10-01 02:27:06 +04:00
|
|
|
#elif defined(MOZ_WIDGET_COCOA)
|
|
|
|
{ NS_NETWORK_LINK_SERVICE_CLASSNAME,
|
|
|
|
NS_NETWORK_LINK_SERVICE_CID,
|
|
|
|
NS_NETWORK_LINK_SERVICE_CONTRACTID,
|
|
|
|
nsNetworkLinkServiceConstructor
|
|
|
|
},
|
2009-11-18 18:20:45 +03:00
|
|
|
#elif defined(MOZ_ENABLE_LIBCONIC)
|
|
|
|
{ NS_NETWORK_LINK_SERVICE_CLASSNAME,
|
|
|
|
NS_NETWORK_LINK_SERVICE_CID,
|
|
|
|
NS_NETWORK_LINK_SERVICE_CONTRACTID,
|
|
|
|
nsMaemoNetworkLinkServiceConstructor
|
|
|
|
},
|
2005-11-12 21:17:19 +03:00
|
|
|
#endif
|
1999-09-30 05:53:31 +04:00
|
|
|
};
|
|
|
|
|
2005-11-12 21:17:19 +03:00
|
|
|
NS_IMPL_NSGETMODULE_WITH_CTOR_DTOR(necko, gNetModuleInfo,
|
2005-04-05 21:40:32 +04:00
|
|
|
nsNetStartup, nsNetShutdown)
|