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"
|
|
|
|
|
2009-10-22 03:01:16 +04:00
|
|
|
#ifdef MOZ_IPC
|
Bug 530952: Electrolysis HTTP Channel implementation. author=jduell, r=bsmedberg, sr=bz
- Supports only primitive xpcshell HTTP requests which don't set/get HTTP
headers, don't do redirects, observers, load groups, or anything else other
than basic things like looking at the reply body, Content-type, Content-length, etc.
- Tested with network/test/unit_ipc/test_simple_wrap.js (patch @ bug 521922)
- Only used if "NECKO_E10S_HTTP" set in environment.
- Force http.h to get #included before any IPDL files, to centralize #define
handling of LOG and to make sure FORCE_PR_LOGGING is set if needed (bug
545995)
2009-09-22 22:55:33 +04:00
|
|
|
#define ALLOW_LATE_NSHTTP_H_INCLUDE 1
|
2009-10-22 03:01:16 +04:00
|
|
|
#include "base/basictypes.h"
|
|
|
|
#endif
|
|
|
|
|
1999-09-30 05:53:31 +04:00
|
|
|
#include "nsCOMPtr.h"
|
2006-03-30 21:31:15 +04:00
|
|
|
#include "nsIClassInfoImpl.h"
|
2010-06-10 22:11:40 +04:00
|
|
|
#include "mozilla/ModuleUtils.h"
|
1999-09-30 05:53:31 +04:00
|
|
|
#include "nsIComponentManager.h"
|
|
|
|
#include "nsIServiceManager.h"
|
2000-06-02 04:23:56 +04:00
|
|
|
#include "nsICategoryManager.h"
|
1999-09-30 05:53:31 +04:00
|
|
|
#include "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)
|
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
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2010-06-10 22:11:40 +04:00
|
|
|
extern nsresult
|
2005-06-01 22:05:36 +04:00
|
|
|
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"
|
2010-03-26 02:02:28 +03:00
|
|
|
NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(nsICookieService,
|
|
|
|
nsCookieService::GetXPCOMSingleton)
|
2004-07-19 08:57:02 +04:00
|
|
|
#endif
|
2003-10-11 03:08:01 +04:00
|
|
|
|
2009-03-17 03:30:58 +03:00
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
#ifdef NECKO_WIFI
|
|
|
|
|
|
|
|
#include "nsWifiMonitor.h"
|
2009-08-21 02:55:07 +04:00
|
|
|
#undef LOG
|
|
|
|
#undef LOG_ENABLED
|
2009-03-17 03:30:58 +03:00
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsWifiMonitor)
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
2001-03-08 03:58:06 +03:00
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
2003-04-23 07:47:43 +04:00
|
|
|
// protocols
|
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
// about:blank is mandatory
|
|
|
|
#include "nsAboutProtocolHandler.h"
|
|
|
|
#include "nsAboutBlank.h"
|
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"
|
2010-06-17 22:33:42 +04:00
|
|
|
#include "nsHttpChannelAuthProvider.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)
|
2010-06-17 22:33:42 +04:00
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsHttpChannelAuthProvider)
|
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
|
|
|
|
2010-08-25 19:52:10 +04:00
|
|
|
#ifdef NECKO_PROTOCOL_device
|
|
|
|
#include "nsDeviceProtocolHandler.h"
|
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsDeviceProtocolHandler)
|
|
|
|
#endif
|
|
|
|
|
2005-11-12 21:17:19 +03:00
|
|
|
#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)
|
|
|
|
|
2010-06-13 00:40:05 +04:00
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsSimpleURI)
|
2005-09-28 17:13:27 +04:00
|
|
|
|
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)
|
2010-08-31 10:23:35 +04:00
|
|
|
#elif defined(MOZ_ENABLE_QTNETWORK)
|
|
|
|
#include "nsQtNetworkLinkService.h"
|
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsQtNetworkLinkService, 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
|
|
|
|
|
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-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
|
|
|
|
|
2010-06-10 22:11:40 +04:00
|
|
|
static const mozilla::Module::CategoryEntry kNeckoCategories[] = {
|
|
|
|
{ NS_ISTREAMCONVERTER_KEY, FTP_TO_INDEX, "" },
|
|
|
|
{ NS_ISTREAMCONVERTER_KEY, INDEX_TO_HTML, "" },
|
|
|
|
{ NS_ISTREAMCONVERTER_KEY, MULTI_MIXED_X, "" },
|
|
|
|
{ NS_ISTREAMCONVERTER_KEY, MULTI_MIXED, "" },
|
|
|
|
{ NS_ISTREAMCONVERTER_KEY, MULTI_BYTERANGES, "" },
|
|
|
|
{ NS_ISTREAMCONVERTER_KEY, UNKNOWN_CONTENT, "" },
|
|
|
|
{ NS_ISTREAMCONVERTER_KEY, GZIP_TO_UNCOMPRESSED, "" },
|
|
|
|
{ NS_ISTREAMCONVERTER_KEY, XGZIP_TO_UNCOMPRESSED, "" },
|
|
|
|
{ NS_ISTREAMCONVERTER_KEY, COMPRESS_TO_UNCOMPRESSED, "" },
|
|
|
|
{ NS_ISTREAMCONVERTER_KEY, XCOMPRESS_TO_UNCOMPRESSED, "" },
|
|
|
|
{ NS_ISTREAMCONVERTER_KEY, DEFLATE_TO_UNCOMPRESSED, "" },
|
2002-10-08 07:12:32 +04:00
|
|
|
#ifdef BUILD_BINHEX_DECODER
|
2010-06-10 22:11:40 +04:00
|
|
|
{ NS_ISTREAMCONVERTER_KEY, BINHEX_TO_WILD, "" },
|
2001-06-28 05:09:51 +04:00
|
|
|
#endif
|
2010-06-10 22:11:40 +04:00
|
|
|
{ NS_ISTREAMCONVERTER_KEY, PLAIN_TO_HTML, "" },
|
|
|
|
NS_BINARYDETECTOR_CATEGORYENTRY,
|
|
|
|
{ NULL }
|
2006-06-03 04:19:11 +04:00
|
|
|
};
|
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
|
|
|
|
2010-06-10 22:11:40 +04:00
|
|
|
static nsresult
|
2001-03-08 03:41:53 +03:00
|
|
|
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
|
2010-06-10 22:11:40 +04:00
|
|
|
static nsresult
|
2000-05-06 13:15:56 +04:00
|
|
|
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
|
|
|
|
2010-06-10 22:11:40 +04:00
|
|
|
static nsresult
|
2000-05-06 13:15:56 +04:00
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
2010-06-10 22:11:40 +04:00
|
|
|
static nsresult
|
2000-05-06 13:15:56 +04:00
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
2010-06-10 22:11:40 +04:00
|
|
|
static nsresult
|
2000-05-06 13:15:56 +04:00
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
2010-06-10 22:11:40 +04:00
|
|
|
static nsresult
|
2000-05-06 13:15:56 +04:00
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
2010-06-10 22:11:40 +04:00
|
|
|
static nsresult
|
2004-01-08 06:56:02 +03:00
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
2010-06-10 22:11:40 +04:00
|
|
|
static nsresult
|
2000-05-06 13:15:56 +04:00
|
|
|
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
|
2010-06-10 22:11:40 +04:00
|
|
|
static nsresult nsNetStartup()
|
2005-04-05 21:40:32 +04:00
|
|
|
{
|
|
|
|
gNetStrings = new nsNetStrings();
|
|
|
|
return gNetStrings ? NS_OK : NS_ERROR_OUT_OF_MEMORY;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Net module shutdown hook
|
2010-06-10 22:11:40 +04:00
|
|
|
static void nsNetShutdown()
|
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
|
|
|
}
|
|
|
|
|
2010-06-10 22:11:40 +04:00
|
|
|
NS_DEFINE_NAMED_CID(NS_IOSERVICE_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_STREAMTRANSPORTSERVICE_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_SOCKETTRANSPORTSERVICE_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_SERVERSOCKET_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_SOCKETPROVIDERSERVICE_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_DNSSERVICE_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_IDNSERVICE_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_EFFECTIVETLDSERVICE_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_SIMPLEURI_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_SIMPLENESTEDURI_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_ASYNCSTREAMCOPIER_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_INPUTSTREAMPUMP_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_INPUTSTREAMCHANNEL_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_STREAMLOADER_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_UNICHARSTREAMLOADER_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_DOWNLOADER_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_SYNCSTREAMLISTENER_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_REQUESTOBSERVERPROXY_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_SIMPLESTREAMLISTENER_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_STREAMLISTENERTEE_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_LOADGROUP_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_LOCALFILEINPUTSTREAM_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_LOCALFILEOUTPUTSTREAM_CID);
|
2010-10-14 03:25:33 +04:00
|
|
|
NS_DEFINE_NAMED_CID(NS_PARTIALLOCALFILEINPUTSTREAM_CID);
|
2010-06-10 22:11:40 +04:00
|
|
|
NS_DEFINE_NAMED_CID(NS_SAFELOCALFILEOUTPUTSTREAM_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_URICHECKER_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_INCREMENTALDOWNLOAD_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_STDURLPARSER_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_NOAUTHURLPARSER_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_AUTHURLPARSER_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_STANDARDURL_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_BUFFEREDINPUTSTREAM_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_BUFFEREDOUTPUTSTREAM_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_MIMEINPUTSTREAM_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_PROTOCOLPROXYSERVICE_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_STREAMCONVERTERSERVICE_CID);
|
2002-10-08 07:12:32 +04:00
|
|
|
#ifdef BUILD_APPLEFILE_DECODER
|
2010-06-10 22:11:40 +04:00
|
|
|
NS_DEFINE_NAMED_CID(NS_APPLEFILEDECODER_CID);
|
2001-06-26 02:11:43 +04:00
|
|
|
#endif
|
2003-07-12 02:13:30 +04:00
|
|
|
#ifdef NECKO_PROTOCOL_ftp
|
2010-06-10 22:11:40 +04:00
|
|
|
NS_DEFINE_NAMED_CID(NS_FTPDIRLISTINGCONVERTER_CID);
|
2003-07-12 02:13:30 +04:00
|
|
|
#endif
|
2010-06-10 22:11:40 +04:00
|
|
|
NS_DEFINE_NAMED_CID(NS_NSINDEXEDTOHTMLCONVERTER_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_DIRINDEXPARSER_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_MULTIMIXEDCONVERTER_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_UNKNOWNDECODER_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_BINARYDETECTOR_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_HTTPCOMPRESSCONVERTER_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_NSTXTTOHTMLCONVERTER_CID);
|
2002-10-08 07:12:32 +04:00
|
|
|
#ifdef BUILD_BINHEX_DECODER
|
2010-06-10 22:11:40 +04:00
|
|
|
NS_DEFINE_NAMED_CID(NS_BINHEXDECODER_CID);
|
|
|
|
#endif
|
|
|
|
NS_DEFINE_NAMED_CID(MOZITXTTOHTMLCONV_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_DIRINDEX_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_MIMEHEADERPARAM_CID);
|
2003-04-23 07:47:43 +04:00
|
|
|
#ifdef NECKO_PROTOCOL_file
|
2010-06-10 22:11:40 +04:00
|
|
|
NS_DEFINE_NAMED_CID(NS_FILEPROTOCOLHANDLER_CID);
|
2003-04-23 07:47:43 +04:00
|
|
|
#endif
|
|
|
|
#ifdef NECKO_PROTOCOL_http
|
2010-06-10 22:11:40 +04:00
|
|
|
NS_DEFINE_NAMED_CID(NS_HTTPPROTOCOLHANDLER_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_HTTPSPROTOCOLHANDLER_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_HTTPBASICAUTH_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_HTTPDIGESTAUTH_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_HTTPNTLMAUTH_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_HTTPAUTHMANAGER_CID);
|
2010-06-21 19:41:42 +04:00
|
|
|
NS_DEFINE_NAMED_CID(NS_HTTPCHANNELAUTHPROVIDER_CID);
|
2010-06-10 22:11:40 +04:00
|
|
|
NS_DEFINE_NAMED_CID(NS_HTTPACTIVITYDISTRIBUTOR_CID);
|
2003-04-23 07:47:43 +04:00
|
|
|
#endif // !NECKO_PROTOCOL_http
|
|
|
|
#ifdef NECKO_PROTOCOL_ftp
|
2010-06-10 22:11:40 +04:00
|
|
|
NS_DEFINE_NAMED_CID(NS_FTPPROTOCOLHANDLER_CID);
|
2003-04-23 07:47:43 +04:00
|
|
|
#endif
|
|
|
|
#ifdef NECKO_PROTOCOL_res
|
2010-06-10 22:11:40 +04:00
|
|
|
NS_DEFINE_NAMED_CID(NS_RESPROTOCOLHANDLER_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_RESURL_CID);
|
|
|
|
#endif
|
|
|
|
NS_DEFINE_NAMED_CID(NS_ABOUTPROTOCOLHANDLER_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_SAFEABOUTPROTOCOLHANDLER_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_ABOUT_BLANK_MODULE_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_NESTEDABOUTURI_CID);
|
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
|
2010-06-10 22:11:40 +04:00
|
|
|
NS_DEFINE_NAMED_CID(NS_ABOUT_BLOAT_MODULE_CID);
|
|
|
|
#endif
|
|
|
|
NS_DEFINE_NAMED_CID(NS_ABOUT_CACHE_MODULE_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_ABOUT_CACHE_ENTRY_MODULE_CID);
|
|
|
|
#endif
|
|
|
|
NS_DEFINE_NAMED_CID(NS_SOCKSSOCKETPROVIDER_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_SOCKS4SOCKETPROVIDER_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_UDPSOCKETPROVIDER_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_CACHESERVICE_CID);
|
2008-08-27 03:09:02 +04:00
|
|
|
#ifdef NECKO_OFFLINE_CACHE
|
2010-06-10 22:11:40 +04:00
|
|
|
NS_DEFINE_NAMED_CID(NS_APPLICATIONCACHESERVICE_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_APPLICATIONCACHENAMESPACE_CID);
|
2008-08-27 03:09:02 +04:00
|
|
|
#endif
|
2004-07-19 08:57:02 +04:00
|
|
|
#ifdef NECKO_COOKIES
|
2010-06-10 22:11:40 +04:00
|
|
|
NS_DEFINE_NAMED_CID(NS_COOKIEMANAGER_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_COOKIESERVICE_CID);
|
2004-07-19 08:57:02 +04:00
|
|
|
#endif
|
2009-03-17 03:30:58 +03:00
|
|
|
#ifdef NECKO_WIFI
|
2010-06-10 22:11:40 +04:00
|
|
|
NS_DEFINE_NAMED_CID(NS_WIFI_MONITOR_COMPONENT_CID);
|
2009-03-17 03:30:58 +03:00
|
|
|
#endif
|
2005-11-12 21:17:19 +03:00
|
|
|
#ifdef NECKO_PROTOCOL_data
|
2010-06-10 22:11:40 +04:00
|
|
|
NS_DEFINE_NAMED_CID(NS_DATAPROTOCOLHANDLER_CID);
|
2005-11-12 21:17:19 +03:00
|
|
|
#endif
|
2010-08-25 19:52:10 +04:00
|
|
|
#ifdef NECKO_PROTOCOL_device
|
|
|
|
NS_DEFINE_NAMED_CID(NS_DEVICEPROTOCOLHANDLER_CID);
|
|
|
|
#endif
|
2005-11-12 21:17:19 +03:00
|
|
|
#ifdef NECKO_PROTOCOL_viewsource
|
2010-06-10 22:11:40 +04:00
|
|
|
NS_DEFINE_NAMED_CID(NS_VIEWSOURCEHANDLER_CID);
|
|
|
|
#endif
|
|
|
|
#if defined(XP_WIN)
|
|
|
|
NS_DEFINE_NAMED_CID(NS_NETWORK_LINK_SERVICE_CID);
|
|
|
|
#elif defined(MOZ_WIDGET_COCOA)
|
|
|
|
NS_DEFINE_NAMED_CID(NS_NETWORK_LINK_SERVICE_CID);
|
|
|
|
#elif defined(MOZ_ENABLE_LIBCONIC)
|
|
|
|
NS_DEFINE_NAMED_CID(NS_NETWORK_LINK_SERVICE_CID);
|
2010-08-31 10:23:35 +04:00
|
|
|
#elif defined(MOZ_ENABLE_QTNETWORK)
|
|
|
|
NS_DEFINE_NAMED_CID(NS_NETWORK_LINK_SERVICE_CID);
|
2010-06-10 22:11:40 +04:00
|
|
|
#endif
|
|
|
|
|
|
|
|
static const mozilla::Module::CIDEntry kNeckoCIDs[] = {
|
|
|
|
{ &kNS_IOSERVICE_CID, false, NULL, nsIOServiceConstructor },
|
|
|
|
{ &kNS_STREAMTRANSPORTSERVICE_CID, false, NULL, nsStreamTransportServiceConstructor },
|
|
|
|
{ &kNS_SOCKETTRANSPORTSERVICE_CID, false, NULL, nsSocketTransportServiceConstructor },
|
|
|
|
{ &kNS_SERVERSOCKET_CID, false, NULL, nsServerSocketConstructor },
|
|
|
|
{ &kNS_SOCKETPROVIDERSERVICE_CID, false, NULL, nsSocketProviderService::Create },
|
|
|
|
{ &kNS_DNSSERVICE_CID, false, NULL, nsDNSServiceConstructor },
|
|
|
|
{ &kNS_IDNSERVICE_CID, false, NULL, nsIDNServiceConstructor },
|
|
|
|
{ &kNS_EFFECTIVETLDSERVICE_CID, false, NULL, nsEffectiveTLDServiceConstructor },
|
|
|
|
{ &kNS_SIMPLEURI_CID, false, NULL, nsSimpleURIConstructor },
|
|
|
|
{ &kNS_SIMPLENESTEDURI_CID, false, NULL, nsSimpleNestedURIConstructor },
|
|
|
|
{ &kNS_ASYNCSTREAMCOPIER_CID, false, NULL, nsAsyncStreamCopierConstructor },
|
|
|
|
{ &kNS_INPUTSTREAMPUMP_CID, false, NULL, nsInputStreamPumpConstructor },
|
|
|
|
{ &kNS_INPUTSTREAMCHANNEL_CID, false, NULL, nsInputStreamChannelConstructor },
|
|
|
|
{ &kNS_STREAMLOADER_CID, false, NULL, nsStreamLoader::Create },
|
|
|
|
{ &kNS_UNICHARSTREAMLOADER_CID, false, NULL, nsUnicharStreamLoader::Create },
|
|
|
|
{ &kNS_DOWNLOADER_CID, false, NULL, nsDownloaderConstructor },
|
|
|
|
{ &kNS_SYNCSTREAMLISTENER_CID, false, NULL, nsSyncStreamListenerConstructor },
|
|
|
|
{ &kNS_REQUESTOBSERVERPROXY_CID, false, NULL, nsRequestObserverProxyConstructor },
|
|
|
|
{ &kNS_SIMPLESTREAMLISTENER_CID, false, NULL, nsSimpleStreamListenerConstructor },
|
|
|
|
{ &kNS_STREAMLISTENERTEE_CID, false, NULL, nsStreamListenerTeeConstructor },
|
|
|
|
{ &kNS_LOADGROUP_CID, false, NULL, nsLoadGroupConstructor },
|
|
|
|
{ &kNS_LOCALFILEINPUTSTREAM_CID, false, NULL, nsFileInputStream::Create },
|
|
|
|
{ &kNS_LOCALFILEOUTPUTSTREAM_CID, false, NULL, nsFileOutputStream::Create },
|
2010-10-14 03:25:33 +04:00
|
|
|
{ &kNS_PARTIALLOCALFILEINPUTSTREAM_CID, false, NULL, nsPartialFileInputStream::Create },
|
2010-06-10 22:11:40 +04:00
|
|
|
{ &kNS_SAFELOCALFILEOUTPUTSTREAM_CID, false, NULL, nsSafeFileOutputStreamConstructor },
|
|
|
|
{ &kNS_URICHECKER_CID, false, NULL, nsURICheckerConstructor },
|
|
|
|
{ &kNS_INCREMENTALDOWNLOAD_CID, false, NULL, net_NewIncrementalDownload },
|
|
|
|
{ &kNS_STDURLPARSER_CID, false, NULL, nsStdURLParserConstructor },
|
|
|
|
{ &kNS_NOAUTHURLPARSER_CID, false, NULL, nsNoAuthURLParserConstructor },
|
|
|
|
{ &kNS_AUTHURLPARSER_CID, false, NULL, nsAuthURLParserConstructor },
|
|
|
|
{ &kNS_STANDARDURL_CID, false, NULL, nsStandardURLConstructor },
|
|
|
|
{ &kNS_BUFFEREDINPUTSTREAM_CID, false, NULL, nsBufferedInputStream::Create },
|
|
|
|
{ &kNS_BUFFEREDOUTPUTSTREAM_CID, false, NULL, nsBufferedOutputStream::Create },
|
|
|
|
{ &kNS_MIMEINPUTSTREAM_CID, false, NULL, nsMIMEInputStreamConstructor },
|
|
|
|
{ &kNS_PROTOCOLPROXYSERVICE_CID, true, NULL, nsProtocolProxyServiceConstructor },
|
|
|
|
{ &kNS_STREAMCONVERTERSERVICE_CID, false, NULL, CreateNewStreamConvServiceFactory },
|
|
|
|
#ifdef BUILD_APPLEFILE_DECODER
|
|
|
|
{ &kNS_APPLEFILEDECODER_CID, false, NULL, nsAppleFileDecoderConstructor },
|
|
|
|
#endif
|
|
|
|
#ifdef NECKO_PROTOCOL_ftp
|
|
|
|
{ &kNS_FTPDIRLISTINGCONVERTER_CID, false, NULL, CreateNewFTPDirListingConv },
|
|
|
|
#endif
|
|
|
|
{ &kNS_NSINDEXEDTOHTMLCONVERTER_CID, false, NULL, nsIndexedToHTML::Create },
|
|
|
|
{ &kNS_DIRINDEXPARSER_CID, false, NULL, nsDirIndexParserConstructor },
|
|
|
|
{ &kNS_MULTIMIXEDCONVERTER_CID, false, NULL, CreateNewMultiMixedConvFactory },
|
|
|
|
{ &kNS_UNKNOWNDECODER_CID, false, NULL, CreateNewUnknownDecoderFactory },
|
|
|
|
{ &kNS_BINARYDETECTOR_CID, false, NULL, CreateNewBinaryDetectorFactory },
|
|
|
|
{ &kNS_HTTPCOMPRESSCONVERTER_CID, false, NULL, CreateNewHTTPCompressConvFactory },
|
|
|
|
{ &kNS_NSTXTTOHTMLCONVERTER_CID, false, NULL, CreateNewNSTXTToHTMLConvFactory },
|
|
|
|
#ifdef BUILD_BINHEX_DECODER
|
|
|
|
{ &kNS_BINHEXDECODER_CID, false, NULL, nsBinHexDecoderConstructor },
|
|
|
|
#endif
|
|
|
|
{ &kMOZITXTTOHTMLCONV_CID, false, NULL, CreateNewTXTToHTMLConvFactory },
|
|
|
|
{ &kNS_DIRINDEX_CID, false, NULL, nsDirIndexConstructor },
|
|
|
|
{ &kNS_MIMEHEADERPARAM_CID, false, NULL, nsMIMEHeaderParamImplConstructor },
|
|
|
|
#ifdef NECKO_PROTOCOL_file
|
|
|
|
{ &kNS_FILEPROTOCOLHANDLER_CID, false, NULL, nsFileProtocolHandlerConstructor },
|
|
|
|
#endif
|
|
|
|
#ifdef NECKO_PROTOCOL_http
|
|
|
|
{ &kNS_HTTPPROTOCOLHANDLER_CID, false, NULL, nsHttpHandlerConstructor },
|
|
|
|
{ &kNS_HTTPSPROTOCOLHANDLER_CID, false, NULL, nsHttpsHandlerConstructor },
|
|
|
|
{ &kNS_HTTPBASICAUTH_CID, false, NULL, nsHttpBasicAuthConstructor },
|
|
|
|
{ &kNS_HTTPDIGESTAUTH_CID, false, NULL, nsHttpDigestAuthConstructor },
|
|
|
|
{ &kNS_HTTPNTLMAUTH_CID, false, NULL, nsHttpNTLMAuthConstructor },
|
|
|
|
{ &kNS_HTTPAUTHMANAGER_CID, false, NULL, nsHttpAuthManagerConstructor },
|
2010-06-21 19:41:42 +04:00
|
|
|
{ &kNS_HTTPCHANNELAUTHPROVIDER_CID, false, NULL, nsHttpChannelAuthProviderConstructor },
|
2010-06-10 22:11:40 +04:00
|
|
|
{ &kNS_HTTPACTIVITYDISTRIBUTOR_CID, false, NULL, nsHttpActivityDistributorConstructor },
|
|
|
|
#endif // !NECKO_PROTOCOL_http
|
|
|
|
#ifdef NECKO_PROTOCOL_ftp
|
|
|
|
{ &kNS_FTPPROTOCOLHANDLER_CID, false, NULL, nsFtpProtocolHandlerConstructor },
|
|
|
|
#endif
|
|
|
|
#ifdef NECKO_PROTOCOL_res
|
|
|
|
{ &kNS_RESPROTOCOLHANDLER_CID, false, NULL, nsResProtocolHandlerConstructor },
|
|
|
|
{ &kNS_RESURL_CID, false, NULL, nsResURLConstructor },
|
|
|
|
#endif
|
|
|
|
{ &kNS_ABOUTPROTOCOLHANDLER_CID, false, NULL, nsAboutProtocolHandlerConstructor },
|
|
|
|
{ &kNS_SAFEABOUTPROTOCOLHANDLER_CID, false, NULL, nsSafeAboutProtocolHandlerConstructor },
|
|
|
|
{ &kNS_ABOUT_BLANK_MODULE_CID, false, NULL, nsAboutBlank::Create },
|
|
|
|
{ &kNS_NESTEDABOUTURI_CID, false, NULL, nsNestedAboutURIConstructor },
|
|
|
|
#ifdef NECKO_PROTOCOL_about
|
|
|
|
#ifdef NS_BUILD_REFCNT_LOGGING
|
|
|
|
{ &kNS_ABOUT_BLOAT_MODULE_CID, false, NULL, nsAboutBloat::Create },
|
|
|
|
#endif
|
|
|
|
{ &kNS_ABOUT_CACHE_MODULE_CID, false, NULL, nsAboutCache::Create },
|
|
|
|
{ &kNS_ABOUT_CACHE_ENTRY_MODULE_CID, false, NULL, nsAboutCacheEntryConstructor },
|
|
|
|
#endif
|
|
|
|
{ &kNS_SOCKSSOCKETPROVIDER_CID, false, NULL, nsSOCKSSocketProvider::CreateV5 },
|
|
|
|
{ &kNS_SOCKS4SOCKETPROVIDER_CID, false, NULL, nsSOCKSSocketProvider::CreateV4 },
|
|
|
|
{ &kNS_UDPSOCKETPROVIDER_CID, false, NULL, nsUDPSocketProviderConstructor },
|
|
|
|
{ &kNS_CACHESERVICE_CID, false, NULL, nsCacheService::Create },
|
|
|
|
#ifdef NECKO_OFFLINE_CACHE
|
|
|
|
{ &kNS_APPLICATIONCACHESERVICE_CID, false, NULL, nsOfflineCacheDeviceConstructor },
|
|
|
|
{ &kNS_APPLICATIONCACHENAMESPACE_CID, false, NULL, nsApplicationCacheNamespaceConstructor },
|
2006-05-02 22:08:55 +04:00
|
|
|
#endif
|
2010-06-10 22:11:40 +04:00
|
|
|
#ifdef NECKO_COOKIES
|
2010-07-01 19:55:57 +04:00
|
|
|
{ &kNS_COOKIEMANAGER_CID, false, NULL, nsICookieServiceConstructor },
|
|
|
|
{ &kNS_COOKIESERVICE_CID, false, NULL, nsICookieServiceConstructor },
|
2010-06-10 22:11:40 +04:00
|
|
|
#endif
|
|
|
|
#ifdef NECKO_WIFI
|
|
|
|
{ &kNS_WIFI_MONITOR_COMPONENT_CID, false, NULL, nsWifiMonitorConstructor },
|
|
|
|
#endif
|
|
|
|
#ifdef NECKO_PROTOCOL_data
|
|
|
|
{ &kNS_DATAPROTOCOLHANDLER_CID, false, NULL, nsDataHandler::Create },
|
|
|
|
#endif
|
2010-08-25 19:52:10 +04:00
|
|
|
#ifdef NECKO_PROTOCOL_device
|
|
|
|
{ &kNS_DEVICEPROTOCOLHANDLER_CID, false, NULL, nsDeviceProtocolHandlerConstructor},
|
|
|
|
#endif
|
2010-06-10 22:11:40 +04:00
|
|
|
#ifdef NECKO_PROTOCOL_viewsource
|
|
|
|
{ &kNS_VIEWSOURCEHANDLER_CID, false, NULL, nsViewSourceHandlerConstructor },
|
|
|
|
#endif
|
|
|
|
#if defined(XP_WIN)
|
|
|
|
{ &kNS_NETWORK_LINK_SERVICE_CID, false, NULL, nsNotifyAddrListenerConstructor },
|
|
|
|
#elif defined(MOZ_WIDGET_COCOA)
|
|
|
|
{ &kNS_NETWORK_LINK_SERVICE_CID, false, NULL, nsNetworkLinkServiceConstructor },
|
|
|
|
#elif defined(MOZ_ENABLE_LIBCONIC)
|
|
|
|
{ &kNS_NETWORK_LINK_SERVICE_CID, false, NULL, nsMaemoNetworkLinkServiceConstructor },
|
2010-08-31 10:23:35 +04:00
|
|
|
#elif defined(MOZ_ENABLE_QTNETWORK)
|
|
|
|
{ &kNS_NETWORK_LINK_SERVICE_CID, false, NULL, nsQtNetworkLinkServiceConstructor },
|
2010-06-10 22:11:40 +04:00
|
|
|
#endif
|
|
|
|
{ NULL }
|
|
|
|
};
|
2006-05-02 22:08:55 +04:00
|
|
|
|
2010-06-10 22:11:40 +04:00
|
|
|
static const mozilla::Module::ContractIDEntry kNeckoContracts[] = {
|
|
|
|
{ NS_IOSERVICE_CONTRACTID, &kNS_IOSERVICE_CID },
|
|
|
|
{ NS_NETUTIL_CONTRACTID, &kNS_IOSERVICE_CID },
|
|
|
|
{ NS_STREAMTRANSPORTSERVICE_CONTRACTID, &kNS_STREAMTRANSPORTSERVICE_CID },
|
|
|
|
{ NS_SOCKETTRANSPORTSERVICE_CONTRACTID, &kNS_SOCKETTRANSPORTSERVICE_CID },
|
|
|
|
{ NS_SERVERSOCKET_CONTRACTID, &kNS_SERVERSOCKET_CID },
|
|
|
|
{ NS_SOCKETPROVIDERSERVICE_CONTRACTID, &kNS_SOCKETPROVIDERSERVICE_CID },
|
|
|
|
{ NS_DNSSERVICE_CONTRACTID, &kNS_DNSSERVICE_CID },
|
|
|
|
{ NS_IDNSERVICE_CONTRACTID, &kNS_IDNSERVICE_CID },
|
|
|
|
{ NS_EFFECTIVETLDSERVICE_CONTRACTID, &kNS_EFFECTIVETLDSERVICE_CID },
|
|
|
|
{ NS_SIMPLEURI_CONTRACTID, &kNS_SIMPLEURI_CID },
|
|
|
|
{ NS_ASYNCSTREAMCOPIER_CONTRACTID, &kNS_ASYNCSTREAMCOPIER_CID },
|
|
|
|
{ NS_INPUTSTREAMPUMP_CONTRACTID, &kNS_INPUTSTREAMPUMP_CID },
|
|
|
|
{ NS_INPUTSTREAMCHANNEL_CONTRACTID, &kNS_INPUTSTREAMCHANNEL_CID },
|
|
|
|
{ NS_STREAMLOADER_CONTRACTID, &kNS_STREAMLOADER_CID },
|
|
|
|
{ NS_UNICHARSTREAMLOADER_CONTRACTID, &kNS_UNICHARSTREAMLOADER_CID },
|
|
|
|
{ NS_DOWNLOADER_CONTRACTID, &kNS_DOWNLOADER_CID },
|
|
|
|
{ NS_SYNCSTREAMLISTENER_CONTRACTID, &kNS_SYNCSTREAMLISTENER_CID },
|
|
|
|
{ NS_REQUESTOBSERVERPROXY_CONTRACTID, &kNS_REQUESTOBSERVERPROXY_CID },
|
|
|
|
{ NS_SIMPLESTREAMLISTENER_CONTRACTID, &kNS_SIMPLESTREAMLISTENER_CID },
|
|
|
|
{ NS_STREAMLISTENERTEE_CONTRACTID, &kNS_STREAMLISTENERTEE_CID },
|
|
|
|
{ NS_LOADGROUP_CONTRACTID, &kNS_LOADGROUP_CID },
|
|
|
|
{ NS_LOCALFILEINPUTSTREAM_CONTRACTID, &kNS_LOCALFILEINPUTSTREAM_CID },
|
|
|
|
{ NS_LOCALFILEOUTPUTSTREAM_CONTRACTID, &kNS_LOCALFILEOUTPUTSTREAM_CID },
|
2010-10-14 03:25:33 +04:00
|
|
|
{ NS_PARTIALLOCALFILEINPUTSTREAM_CONTRACTID, &kNS_PARTIALLOCALFILEINPUTSTREAM_CID },
|
2010-06-10 22:11:40 +04:00
|
|
|
{ NS_SAFELOCALFILEOUTPUTSTREAM_CONTRACTID, &kNS_SAFELOCALFILEOUTPUTSTREAM_CID },
|
|
|
|
{ NS_URICHECKER_CONTRACT_ID, &kNS_URICHECKER_CID },
|
|
|
|
{ NS_INCREMENTALDOWNLOAD_CONTRACTID, &kNS_INCREMENTALDOWNLOAD_CID },
|
|
|
|
{ NS_STDURLPARSER_CONTRACTID, &kNS_STDURLPARSER_CID },
|
|
|
|
{ NS_NOAUTHURLPARSER_CONTRACTID, &kNS_NOAUTHURLPARSER_CID },
|
|
|
|
{ NS_AUTHURLPARSER_CONTRACTID, &kNS_AUTHURLPARSER_CID },
|
|
|
|
{ NS_STANDARDURL_CONTRACTID, &kNS_STANDARDURL_CID },
|
|
|
|
{ NS_BUFFEREDINPUTSTREAM_CONTRACTID, &kNS_BUFFEREDINPUTSTREAM_CID },
|
|
|
|
{ NS_BUFFEREDOUTPUTSTREAM_CONTRACTID, &kNS_BUFFEREDOUTPUTSTREAM_CID },
|
|
|
|
{ NS_MIMEINPUTSTREAM_CONTRACTID, &kNS_MIMEINPUTSTREAM_CID },
|
|
|
|
{ NS_PROTOCOLPROXYSERVICE_CONTRACTID, &kNS_PROTOCOLPROXYSERVICE_CID },
|
|
|
|
{ NS_STREAMCONVERTERSERVICE_CONTRACTID, &kNS_STREAMCONVERTERSERVICE_CID },
|
|
|
|
#ifdef BUILD_APPLEFILE_DECODER
|
|
|
|
{ NS_IAPPLEFILEDECODER_CONTRACTID, &kNS_APPLEFILEDECODER_CID },
|
|
|
|
#endif
|
|
|
|
#ifdef NECKO_PROTOCOL_ftp
|
|
|
|
{ NS_ISTREAMCONVERTER_KEY FTP_TO_INDEX, &kNS_FTPDIRLISTINGCONVERTER_CID },
|
|
|
|
#endif
|
|
|
|
{ NS_ISTREAMCONVERTER_KEY INDEX_TO_HTML, &kNS_NSINDEXEDTOHTMLCONVERTER_CID },
|
|
|
|
{ NS_DIRINDEXPARSER_CONTRACTID, &kNS_DIRINDEXPARSER_CID },
|
|
|
|
{ NS_ISTREAMCONVERTER_KEY MULTI_MIXED_X, &kNS_MULTIMIXEDCONVERTER_CID },
|
|
|
|
{ NS_ISTREAMCONVERTER_KEY MULTI_BYTERANGES, &kNS_MULTIMIXEDCONVERTER_CID },
|
|
|
|
{ NS_ISTREAMCONVERTER_KEY MULTI_MIXED, &kNS_MULTIMIXEDCONVERTER_CID },
|
|
|
|
{ NS_ISTREAMCONVERTER_KEY UNKNOWN_CONTENT, &kNS_UNKNOWNDECODER_CID },
|
|
|
|
{ NS_GENERIC_CONTENT_SNIFFER, &kNS_UNKNOWNDECODER_CID },
|
|
|
|
{ NS_BINARYDETECTOR_CONTRACTID, &kNS_BINARYDETECTOR_CID },
|
|
|
|
{ NS_ISTREAMCONVERTER_KEY GZIP_TO_UNCOMPRESSED, &kNS_HTTPCOMPRESSCONVERTER_CID },
|
|
|
|
{ NS_ISTREAMCONVERTER_KEY XGZIP_TO_UNCOMPRESSED, &kNS_HTTPCOMPRESSCONVERTER_CID },
|
|
|
|
{ NS_ISTREAMCONVERTER_KEY COMPRESS_TO_UNCOMPRESSED, &kNS_HTTPCOMPRESSCONVERTER_CID },
|
|
|
|
{ NS_ISTREAMCONVERTER_KEY XCOMPRESS_TO_UNCOMPRESSED, &kNS_HTTPCOMPRESSCONVERTER_CID },
|
|
|
|
{ NS_ISTREAMCONVERTER_KEY DEFLATE_TO_UNCOMPRESSED, &kNS_HTTPCOMPRESSCONVERTER_CID },
|
|
|
|
{ NS_ISTREAMCONVERTER_KEY PLAIN_TO_HTML, &kNS_NSTXTTOHTMLCONVERTER_CID },
|
|
|
|
#ifdef BUILD_BINHEX_DECODER
|
|
|
|
{ NS_ISTREAMCONVERTER_KEY BINHEX_TO_WILD, &kNS_BINHEXDECODER_CID },
|
|
|
|
#endif
|
|
|
|
{ MOZ_TXTTOHTMLCONV_CONTRACTID, &kMOZITXTTOHTMLCONV_CID },
|
|
|
|
{ "@mozilla.org/dirIndex;1", &kNS_DIRINDEX_CID },
|
|
|
|
{ NS_MIMEHEADERPARAM_CONTRACTID, &kNS_MIMEHEADERPARAM_CID },
|
|
|
|
#ifdef NECKO_PROTOCOL_file
|
|
|
|
{ NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "file", &kNS_FILEPROTOCOLHANDLER_CID },
|
|
|
|
#endif
|
|
|
|
#ifdef NECKO_PROTOCOL_http
|
|
|
|
{ NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "http", &kNS_HTTPPROTOCOLHANDLER_CID },
|
|
|
|
{ NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "https", &kNS_HTTPSPROTOCOLHANDLER_CID },
|
|
|
|
{ NS_HTTP_AUTHENTICATOR_CONTRACTID_PREFIX "basic", &kNS_HTTPBASICAUTH_CID },
|
|
|
|
{ NS_HTTP_AUTHENTICATOR_CONTRACTID_PREFIX "digest", &kNS_HTTPDIGESTAUTH_CID },
|
|
|
|
{ NS_HTTP_AUTHENTICATOR_CONTRACTID_PREFIX "ntlm", &kNS_HTTPNTLMAUTH_CID },
|
|
|
|
{ NS_HTTPAUTHMANAGER_CONTRACTID, &kNS_HTTPAUTHMANAGER_CID },
|
2010-06-21 19:41:42 +04:00
|
|
|
{ NS_HTTPCHANNELAUTHPROVIDER_CONTRACTID, &kNS_HTTPCHANNELAUTHPROVIDER_CID },
|
2010-06-10 22:11:40 +04:00
|
|
|
{ NS_HTTPACTIVITYDISTRIBUTOR_CONTRACTID, &kNS_HTTPACTIVITYDISTRIBUTOR_CID },
|
|
|
|
#endif // !NECKO_PROTOCOL_http
|
|
|
|
#ifdef NECKO_PROTOCOL_ftp
|
|
|
|
{ NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "ftp", &kNS_FTPPROTOCOLHANDLER_CID },
|
|
|
|
#endif
|
|
|
|
#ifdef NECKO_PROTOCOL_res
|
|
|
|
{ NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "resource", &kNS_RESPROTOCOLHANDLER_CID },
|
|
|
|
#endif
|
|
|
|
{ NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "about", &kNS_ABOUTPROTOCOLHANDLER_CID },
|
|
|
|
{ NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "moz-safe-about", &kNS_SAFEABOUTPROTOCOLHANDLER_CID },
|
|
|
|
{ NS_ABOUT_MODULE_CONTRACTID_PREFIX "blank", &kNS_ABOUT_BLANK_MODULE_CID },
|
|
|
|
#ifdef NECKO_PROTOCOL_about
|
|
|
|
#ifdef NS_BUILD_REFCNT_LOGGING
|
|
|
|
{ NS_ABOUT_MODULE_CONTRACTID_PREFIX "bloat", &kNS_ABOUT_BLOAT_MODULE_CID },
|
|
|
|
#endif
|
|
|
|
{ NS_ABOUT_MODULE_CONTRACTID_PREFIX "cache", &kNS_ABOUT_CACHE_MODULE_CID },
|
|
|
|
{ NS_ABOUT_MODULE_CONTRACTID_PREFIX "cache-entry", &kNS_ABOUT_CACHE_ENTRY_MODULE_CID },
|
|
|
|
#endif
|
|
|
|
{ NS_NETWORK_SOCKET_CONTRACTID_PREFIX "socks", &kNS_SOCKSSOCKETPROVIDER_CID },
|
|
|
|
{ NS_NETWORK_SOCKET_CONTRACTID_PREFIX "socks4", &kNS_SOCKS4SOCKETPROVIDER_CID },
|
|
|
|
{ NS_NETWORK_SOCKET_CONTRACTID_PREFIX "udp", &kNS_UDPSOCKETPROVIDER_CID },
|
|
|
|
{ NS_CACHESERVICE_CONTRACTID, &kNS_CACHESERVICE_CID },
|
|
|
|
#ifdef NECKO_OFFLINE_CACHE
|
|
|
|
{ NS_APPLICATIONCACHESERVICE_CONTRACTID, &kNS_APPLICATIONCACHESERVICE_CID },
|
|
|
|
{ NS_APPLICATIONCACHENAMESPACE_CONTRACTID, &kNS_APPLICATIONCACHENAMESPACE_CID },
|
|
|
|
#endif
|
|
|
|
#ifdef NECKO_COOKIES
|
|
|
|
{ NS_COOKIEMANAGER_CONTRACTID, &kNS_COOKIEMANAGER_CID },
|
|
|
|
{ NS_COOKIESERVICE_CONTRACTID, &kNS_COOKIESERVICE_CID },
|
|
|
|
#endif
|
|
|
|
#ifdef NECKO_WIFI
|
|
|
|
{ NS_WIFI_MONITOR_CONTRACTID, &kNS_WIFI_MONITOR_COMPONENT_CID },
|
|
|
|
#endif
|
|
|
|
#ifdef NECKO_PROTOCOL_data
|
|
|
|
{ NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "data", &kNS_DATAPROTOCOLHANDLER_CID },
|
|
|
|
#endif
|
2010-08-25 19:52:10 +04:00
|
|
|
#ifdef NECKO_PROTOCOL_device
|
|
|
|
{ NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "moz-device", &kNS_DEVICEPROTOCOLHANDLER_CID },
|
|
|
|
#endif
|
2010-06-10 22:11:40 +04:00
|
|
|
#ifdef NECKO_PROTOCOL_viewsource
|
|
|
|
{ NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "view-source", &kNS_VIEWSOURCEHANDLER_CID },
|
|
|
|
#endif
|
2009-03-18 09:46:19 +03:00
|
|
|
#if defined(XP_WIN)
|
2010-06-10 22:11:40 +04:00
|
|
|
{ NS_NETWORK_LINK_SERVICE_CONTRACTID, &kNS_NETWORK_LINK_SERVICE_CID },
|
2008-10-01 02:27:06 +04:00
|
|
|
#elif defined(MOZ_WIDGET_COCOA)
|
2010-06-10 22:11:40 +04:00
|
|
|
{ NS_NETWORK_LINK_SERVICE_CONTRACTID, &kNS_NETWORK_LINK_SERVICE_CID },
|
2009-11-18 18:20:45 +03:00
|
|
|
#elif defined(MOZ_ENABLE_LIBCONIC)
|
2010-06-10 22:11:40 +04:00
|
|
|
{ NS_NETWORK_LINK_SERVICE_CONTRACTID, &kNS_NETWORK_LINK_SERVICE_CID },
|
2010-08-31 10:23:35 +04:00
|
|
|
#elif defined(MOZ_ENABLE_QTNETWORK)
|
|
|
|
{ NS_NETWORK_LINK_SERVICE_CONTRACTID, &kNS_NETWORK_LINK_SERVICE_CID },
|
2005-11-12 21:17:19 +03:00
|
|
|
#endif
|
2010-06-10 22:11:40 +04:00
|
|
|
{ NULL }
|
|
|
|
};
|
|
|
|
|
|
|
|
static const mozilla::Module kNeckoModule = {
|
|
|
|
mozilla::Module::kVersion,
|
|
|
|
kNeckoCIDs,
|
|
|
|
kNeckoContracts,
|
|
|
|
kNeckoCategories,
|
|
|
|
NULL,
|
|
|
|
nsNetStartup,
|
|
|
|
nsNetShutdown
|
1999-09-30 05:53:31 +04:00
|
|
|
};
|
|
|
|
|
2010-06-10 22:11:40 +04:00
|
|
|
NSMODULE_DEFN(necko) = &kNeckoModule;
|