2001-09-29 00:14:13 +04:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* ***** BEGIN LICENSE BLOCK *****
|
|
|
|
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
1999-03-24 05:31:49 +03:00
|
|
|
*
|
2001-09-29 00:14:13 +04:00
|
|
|
* The contents of this file are subject to the Netscape Public License
|
|
|
|
* Version 1.1 (the "License"); you may not use this file except in
|
|
|
|
* compliance with the License. You may obtain a copy of the License at
|
|
|
|
* http://www.mozilla.org/NPL/
|
1999-03-24 05:31:49 +03: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-03-24 05:31:49 +03:00
|
|
|
*
|
1999-11-06 06:43:54 +03:00
|
|
|
* The Original Code is mozilla.org code.
|
|
|
|
*
|
2001-09-29 00:14:13 +04:00
|
|
|
* The Initial Developer of the Original Code is
|
|
|
|
* Netscape Communications Corporation.
|
|
|
|
* Portions created by the Initial Developer are Copyright (C) 1998
|
|
|
|
* the Initial Developer. All Rights Reserved.
|
1999-11-06 06:43:54 +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
|
|
|
|
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
|
|
|
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
|
|
|
* in which case the provisions of the GPL or the LGPL are applicable instead
|
|
|
|
* of those above. If you wish to allow use of your version of this file only
|
|
|
|
* under the terms of either the GPL or the LGPL, and not to allow others to
|
|
|
|
* use your version of this file under the terms of the NPL, indicate your
|
|
|
|
* decision by deleting the provisions above and replace them with the notice
|
|
|
|
* and other provisions required by the GPL or the LGPL. If you do not delete
|
|
|
|
* the provisions above, a recipient may use your version of this file under
|
|
|
|
* the terms of any one of the NPL, the GPL or the LGPL.
|
|
|
|
*
|
|
|
|
* ***** END LICENSE BLOCK ***** */
|
1999-03-24 05:31:49 +03:00
|
|
|
|
|
|
|
#include "nsISupports.h"
|
1999-10-21 02:30:02 +04:00
|
|
|
#include "nsIFactory.h"
|
|
|
|
#include "nsIModule.h"
|
|
|
|
#include "nsIGenericFactory.h"
|
|
|
|
|
1999-03-24 05:31:49 +03:00
|
|
|
#include "msgCore.h"
|
|
|
|
#include "pratom.h"
|
|
|
|
#include "nsIComponentManager.h"
|
|
|
|
#include "nsIServiceManager.h"
|
|
|
|
#include "nsCRT.h"
|
|
|
|
#include "nsCOMPtr.h"
|
|
|
|
|
1999-04-20 23:08:10 +04:00
|
|
|
#include "nsNewsFolder.h"
|
|
|
|
#include "nsMsgNewsCID.h"
|
1999-03-24 05:31:49 +03:00
|
|
|
|
|
|
|
/* Include all of the interfaces our factory can generate components for */
|
|
|
|
#include "nsNntpUrl.h"
|
1999-03-25 07:47:12 +03:00
|
|
|
#include "nsNntpService.h"
|
1999-04-21 06:55:48 +04:00
|
|
|
#include "nsNntpIncomingServer.h"
|
1999-06-03 06:24:08 +04:00
|
|
|
#include "nsNNTPNewsgroupPost.h"
|
|
|
|
#include "nsNNTPNewsgroupList.h"
|
|
|
|
#include "nsNNTPArticleList.h"
|
2000-12-20 09:31:54 +03:00
|
|
|
#include "nsNewsDownloadDialogArgs.h"
|
2000-04-23 03:16:45 +04:00
|
|
|
#include "nsIContentHandler.h"
|
|
|
|
#include "nsCURILoader.h"
|
1999-03-24 05:31:49 +03:00
|
|
|
|
1999-10-21 02:30:02 +04:00
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsNntpUrl)
|
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsNntpService)
|
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsNntpIncomingServer)
|
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsNNTPArticleList)
|
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsNNTPNewsgroupPost)
|
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsNNTPNewsgroupList)
|
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsMsgNewsFolder)
|
2000-12-20 09:31:54 +03:00
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsNewsDownloadDialogArgs)
|
1999-10-21 02:30:02 +04:00
|
|
|
|
2002-01-31 00:14:20 +03:00
|
|
|
static const nsModuleComponentInfo components[] =
|
1999-03-24 05:31:49 +03:00
|
|
|
{
|
1999-11-12 12:07:26 +03:00
|
|
|
{ "NNTP URL",
|
|
|
|
NS_NNTPURL_CID,
|
2000-09-14 03:57:52 +04:00
|
|
|
NS_NNTPURL_CONTRACTID,
|
1999-11-12 12:07:26 +03:00
|
|
|
nsNntpUrlConstructor },
|
|
|
|
{ "NNTP Service",
|
|
|
|
NS_NNTPSERVICE_CID,
|
2000-09-14 03:57:52 +04:00
|
|
|
NS_NNTPSERVICE_CONTRACTID,
|
2000-02-26 06:52:06 +03:00
|
|
|
nsNntpServiceConstructor },
|
|
|
|
{ "News Startup Handler",
|
|
|
|
NS_NNTPSERVICE_CID,
|
2000-09-14 03:57:52 +04:00
|
|
|
NS_NEWSSTARTUPHANDLER_CONTRACTID,
|
2000-02-05 02:11:19 +03:00
|
|
|
nsNntpServiceConstructor,
|
|
|
|
nsNntpService::RegisterProc,
|
|
|
|
nsNntpService::UnregisterProc },
|
1999-11-12 12:07:26 +03:00
|
|
|
{ "NNTP Protocol Info",
|
|
|
|
NS_NNTPSERVICE_CID,
|
2000-09-14 03:57:52 +04:00
|
|
|
NS_NNTPPROTOCOLINFO_CONTRACTID,
|
1999-11-12 12:07:26 +03:00
|
|
|
nsNntpServiceConstructor },
|
|
|
|
{ "NNTP Message Service",
|
|
|
|
NS_NNTPSERVICE_CID,
|
2000-09-14 03:57:52 +04:00
|
|
|
NS_NNTPMESSAGESERVICE_CONTRACTID,
|
1999-11-12 12:07:26 +03:00
|
|
|
nsNntpServiceConstructor },
|
|
|
|
{ "News Message Service",
|
|
|
|
NS_NNTPSERVICE_CID,
|
2000-09-14 03:57:52 +04:00
|
|
|
NS_NEWSMESSAGESERVICE_CONTRACTID,
|
1999-11-12 12:07:26 +03:00
|
|
|
nsNntpServiceConstructor },
|
|
|
|
{ "News Protocol Handler",
|
|
|
|
NS_NNTPSERVICE_CID,
|
2000-09-14 03:57:52 +04:00
|
|
|
NS_NEWSPROTOCOLHANDLER_CONTRACTID,
|
1999-11-12 12:07:26 +03:00
|
|
|
nsNntpServiceConstructor },
|
2000-04-21 10:55:12 +04:00
|
|
|
{ "Secure News Protocol Handler",
|
|
|
|
NS_NNTPSERVICE_CID,
|
2000-09-14 03:57:52 +04:00
|
|
|
NS_SNEWSPROTOCOLHANDLER_CONTRACTID,
|
2000-04-21 10:55:12 +04:00
|
|
|
nsNntpServiceConstructor },
|
2001-10-09 10:01:16 +04:00
|
|
|
{ "NNTP Protocol Handler",
|
|
|
|
NS_NNTPSERVICE_CID,
|
|
|
|
NS_NNTPPROTOCOLHANDLER_CONTRACTID,
|
|
|
|
nsNntpServiceConstructor },
|
2000-04-23 03:16:45 +04:00
|
|
|
{ "newsgroup content handler",
|
|
|
|
NS_NNTPSERVICE_CID,
|
2000-09-14 03:57:52 +04:00
|
|
|
NS_CONTENT_HANDLER_CONTRACTID_PREFIX"x-application-newsgroup",
|
2000-04-23 03:16:45 +04:00
|
|
|
nsNntpServiceConstructor },
|
2002-03-06 04:44:07 +03:00
|
|
|
{ "newsgroup listids content handler",
|
|
|
|
NS_NNTPSERVICE_CID,
|
|
|
|
NS_CONTENT_HANDLER_CONTRACTID_PREFIX"x-application-newsgroup-listids",
|
|
|
|
nsNntpServiceConstructor },
|
1999-11-12 12:07:26 +03:00
|
|
|
{ "News Folder Resource",
|
|
|
|
NS_NEWSFOLDERRESOURCE_CID,
|
2000-09-14 03:57:52 +04:00
|
|
|
NS_NEWSFOLDERRESOURCE_CONTRACTID,
|
1999-11-12 12:07:26 +03:00
|
|
|
nsMsgNewsFolderConstructor },
|
|
|
|
{ "NNTP Incoming Servier",
|
|
|
|
NS_NNTPINCOMINGSERVER_CID,
|
2000-09-14 03:57:52 +04:00
|
|
|
NS_NNTPINCOMINGSERVER_CONTRACTID,
|
1999-11-12 12:07:26 +03:00
|
|
|
nsNntpIncomingServerConstructor },
|
|
|
|
{ "NNTP Newsgroup Post",
|
|
|
|
NS_NNTPNEWSGROUPPOST_CID,
|
2001-03-17 04:59:34 +03:00
|
|
|
NS_NNTPNEWSGROUPPOST_CONTRACTID,
|
1999-11-12 12:07:26 +03:00
|
|
|
nsNNTPNewsgroupPostConstructor },
|
|
|
|
{ "NNTP Newsgroup List",
|
|
|
|
NS_NNTPNEWSGROUPLIST_CID,
|
2000-09-14 03:57:52 +04:00
|
|
|
NS_NNTPNEWSGROUPLIST_CONTRACTID,
|
1999-11-12 12:07:26 +03:00
|
|
|
nsNNTPNewsgroupListConstructor },
|
|
|
|
{ "NNTP Article List",
|
|
|
|
NS_NNTPARTICLELIST_CID,
|
2000-09-14 03:57:52 +04:00
|
|
|
NS_NNTPARTICLELIST_CONTRACTID,
|
1999-11-12 12:07:26 +03:00
|
|
|
nsNNTPArticleListConstructor },
|
2000-12-20 09:31:54 +03:00
|
|
|
{ "News download dialog args",
|
|
|
|
NS_NEWSDOWNLOADDIALOGARGS_CID,
|
|
|
|
NS_NEWSDOWNLOADDIALOGARGS_CONTRACTID,
|
|
|
|
nsNewsDownloadDialogArgsConstructor }
|
1999-10-21 02:30:02 +04:00
|
|
|
};
|
|
|
|
|
2001-05-05 09:33:37 +04:00
|
|
|
NS_IMPL_NSGETMODULE(nsMsgNewsModule, components)
|
1999-06-03 22:09:54 +04:00
|
|
|
|
1999-03-24 05:31:49 +03:00
|
|
|
|