Back to index

lightning-sunbird  0.9+nobinonly
nsMsgFactory.cpp
Go to the documentation of this file.
00001 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
00002 /* ***** BEGIN LICENSE BLOCK *****
00003  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
00004  *
00005  * The contents of this file are subject to the Mozilla Public License Version
00006  * 1.1 (the "License"); you may not use this file except in compliance with
00007  * the License. You may obtain a copy of the License at
00008  * http://www.mozilla.org/MPL/
00009  *
00010  * Software distributed under the License is distributed on an "AS IS" basis,
00011  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
00012  * for the specific language governing rights and limitations under the
00013  * License.
00014  *
00015  * The Original Code is mozilla.org code.
00016  *
00017  * The Initial Developer of the Original Code is
00018  * Netscape Communications Corporation.
00019  * Portions created by the Initial Developer are Copyright (C) 1998
00020  * the Initial Developer. All Rights Reserved.
00021  *
00022  * Contributor(s):
00023  *   Pierre Phaneuf <pp@ludusdesign.com>
00024  *   Seth Spitzer <sspitzer@netscape.com>
00025  *   Karsten Düsterloh <mnyromyr@tprac.de>
00026  *
00027  * Alternatively, the contents of this file may be used under the terms of
00028  * either of the GNU General Public License Version 2 or later (the "GPL"),
00029  * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
00030  * in which case the provisions of the GPL or the LGPL are applicable instead
00031  * of those above. If you wish to allow use of your version of this file only
00032  * under the terms of either the GPL or the LGPL, and not to allow others to
00033  * use your version of this file under the terms of the MPL, indicate your
00034  * decision by deleting the provisions above and replace them with the notice
00035  * and other provisions required by the GPL or the LGPL. If you do not delete
00036  * the provisions above, a recipient may use your version of this file under
00037  * the terms of any one of the MPL, the GPL or the LGPL.
00038  *
00039  * ***** END LICENSE BLOCK ***** */
00040 
00041 #include "nsIFactory.h"
00042 #include "nsISupports.h"
00043 #include "msgCore.h"
00044 #include "nsIModule.h"
00045 #include "nsIGenericFactory.h"
00046 #include "nsMsgBaseCID.h"
00047 #include "pratom.h"
00048 #include "nsIComponentManager.h"
00049 #include "nsIServiceManager.h"
00050 #include "rdf.h"
00051 #include "nsCRT.h"
00052 #include "nsCOMPtr.h"
00053 
00054 #include "nsMessengerBootstrap.h"
00055 #include "nsMessenger.h"
00056 #include "nsMsgGroupRecord.h"
00057 
00058 #include "nsIRegistry.h"
00059 #include "nsIContentViewer.h"
00060 
00061 /* Include all of the interfaces our factory can generate components for */
00062 
00063 #include "nsIUrlListenerManager.h"
00064 #include "nsUrlListenerManager.h"
00065 #include "nsMsgMailSession.h"
00066 #include "nsMsgAccount.h"
00067 #include "nsMsgAccountManager.h"
00068 #include "nsMessengerMigrator.h"
00069 #include "nsMsgIdentity.h"
00070 #include "nsMsgIncomingServer.h"
00071 #include "nsMsgFolderDataSource.h"
00072 
00073 #include "nsMsgAccountManagerDS.h"
00074 
00075 #include "nsMsgBiffManager.h"
00076 #include "nsMsgPurgeService.h"
00077 #include "nsStatusBarBiffManager.h"
00078 
00079 #include "nsCopyMessageStreamListener.h"
00080 #include "nsMsgCopyService.h"
00081 
00082 #include "nsMsgFolderCache.h"
00083 
00084 #include "nsMsgStatusFeedback.h"
00085 
00086 #include "nsMsgFilterService.h"
00087 #include "nsMsgFilterDataSource.h"
00088 #include "nsMsgFilterDelegateFactory.h"
00089 #include "nsMsgWindow.h"
00090 
00091 #include "nsMsgServiceProvider.h"
00092 #include "nsSubscribeDataSource.h"
00093 #include "nsSubscribableServer.h"
00094 
00095 #include "nsMsgPrintEngine.h"
00096 #include "nsMsgSearchSession.h"
00097 #include "nsMsgSearchTerm.h"
00098 #include "nsMsgSearchAdapter.h"
00099 #include "nsMsgFolderCompactor.h"
00100 #include "nsMsgThreadedDBView.h"
00101 #include "nsMsgSpecialViews.h"
00102 #include "nsMsgXFVirtualFolderDBView.h"
00103 #include "nsMsgQuickSearchDBView.h"
00104 #include "nsMsgGroupView.h"
00105 
00106 #include "nsMsgOfflineManager.h"
00107 
00108 #include "nsMsgProgress.h"
00109 #include "nsSpamSettings.h"
00110 #include "nsMsgContentPolicy.h"
00111 #include "nsCidProtocolHandler.h"
00112 #include "nsMsgTagService.h"
00113 #include "nsMsgFolderNotificationService.h"
00114 
00115 #include "nsMailDirProvider.h"
00116 
00117 #ifdef XP_WIN
00118 #include "nsMessengerWinIntegration.h"
00119 #endif
00120 #ifdef XP_OS2
00121 #include "nsMessengerOS2Integration.h"
00122 #endif
00123 #ifdef XP_MACOSX
00124 #include "nsMessengerOSXIntegration.h"
00125 #endif
00126 #if defined(MOZ_WIDGET_GTK) || defined(MOZ_WIDGET_GTK2)
00127 #include "nsMessengerUnixIntegration.h"
00128 #endif
00129 
00130 #include "nsCURILoader.h"
00131 #include "nsMessengerContentHandler.h"
00132 
00133 // private factory declarations for each component we know how to produce
00134 
00135 NS_GENERIC_FACTORY_CONSTRUCTOR(nsMessengerBootstrap)
00136 NS_GENERIC_FACTORY_CONSTRUCTOR(nsUrlListenerManager)
00137 NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsMsgMailSession, Init)
00138 NS_GENERIC_FACTORY_CONSTRUCTOR(nsMessenger)
00139 NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsMsgAccountManager, Init)
00140 NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsMessengerMigrator, Init)
00141 NS_GENERIC_FACTORY_CONSTRUCTOR(nsMsgAccount)
00142 NS_GENERIC_FACTORY_CONSTRUCTOR(nsMsgIdentity)
00143 NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsMsgFolderDataSource, Init)
00144 NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsMsgUnreadFoldersDataSource, Init)
00145 NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsMsgFavoriteFoldersDataSource, Init)
00146 NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsMsgRecentFoldersDataSource, Init)
00147 NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsMsgAccountManagerDataSource, Init)
00148 NS_GENERIC_FACTORY_CONSTRUCTOR(nsMsgSearchSession)
00149 NS_GENERIC_FACTORY_CONSTRUCTOR(nsMsgSearchTerm)
00150 NS_GENERIC_FACTORY_CONSTRUCTOR(nsMsgSearchValidityManager)
00151 NS_GENERIC_FACTORY_CONSTRUCTOR(nsMsgFilterService)
00152 NS_GENERIC_FACTORY_CONSTRUCTOR(nsMsgFilterDataSource)
00153 NS_GENERIC_FACTORY_CONSTRUCTOR(nsMsgFilterDelegateFactory)
00154 NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsMsgBiffManager, Init)
00155 NS_GENERIC_FACTORY_CONSTRUCTOR(nsMsgPurgeService)
00156 NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsStatusBarBiffManager, Init)
00157 NS_GENERIC_FACTORY_CONSTRUCTOR(nsCopyMessageStreamListener)
00158 NS_GENERIC_FACTORY_CONSTRUCTOR(nsMsgCopyService)
00159 NS_GENERIC_FACTORY_CONSTRUCTOR(nsMsgFolderCache)
00160 NS_GENERIC_FACTORY_CONSTRUCTOR(nsMsgStatusFeedback)
00161 NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsMsgWindow,Init)
00162 NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsMsgServiceProviderService, Init)
00163 NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsSubscribeDataSource, Init)
00164 NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsSubscribableServer, Init)
00165 NS_GENERIC_FACTORY_CONSTRUCTOR(nsMsgPrintEngine)
00166 NS_GENERIC_FACTORY_CONSTRUCTOR(nsFolderCompactState)
00167 NS_GENERIC_FACTORY_CONSTRUCTOR(nsOfflineStoreCompactState)
00168 NS_GENERIC_FACTORY_CONSTRUCTOR(nsMsgThreadedDBView)
00169 NS_GENERIC_FACTORY_CONSTRUCTOR(nsMsgThreadsWithUnreadDBView)
00170 NS_GENERIC_FACTORY_CONSTRUCTOR(nsMsgWatchedThreadsWithUnreadDBView)
00171 NS_GENERIC_FACTORY_CONSTRUCTOR(nsMsgSearchDBView)
00172 NS_GENERIC_FACTORY_CONSTRUCTOR(nsMsgXFVirtualFolderDBView)
00173 NS_GENERIC_FACTORY_CONSTRUCTOR(nsMsgQuickSearchDBView)
00174 NS_GENERIC_FACTORY_CONSTRUCTOR(nsMsgGroupView)
00175 NS_GENERIC_FACTORY_CONSTRUCTOR(nsMsgOfflineManager)
00176 NS_GENERIC_FACTORY_CONSTRUCTOR(nsMsgProgress)
00177 NS_GENERIC_FACTORY_CONSTRUCTOR(nsSpamSettings)
00178 NS_GENERIC_FACTORY_CONSTRUCTOR(nsCidProtocolHandler)
00179 NS_GENERIC_FACTORY_CONSTRUCTOR(nsMsgTagService)
00180 NS_GENERIC_FACTORY_CONSTRUCTOR(nsMsgFolderNotificationService)
00181 #ifdef XP_WIN
00182 NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsMessengerWinIntegration, Init)
00183 #endif
00184 #ifdef XP_OS2
00185 NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsMessengerOS2Integration, Init)
00186 #endif
00187 #ifdef XP_MACOSX
00188 NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsMessengerOSXIntegration, Init)
00189 #endif
00190 #if defined(MOZ_WIDGET_GTK) || defined(MOZ_WIDGET_GTK2)
00191 NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsMessengerUnixIntegration, Init)
00192 #endif
00193 NS_GENERIC_FACTORY_CONSTRUCTOR(nsMessengerContentHandler)
00194 NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsMsgContentPolicy, Init)
00195 NS_GENERIC_FACTORY_CONSTRUCTOR(nsMailDirProvider)
00196 
00197 static NS_METHOD
00198 RegisterMailnewsContentPolicy(nsIComponentManager *aCompMgr, nsIFile *aPath,
00199                               const char *registryLocation, const char *componentType,
00200                               const nsModuleComponentInfo *info)
00201 {
00202   nsresult rv;
00203   nsCOMPtr<nsICategoryManager> catman =
00204       do_GetService(NS_CATEGORYMANAGER_CONTRACTID, &rv);
00205   if (NS_FAILED(rv)) return rv;
00206   nsXPIDLCString previous;
00207   return catman->AddCategoryEntry("content-policy",
00208                                   NS_MSGCONTENTPOLICY_CONTRACTID,
00209                                   NS_MSGCONTENTPOLICY_CONTRACTID,
00210                                   PR_TRUE, PR_TRUE, getter_Copies(previous));
00211 }
00212 
00213 static NS_METHOD
00214 UnregisterMailnewsContentPolicy(nsIComponentManager *aCompMgr, nsIFile *aPath,
00215                         const char *registryLocation,
00216                         const nsModuleComponentInfo *info)
00217 {
00218   nsresult rv;
00219   nsCOMPtr<nsICategoryManager> catman =
00220       do_GetService(NS_CATEGORYMANAGER_CONTRACTID, &rv);
00221   if (NS_FAILED(rv)) return rv;
00222 
00223   return catman->DeleteCategoryEntry("content-policy",
00224                                      NS_MSGCONTENTPOLICY_CONTRACTID,
00225                                      PR_TRUE);
00226 }
00227 
00228 
00229 // The list of components we register
00230 static const nsModuleComponentInfo gComponents[] = {
00231     { "Netscape Messenger Bootstrapper", NS_MESSENGERBOOTSTRAP_CID,
00232       NS_MESSENGERBOOTSTRAP_CONTRACTID,
00233       nsMessengerBootstrapConstructor,
00234     },
00235     { "Netscape Messenger Window Service", NS_MESSENGERWINDOWSERVICE_CID,
00236       NS_MESSENGERWINDOWSERVICE_CONTRACTID,
00237       nsMessengerBootstrapConstructor,
00238     },
00239     { "Mail Startup Handler", NS_MESSENGERBOOTSTRAP_CID,
00240       NS_MAILSTARTUPHANDLER_CONTRACTID,
00241       nsMessengerBootstrapConstructor,
00242       nsMessengerBootstrap::RegisterProc,
00243       nsMessengerBootstrap::UnregisterProc
00244     },
00245     { "UrlListenerManager", NS_URLLISTENERMANAGER_CID,
00246       NS_URLLISTENERMANAGER_CONTRACTID,
00247       nsUrlListenerManagerConstructor,
00248     },
00249     { "Mail Session", NS_MSGMAILSESSION_CID,
00250       NS_MSGMAILSESSION_CONTRACTID,
00251       nsMsgMailSessionConstructor,
00252     },
00253     { "Messenger DOM interaction object", NS_MESSENGER_CID,
00254       NS_MESSENGER_CONTRACTID,
00255       nsMessengerConstructor,
00256     },
00257     { "Messenger Account Manager", NS_MSGACCOUNTMANAGER_CID,
00258       NS_MSGACCOUNTMANAGER_CONTRACTID,
00259       nsMsgAccountManagerConstructor,
00260     },
00261     { "Messenger Migrator", NS_MESSENGERMIGRATOR_CID,
00262       NS_MESSENGERMIGRATOR_CONTRACTID,
00263       nsMessengerMigratorConstructor,
00264     },
00265     { "Messenger User Account", NS_MSGACCOUNT_CID,
00266       NS_MSGACCOUNT_CONTRACTID,
00267       nsMsgAccountConstructor,
00268     },
00269     { "Messenger User Identity", NS_MSGIDENTITY_CID,
00270       NS_MSGIDENTITY_CONTRACTID,
00271       nsMsgIdentityConstructor,
00272     },
00273     { "Mail/News Folder Data Source", NS_MAILNEWSFOLDERDATASOURCE_CID,
00274       NS_MAILNEWSFOLDERDATASOURCE_CONTRACTID,
00275       nsMsgFolderDataSourceConstructor,
00276     },
00277     { "Mail/News Unread Folder Data Source", NS_MAILNEWSUNREADFOLDERDATASOURCE_CID,
00278       NS_MAILNEWSUNREADFOLDERDATASOURCE_CONTRACTID,
00279       nsMsgUnreadFoldersDataSourceConstructor,
00280     },
00281     { "Mail/News Favorite Folder Data Source", NS_MAILNEWSFAVORITEFOLDERDATASOURCE_CID,
00282       NS_MAILNEWSFAVORITEFOLDERDATASOURCE_CONTRACTID,
00283       nsMsgFavoriteFoldersDataSourceConstructor,
00284     },
00285     { "Mail/News Recent Folder Data Source", NS_MAILNEWSRECENTFOLDERDATASOURCE_CID,
00286       NS_MAILNEWSRECENTFOLDERDATASOURCE_CONTRACTID,
00287       nsMsgRecentFoldersDataSourceConstructor,
00288     },
00289     { "Mail/News Account Manager Data Source", NS_MSGACCOUNTMANAGERDATASOURCE_CID,
00290       NS_RDF_DATASOURCE_CONTRACTID_PREFIX "msgaccountmanager",
00291       nsMsgAccountManagerDataSourceConstructor,
00292     },
00293     { "Message Filter Service", NS_MSGFILTERSERVICE_CID,
00294       NS_MSGFILTERSERVICE_CONTRACTID,
00295       nsMsgFilterServiceConstructor,
00296     },
00297     { "Message Search Session", NS_MSGSEARCHSESSION_CID,
00298       NS_MSGSEARCHSESSION_CONTRACTID,
00299       nsMsgSearchSessionConstructor
00300     },
00301     { "Message Search Term", NS_MSGSEARCHTERM_CID,
00302       NS_MSGSEARCHTERM_CONTRACTID,
00303       nsMsgSearchTermConstructor
00304     },
00305     { "Message Search Validity Manager", NS_MSGSEARCHVALIDITYMANAGER_CID,
00306         NS_MSGSEARCHVALIDITYMANAGER_CONTRACTID,
00307         nsMsgSearchValidityManagerConstructor,
00308     },
00309     { "Message Filter Service", NS_MSGFILTERSERVICE_CID,
00310       NS_MSGFILTERSERVICE_CONTRACTID,
00311       nsMsgFilterServiceConstructor,
00312     },
00313     { "Message Filter Datasource", NS_MSGFILTERDATASOURCE_CID,
00314       NS_MSGFILTERDATASOURCE_CONTRACTID,
00315       nsMsgFilterDataSourceConstructor,
00316     },
00317     // XXX temporarily do all the protocols here
00318     { "Message Filter Delegate Factory", NS_MSGFILTERDELEGATEFACTORY_CID,
00319       NS_MSGFILTERDELEGATEFACTORY_IMAP_CONTRACTID,
00320       nsMsgFilterDelegateFactoryConstructor,
00321     },
00322     { "Message Filter Delegate Factory", NS_MSGFILTERDELEGATEFACTORY_CID,
00323       NS_MSGFILTERDELEGATEFACTORY_MAILBOX_CONTRACTID,
00324       nsMsgFilterDelegateFactoryConstructor,
00325     },
00326     { "Message Filter Delegate Factory", NS_MSGFILTERDELEGATEFACTORY_CID,
00327       NS_MSGFILTERDELEGATEFACTORY_NEWS_CONTRACTID,
00328       nsMsgFilterDelegateFactoryConstructor,
00329     },
00330     // XXX done temporary registration
00331     
00332     { "Messenger Biff Manager", NS_MSGBIFFMANAGER_CID,
00333       NS_MSGBIFFMANAGER_CONTRACTID,
00334       nsMsgBiffManagerConstructor,
00335     },
00336     { "Messenger Purge Service", NS_MSGPURGESERVICE_CID,
00337       NS_MSGPURGESERVICE_CONTRACTID,
00338       nsMsgPurgeServiceConstructor,
00339     },
00340     { "Status Bar Biff Manager", NS_STATUSBARBIFFMANAGER_CID,
00341       NS_STATUSBARBIFFMANAGER_CONTRACTID,
00342       nsStatusBarBiffManagerConstructor,
00343     },
00344     { "Mail/News CopyMessage Stream Listener", NS_COPYMESSAGESTREAMLISTENER_CID,
00345       NS_COPYMESSAGESTREAMLISTENER_CONTRACTID,
00346       nsCopyMessageStreamListenerConstructor,
00347     },
00348     { "Mail/News Message Copy Service", NS_MSGCOPYSERVICE_CID,
00349       NS_MSGCOPYSERVICE_CONTRACTID,
00350       nsMsgCopyServiceConstructor,
00351     },
00352     { "Mail/News Folder Cache", NS_MSGFOLDERCACHE_CID,
00353       NS_MSGFOLDERCACHE_CONTRACTID,
00354       nsMsgFolderCacheConstructor,
00355     },
00356     { "Mail/News Status Feedback", NS_MSGSTATUSFEEDBACK_CID,
00357       NS_MSGSTATUSFEEDBACK_CONTRACTID,
00358       nsMsgStatusFeedbackConstructor,
00359     },
00360     { "Mail/News MsgWindow", NS_MSGWINDOW_CID,
00361       NS_MSGWINDOW_CONTRACTID,
00362       nsMsgWindowConstructor,
00363     },
00364     { "Mail/News Print Engine", NS_MSG_PRINTENGINE_CID,
00365       NS_MSGPRINTENGINE_CONTRACTID,
00366       nsMsgPrintEngineConstructor,
00367     },
00368     { "Mail/News Service Provider Service", NS_MSGSERVICEPROVIDERSERVICE_CID,
00369       NS_MSGSERVICEPROVIDERSERVICE_CONTRACTID,
00370       nsMsgServiceProviderServiceConstructor,
00371     },
00372     { "Mail/News Subscribe Data Source", NS_SUBSCRIBEDATASOURCE_CID,
00373       NS_SUBSCRIBEDATASOURCE_CONTRACTID,
00374       nsSubscribeDataSourceConstructor,
00375     },
00376     { "Mail/News Subscribable Server", NS_SUBSCRIBABLESERVER_CID,
00377       NS_SUBSCRIBABLESERVER_CONTRACTID,
00378       nsSubscribableServerConstructor,
00379     },
00380     { "Local folder compactor", NS_MSGLOCALFOLDERCOMPACTOR_CID,
00381       NS_MSGLOCALFOLDERCOMPACTOR_CONTRACTID,
00382       nsFolderCompactStateConstructor,
00383     },
00384     { "offline store compactor", NS_MSG_OFFLINESTORECOMPACTOR_CID,
00385       NS_MSGOFFLINESTORECOMPACTOR_CONTRACTID,
00386       nsOfflineStoreCompactStateConstructor,
00387     },
00388     { "threaded db view", NS_MSGTHREADEDDBVIEW_CID,
00389       NS_MSGTHREADEDDBVIEW_CONTRACTID,
00390       nsMsgThreadedDBViewConstructor,
00391     },
00392     { "threads with unread db view", NS_MSGTHREADSWITHUNREADDBVIEW_CID,
00393       NS_MSGTHREADSWITHUNREADDBVIEW_CONTRACTID,
00394       nsMsgThreadsWithUnreadDBViewConstructor,
00395     },
00396     { "watched threads with unread db view", NS_MSGWATCHEDTHREADSWITHUNREADDBVIEW_CID,
00397       NS_MSGWATCHEDTHREADSWITHUNREADDBVIEW_CONTRACTID,
00398       nsMsgWatchedThreadsWithUnreadDBViewConstructor,
00399     },
00400     { "search db view", NS_MSGSEARCHDBVIEW_CID,
00401       NS_MSGSEARCHDBVIEW_CONTRACTID,
00402       nsMsgSearchDBViewConstructor,
00403     },
00404     { "quick search db view", NS_MSGQUICKSEARCHDBVIEW_CID,
00405       NS_MSGQUICKSEARCHDBVIEW_CONTRACTID,
00406       nsMsgQuickSearchDBViewConstructor,
00407     },
00408     { "cross folder virtual folder db view", NS_MSG_XFVFDBVIEW_CID,
00409        NS_MSGXFVFDBVIEW_CONTRACTID,
00410        nsMsgXFVirtualFolderDBViewConstructor,
00411     },
00412     { "grouped view", NS_MSG_GROUPDBVIEW_CID,
00413        NS_MSGGROUPDBVIEW_CONTRACTID,
00414        nsMsgGroupViewConstructor,
00415     },
00416     { "Messenger Offline Manager", NS_MSGOFFLINEMANAGER_CID,
00417       NS_MSGOFFLINEMANAGER_CONTRACTID,
00418       nsMsgOfflineManagerConstructor,
00419     },
00420     { "Messenger Progress Manager", NS_MSGPROGRESS_CID,
00421       NS_MSGPROGRESS_CONTRACTID,
00422       nsMsgProgressConstructor,
00423     },
00424     { "Spam Settings", NS_SPAMSETTINGS_CID,
00425       NS_SPAMSETTINGS_CONTRACTID,
00426       nsSpamSettingsConstructor,
00427     },
00428     { "cid protocol", NS_CIDPROTOCOL_CID,
00429       NS_CIDPROTOCOLHANDLER_CONTRACTID,
00430       nsCidProtocolHandlerConstructor,
00431     },
00432     { "Tag Service", NS_MSGTAGSERVICE_CID,
00433       NS_MSGTAGSERVICE_CONTRACTID,
00434       nsMsgTagServiceConstructor,
00435     },
00436     { "Msg Notification Service", NS_MSGNOTIFICATIONSERVICE_CID,
00437       NS_MSGNOTIFICATIONSERVICE_CONTRACTID,
00438       nsMsgFolderNotificationServiceConstructor,
00439     },
00440 #ifdef XP_WIN
00441     { "Windows OS Integration", NS_MESSENGERWININTEGRATION_CID,
00442       NS_MESSENGEROSINTEGRATION_CONTRACTID,
00443       nsMessengerWinIntegrationConstructor,
00444     },
00445 #endif
00446 #ifdef XP_OS2
00447     { "OS/2 OS Integration", NS_MESSENGEROS2INTEGRATION_CID,
00448       NS_MESSENGEROSINTEGRATION_CONTRACTID,
00449       nsMessengerOS2IntegrationConstructor,
00450     },
00451 #endif
00452 #ifdef XP_MACOSX
00453     { "OSX OS Integration", NS_MESSENGEROSXINTEGRATION_CID,
00454       NS_MESSENGEROSINTEGRATION_CONTRACTID,
00455       nsMessengerOSXIntegrationConstructor,
00456     },
00457 #endif
00458 #if defined(MOZ_WIDGET_GTK) || defined(MOZ_WIDGET_GTK2)
00459     { "Unix OS Integration", NS_MESSENGERUNIXINTEGRATION_CID,
00460       NS_MESSENGEROSINTEGRATION_CONTRACTID,
00461       nsMessengerUnixIntegrationConstructor,
00462     },
00463 #endif
00464     { "application/x-message-display content handler",
00465        NS_MESSENGERCONTENTHANDLER_CID,
00466        NS_MESSENGERCONTENTHANDLER_CONTRACTID,
00467        nsMessengerContentHandlerConstructor
00468     },
00469     { "mail content policy enforcer",
00470       NS_MSGCONTENTPOLICY_CID,
00471       NS_MSGCONTENTPOLICY_CONTRACTID,
00472       nsMsgContentPolicyConstructor,
00473       RegisterMailnewsContentPolicy, UnregisterMailnewsContentPolicy
00474     },
00475     {
00476       "mail directory provider",
00477       MAILDIRPROVIDER_CID,
00478       NS_MAILDIRPROVIDER_CONTRACTID,
00479       nsMailDirProviderConstructor,
00480       nsMailDirProvider::Register,
00481       nsMailDirProvider::Unregister
00482     }
00483 };
00484 
00485 NS_IMPL_NSGETMODULE(nsMsgBaseModule, gComponents)
00486