CLOSED TREE bug 575740, r/sr=standard8 adapt to component mgr changes

This commit is contained in:
David Bienvenu 2010-07-04 07:37:32 -07:00
Родитель bfd7a56bcb
Коммит 0d4d8617ef
19 изменённых файлов: 713 добавлений и 836 удалений

Просмотреть файл

@ -300,7 +300,7 @@ static const mozilla::Module kAddressBookModule = {
mozilla::Module::kVersion,
kAddressBookCIDs,
kAddressBookContracts,
NULL,
kAddressBookCategories,
NULL,
NULL,
msgAbModuleDtor

Просмотреть файл

@ -63,11 +63,11 @@
* ATTENTION! ATTENTION! ATTENTION! ATTENTION! ATTENTION! ATTENTION! ATTENTION!
* ****************************************************************************/
#include "mozilla/ModuleUtils.h"
#include "nsIFactory.h"
#include "nsISupports.h"
#include "msgCore.h"
#include "nsIModule.h"
#include "nsIGenericFactory.h"
#include "nsMsgBaseCID.h"
#include "pratom.h"
#include "nsICategoryManager.h"
@ -212,302 +212,215 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(nsMailDirProvider)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsMsgShutdownService)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsStopwatch)
static NS_METHOD
RegisterMailnewsContentPolicy(nsIComponentManager *aCompMgr, nsIFile *aPath,
const char *registryLocation, const char *componentType,
const nsModuleComponentInfo *info)
{
nsresult rv;
nsCOMPtr<nsICategoryManager> catman =
do_GetService(NS_CATEGORYMANAGER_CONTRACTID, &rv);
if (NS_FAILED(rv)) return rv;
nsCString previous;
return catman->AddCategoryEntry("content-policy",
NS_MSGCONTENTPOLICY_CONTRACTID,
NS_MSGCONTENTPOLICY_CONTRACTID,
PR_TRUE, PR_TRUE, getter_Copies(previous));
}
static NS_METHOD
UnregisterMailnewsContentPolicy(nsIComponentManager *aCompMgr, nsIFile *aPath,
const char *registryLocation,
const nsModuleComponentInfo *info)
{
nsresult rv;
nsCOMPtr<nsICategoryManager> catman =
do_GetService(NS_CATEGORYMANAGER_CONTRACTID, &rv);
if (NS_FAILED(rv)) return rv;
return catman->DeleteCategoryEntry("content-policy",
NS_MSGCONTENTPOLICY_CONTRACTID,
PR_TRUE);
}
#ifdef XP_MACOSX
static NS_METHOD RegisterOSXIntegration(nsIComponentManager *aCompMgr,
nsIFile *aPath,
const char *registryLocation,
const char *componentType,
const nsModuleComponentInfo *info)
{
nsresult rv;
nsCOMPtr<nsICategoryManager> catman =
do_GetService(NS_CATEGORYMANAGER_CONTRACTID, &rv);
NS_ENSURE_SUCCESS(rv, rv);
nsCString previous;
return catman->AddCategoryEntry("app-startup",
NS_MESSENGEROSINTEGRATION_CONTRACTID,
"service," NS_MESSENGEROSINTEGRATION_CONTRACTID,
PR_TRUE, PR_TRUE, getter_Copies(previous));
}
static NS_METHOD UnregisterOSXIntegration(nsIComponentManager *aCompMgr,
nsIFile *aPath,
const char *registryLocation,
const nsModuleComponentInfo *info)
{
nsresult rv;
nsCOMPtr<nsICategoryManager> catman =
do_GetService(NS_CATEGORYMANAGER_CONTRACTID, &rv);
NS_ENSURE_SUCCESS(rv, rv);
return catman->DeleteCategoryEntry("app-startup",
NS_MESSENGEROSINTEGRATION_CONTRACTID,
PR_TRUE);
}
#endif
// The list of components we register
static const nsModuleComponentInfo gComponents[] = {
{ "Netscape Messenger Bootstrapper", NS_MESSENGERBOOTSTRAP_CID,
NS_MESSENGERBOOTSTRAP_CONTRACTID,
nsMessengerBootstrapConstructor,
},
{ "Netscape Messenger Window Service", NS_MESSENGERWINDOWSERVICE_CID,
NS_MESSENGERWINDOWSERVICE_CONTRACTID,
nsMessengerBootstrapConstructor,
},
{ "Mail Session", NS_MSGMAILSESSION_CID,
NS_MSGMAILSESSION_CONTRACTID,
nsMsgMailSessionConstructor,
},
{ "Messenger DOM interaction object", NS_MESSENGER_CID,
NS_MESSENGER_CONTRACTID,
nsMessengerConstructor,
},
{ "Messenger Account Manager", NS_MSGACCOUNTMANAGER_CID,
NS_MSGACCOUNTMANAGER_CONTRACTID,
nsMsgAccountManagerConstructor,
},
{ "Messenger User Account", NS_MSGACCOUNT_CID,
NS_MSGACCOUNT_CONTRACTID,
nsMsgAccountConstructor,
},
{ "Messenger User Identity", NS_MSGIDENTITY_CID,
NS_MSGIDENTITY_CONTRACTID,
nsMsgIdentityConstructor,
},
{ "Mail/News Folder Data Source", NS_MAILNEWSFOLDERDATASOURCE_CID,
NS_MAILNEWSFOLDERDATASOURCE_CONTRACTID,
nsMsgFolderDataSourceConstructor,
},
{ "Mail/News Unread Folder Data Source", NS_MAILNEWSUNREADFOLDERDATASOURCE_CID,
NS_MAILNEWSUNREADFOLDERDATASOURCE_CONTRACTID,
nsMsgUnreadFoldersDataSourceConstructor,
},
{ "Mail/News Favorite Folder Data Source", NS_MAILNEWSFAVORITEFOLDERDATASOURCE_CID,
NS_MAILNEWSFAVORITEFOLDERDATASOURCE_CONTRACTID,
nsMsgFavoriteFoldersDataSourceConstructor,
},
{ "Mail/News Recent Folder Data Source", NS_MAILNEWSRECENTFOLDERDATASOURCE_CID,
NS_MAILNEWSRECENTFOLDERDATASOURCE_CONTRACTID,
nsMsgRecentFoldersDataSourceConstructor,
},
{ "Mail/News Account Manager Data Source", NS_MSGACCOUNTMANAGERDATASOURCE_CID,
NS_RDF_DATASOURCE_CONTRACTID_PREFIX "msgaccountmanager",
nsMsgAccountManagerDataSourceConstructor,
},
{ "Message Filter Service", NS_MSGFILTERSERVICE_CID,
NS_MSGFILTERSERVICE_CONTRACTID,
nsMsgFilterServiceConstructor,
},
{ "Message Search Session", NS_MSGSEARCHSESSION_CID,
NS_MSGSEARCHSESSION_CONTRACTID,
nsMsgSearchSessionConstructor
},
{ "Message Search Term", NS_MSGSEARCHTERM_CID,
NS_MSGSEARCHTERM_CONTRACTID,
nsMsgSearchTermConstructor
},
{ "Message Search Validity Manager", NS_MSGSEARCHVALIDITYMANAGER_CID,
NS_MSGSEARCHVALIDITYMANAGER_CONTRACTID,
nsMsgSearchValidityManagerConstructor,
},
{ "Messenger Biff Manager", NS_MSGBIFFMANAGER_CID,
NS_MSGBIFFMANAGER_CONTRACTID,
nsMsgBiffManagerConstructor,
},
{ "Messenger Purge Service", NS_MSGPURGESERVICE_CID,
NS_MSGPURGESERVICE_CONTRACTID,
nsMsgPurgeServiceConstructor,
},
{ "Status Bar Biff Manager", NS_STATUSBARBIFFMANAGER_CID,
NS_STATUSBARBIFFMANAGER_CONTRACTID,
nsStatusBarBiffManagerConstructor,
},
{ "Mail/News CopyMessage Stream Listener", NS_COPYMESSAGESTREAMLISTENER_CID,
NS_COPYMESSAGESTREAMLISTENER_CONTRACTID,
nsCopyMessageStreamListenerConstructor,
},
{ "Mail/News Message Copy Service", NS_MSGCOPYSERVICE_CID,
NS_MSGCOPYSERVICE_CONTRACTID,
nsMsgCopyServiceConstructor,
},
{ "Mail/News Folder Cache", NS_MSGFOLDERCACHE_CID,
NS_MSGFOLDERCACHE_CONTRACTID,
nsMsgFolderCacheConstructor,
},
{ "Mail/News Status Feedback", NS_MSGSTATUSFEEDBACK_CID,
NS_MSGSTATUSFEEDBACK_CONTRACTID,
nsMsgStatusFeedbackConstructor,
},
{ "Mail/News MsgWindow", NS_MSGWINDOW_CID,
NS_MSGWINDOW_CONTRACTID,
nsMsgWindowConstructor,
},
{ "Mail/News Print Engine", NS_MSG_PRINTENGINE_CID,
NS_MSGPRINTENGINE_CONTRACTID,
nsMsgPrintEngineConstructor,
},
{ "Mail/News Service Provider Service", NS_MSGSERVICEPROVIDERSERVICE_CID,
NS_MSGSERVICEPROVIDERSERVICE_CONTRACTID,
nsMsgServiceProviderServiceConstructor,
},
{ "Mail/News Subscribe Data Source", NS_SUBSCRIBEDATASOURCE_CID,
NS_SUBSCRIBEDATASOURCE_CONTRACTID,
nsSubscribeDataSourceConstructor,
},
{ "Mail/News Subscribable Server", NS_SUBSCRIBABLESERVER_CID,
NS_SUBSCRIBABLESERVER_CONTRACTID,
nsSubscribableServerConstructor,
},
{ "Local folder compactor", NS_MSGLOCALFOLDERCOMPACTOR_CID,
NS_MSGLOCALFOLDERCOMPACTOR_CONTRACTID,
nsFolderCompactStateConstructor,
},
{ "offline store compactor", NS_MSG_OFFLINESTORECOMPACTOR_CID,
NS_MSGOFFLINESTORECOMPACTOR_CONTRACTID,
nsOfflineStoreCompactStateConstructor,
},
{ "threaded db view", NS_MSGTHREADEDDBVIEW_CID,
NS_MSGTHREADEDDBVIEW_CONTRACTID,
nsMsgThreadedDBViewConstructor,
},
{ "threads with unread db view", NS_MSGTHREADSWITHUNREADDBVIEW_CID,
NS_MSGTHREADSWITHUNREADDBVIEW_CONTRACTID,
nsMsgThreadsWithUnreadDBViewConstructor,
},
{ "watched threads with unread db view", NS_MSGWATCHEDTHREADSWITHUNREADDBVIEW_CID,
NS_MSGWATCHEDTHREADSWITHUNREADDBVIEW_CONTRACTID,
nsMsgWatchedThreadsWithUnreadDBViewConstructor,
},
{ "search db view", NS_MSGSEARCHDBVIEW_CID,
NS_MSGSEARCHDBVIEW_CONTRACTID,
nsMsgSearchDBViewConstructor,
},
{ "quick search db view", NS_MSGQUICKSEARCHDBVIEW_CID,
NS_MSGQUICKSEARCHDBVIEW_CONTRACTID,
nsMsgQuickSearchDBViewConstructor,
},
{ "cross folder virtual folder db view", NS_MSG_XFVFDBVIEW_CID,
NS_MSGXFVFDBVIEW_CONTRACTID,
nsMsgXFVirtualFolderDBViewConstructor,
},
{ "grouped view", NS_MSG_GROUPDBVIEW_CID,
NS_MSGGROUPDBVIEW_CONTRACTID,
nsMsgGroupViewConstructor,
},
{ "Messenger Offline Manager", NS_MSGOFFLINEMANAGER_CID,
NS_MSGOFFLINEMANAGER_CONTRACTID,
nsMsgOfflineManagerConstructor,
},
{ "Messenger Progress Manager", NS_MSGPROGRESS_CID,
NS_MSGPROGRESS_CONTRACTID,
nsMsgProgressConstructor,
},
{ "Spam Settings", NS_SPAMSETTINGS_CID,
NS_SPAMSETTINGS_CONTRACTID,
nsSpamSettingsConstructor,
},
{ "cid protocol", NS_CIDPROTOCOL_CID,
NS_CIDPROTOCOLHANDLER_CONTRACTID,
nsCidProtocolHandlerConstructor,
},
{ "Tag Service", NS_MSGTAGSERVICE_CID,
NS_MSGTAGSERVICE_CONTRACTID,
nsMsgTagServiceConstructor,
},
{ "Msg Notification Service", NS_MSGNOTIFICATIONSERVICE_CID,
NS_MSGNOTIFICATIONSERVICE_CONTRACTID,
nsMsgFolderNotificationServiceConstructor,
},
NS_DEFINE_NAMED_CID(NS_MESSENGERBOOTSTRAP_CID);
NS_DEFINE_NAMED_CID(NS_MESSENGERWINDOWSERVICE_CID);
NS_DEFINE_NAMED_CID(NS_MSGMAILSESSION_CID);
NS_DEFINE_NAMED_CID(NS_MESSENGER_CID);
NS_DEFINE_NAMED_CID(NS_MSGACCOUNTMANAGER_CID);
NS_DEFINE_NAMED_CID(NS_MSGACCOUNT_CID);
NS_DEFINE_NAMED_CID(NS_MSGIDENTITY_CID);
NS_DEFINE_NAMED_CID(NS_MAILNEWSFOLDERDATASOURCE_CID);
NS_DEFINE_NAMED_CID(NS_MAILNEWSUNREADFOLDERDATASOURCE_CID);
NS_DEFINE_NAMED_CID(NS_MAILNEWSFAVORITEFOLDERDATASOURCE_CID);
NS_DEFINE_NAMED_CID(NS_MAILNEWSRECENTFOLDERDATASOURCE_CID);
NS_DEFINE_NAMED_CID(NS_MSGACCOUNTMANAGERDATASOURCE_CID);
NS_DEFINE_NAMED_CID(NS_MSGFILTERSERVICE_CID);
NS_DEFINE_NAMED_CID(NS_MSGSEARCHSESSION_CID);
NS_DEFINE_NAMED_CID(NS_MSGSEARCHTERM_CID);
NS_DEFINE_NAMED_CID(NS_MSGSEARCHVALIDITYMANAGER_CID);
NS_DEFINE_NAMED_CID(NS_MSGBIFFMANAGER_CID);
NS_DEFINE_NAMED_CID(NS_MSGPURGESERVICE_CID);
NS_DEFINE_NAMED_CID(NS_STATUSBARBIFFMANAGER_CID);
NS_DEFINE_NAMED_CID(NS_COPYMESSAGESTREAMLISTENER_CID);
NS_DEFINE_NAMED_CID(NS_MSGCOPYSERVICE_CID);
NS_DEFINE_NAMED_CID(NS_MSGFOLDERCACHE_CID);
NS_DEFINE_NAMED_CID(NS_MSGSTATUSFEEDBACK_CID);
NS_DEFINE_NAMED_CID(NS_MSGWINDOW_CID);
NS_DEFINE_NAMED_CID(NS_MSG_PRINTENGINE_CID);
NS_DEFINE_NAMED_CID(NS_MSGSERVICEPROVIDERSERVICE_CID);
NS_DEFINE_NAMED_CID(NS_SUBSCRIBEDATASOURCE_CID);
NS_DEFINE_NAMED_CID(NS_SUBSCRIBABLESERVER_CID);
NS_DEFINE_NAMED_CID(NS_MSGLOCALFOLDERCOMPACTOR_CID);
NS_DEFINE_NAMED_CID(NS_MSG_OFFLINESTORECOMPACTOR_CID);
NS_DEFINE_NAMED_CID(NS_MSGTHREADEDDBVIEW_CID);
NS_DEFINE_NAMED_CID(NS_MSGTHREADSWITHUNREADDBVIEW_CID);
NS_DEFINE_NAMED_CID(NS_MSGWATCHEDTHREADSWITHUNREADDBVIEW_CID);
NS_DEFINE_NAMED_CID(NS_MSGSEARCHDBVIEW_CID);
NS_DEFINE_NAMED_CID(NS_MSGQUICKSEARCHDBVIEW_CID);
NS_DEFINE_NAMED_CID(NS_MSG_XFVFDBVIEW_CID);
NS_DEFINE_NAMED_CID(NS_MSG_GROUPDBVIEW_CID);
NS_DEFINE_NAMED_CID(NS_MSGOFFLINEMANAGER_CID);
NS_DEFINE_NAMED_CID(NS_MSGPROGRESS_CID);
NS_DEFINE_NAMED_CID(NS_SPAMSETTINGS_CID);
NS_DEFINE_NAMED_CID(NS_CIDPROTOCOL_CID);
NS_DEFINE_NAMED_CID(NS_MSGTAGSERVICE_CID);
NS_DEFINE_NAMED_CID(NS_MSGNOTIFICATIONSERVICE_CID);
#ifdef XP_WIN
{ "Windows OS Integration", NS_MESSENGERWININTEGRATION_CID,
NS_MESSENGEROSINTEGRATION_CONTRACTID,
nsMessengerWinIntegrationConstructor,
},
NS_DEFINE_NAMED_CID(NS_MESSENGERWININTEGRATION_CID);
#endif
#ifdef XP_OS2
{ "OS/2 OS Integration", NS_MESSENGEROS2INTEGRATION_CID,
NS_MESSENGEROSINTEGRATION_CONTRACTID,
nsMessengerOS2IntegrationConstructor,
},
NS_DEFINE_NAMED_CID(NS_MESSENGEROS2INTEGRATION_CID);
#endif
#ifdef XP_MACOSX
{ "OSX OS Integration", NS_MESSENGEROSXINTEGRATION_CID,
NS_MESSENGEROSINTEGRATION_CONTRACTID,
nsMessengerOSXIntegrationConstructor,
RegisterOSXIntegration,
UnregisterOSXIntegration,
},
NS_DEFINE_NAMED_CID(NS_MESSENGEROSXINTEGRATION_CID);
#endif
#if defined(MOZ_WIDGET_GTK) || defined(MOZ_WIDGET_GTK2)
{ "Unix OS Integration", NS_MESSENGERUNIXINTEGRATION_CID,
NS_MESSENGEROSINTEGRATION_CONTRACTID,
nsMessengerUnixIntegrationConstructor,
},
NS_DEFINE_NAMED_CID(NS_MESSENGERUNIXINTEGRATION_CID);
#endif
{ "application/x-message-display content handler",
NS_MESSENGERCONTENTHANDLER_CID,
NS_MESSENGERCONTENTHANDLER_CONTRACTID,
nsMessengerContentHandlerConstructor
},
{ "mail content policy enforcer",
NS_MSGCONTENTPOLICY_CID,
NS_MSGCONTENTPOLICY_CONTRACTID,
nsMsgContentPolicyConstructor,
RegisterMailnewsContentPolicy, UnregisterMailnewsContentPolicy
},
{ "msg shutdown service",
NS_MSGSHUTDOWNSERVICE_CID,
NS_MSGSHUTDOWNSERVICE_CONTRACTID,
nsMsgShutdownServiceConstructor
},
{
"mail director provider",
MAILDIRPROVIDER_CID,
NS_MAILDIRPROVIDER_CONTRACTID,
nsMailDirProviderConstructor,
nsMailDirProvider::Register,
nsMailDirProvider::Unregister
},
{
"stopwatch", NS_STOPWATCH_CID,
NS_STOPWATCH_CONTRACTID,
nsStopwatchConstructor
}
NS_DEFINE_NAMED_CID(NS_MESSENGERCONTENTHANDLER_CID);
NS_DEFINE_NAMED_CID(NS_MSGCONTENTPOLICY_CID);
NS_DEFINE_NAMED_CID(NS_MSGSHUTDOWNSERVICE_CID);
NS_DEFINE_NAMED_CID(MAILDIRPROVIDER_CID);
NS_DEFINE_NAMED_CID(NS_STOPWATCH_CID);
const mozilla::Module::CIDEntry kMailNewsBaseCIDs[] = {
{ &kNS_MESSENGERBOOTSTRAP_CID, false, NULL, nsMessengerBootstrapConstructor },
{ &kNS_MESSENGERWINDOWSERVICE_CID, false, NULL, nsMessengerBootstrapConstructor},
{ &kNS_MSGMAILSESSION_CID, false, NULL, nsMsgMailSessionConstructor},
{ &kNS_MESSENGER_CID, false, NULL,nsMessengerConstructor},
{ &kNS_MSGACCOUNTMANAGER_CID, false, NULL, nsMsgAccountManagerConstructor},
{ &kNS_MSGACCOUNT_CID, false, NULL, nsMsgAccountConstructor},
{ &kNS_MSGIDENTITY_CID, false, NULL, nsMsgIdentityConstructor},
{ &kNS_MAILNEWSFOLDERDATASOURCE_CID, false, NULL, nsMsgFolderDataSourceConstructor},
{ &kNS_MAILNEWSUNREADFOLDERDATASOURCE_CID, false, NULL, nsMsgUnreadFoldersDataSourceConstructor},
{ &kNS_MAILNEWSFAVORITEFOLDERDATASOURCE_CID, false, NULL, nsMsgFavoriteFoldersDataSourceConstructor},
{ &kNS_MAILNEWSRECENTFOLDERDATASOURCE_CID, false, NULL, nsMsgRecentFoldersDataSourceConstructor},
{ &kNS_MSGACCOUNTMANAGERDATASOURCE_CID, false, NULL, nsMsgAccountManagerDataSourceConstructor},
{ &kNS_MSGFILTERSERVICE_CID, false, NULL, nsMsgFilterServiceConstructor},
{ &kNS_MSGSEARCHSESSION_CID, false, NULL, nsMsgSearchSessionConstructor},
{ &kNS_MSGSEARCHTERM_CID, false, NULL, nsMsgSearchTermConstructor},
{ &kNS_MSGSEARCHVALIDITYMANAGER_CID, false, NULL, nsMsgSearchValidityManagerConstructor},
{ &kNS_MSGBIFFMANAGER_CID, false, NULL, nsMsgBiffManagerConstructor},
{ &kNS_MSGPURGESERVICE_CID, false, NULL, nsMsgPurgeServiceConstructor},
{ &kNS_STATUSBARBIFFMANAGER_CID, false, NULL, nsStatusBarBiffManagerConstructor},
{ &kNS_COPYMESSAGESTREAMLISTENER_CID, false, NULL, nsCopyMessageStreamListenerConstructor},
{ &kNS_MSGCOPYSERVICE_CID, false, NULL, nsMsgCopyServiceConstructor},
{ &kNS_MSGFOLDERCACHE_CID, false, NULL, nsMsgFolderCacheConstructor},
{ &kNS_MSGSTATUSFEEDBACK_CID, false, NULL, nsMsgStatusFeedbackConstructor},
{ &kNS_MSGWINDOW_CID, false, NULL, nsMsgWindowConstructor},
{ &kNS_MSG_PRINTENGINE_CID, false, NULL, nsMsgPrintEngineConstructor},
{ &kNS_MSGSERVICEPROVIDERSERVICE_CID, false, NULL, nsMsgServiceProviderServiceConstructor},
{ &kNS_SUBSCRIBEDATASOURCE_CID, false, NULL, nsSubscribeDataSourceConstructor},
{ &kNS_SUBSCRIBABLESERVER_CID, false, NULL, nsSubscribableServerConstructor},
{ &kNS_MSGLOCALFOLDERCOMPACTOR_CID, false, NULL, nsFolderCompactStateConstructor},
{ &kNS_MSG_OFFLINESTORECOMPACTOR_CID, false, NULL, nsOfflineStoreCompactStateConstructor},
{ &kNS_MSGTHREADEDDBVIEW_CID, false, NULL, nsMsgThreadedDBViewConstructor},
{ &kNS_MSGTHREADSWITHUNREADDBVIEW_CID, false, NULL, nsMsgThreadsWithUnreadDBViewConstructor},
{ &kNS_MSGWATCHEDTHREADSWITHUNREADDBVIEW_CID, false, NULL, nsMsgWatchedThreadsWithUnreadDBViewConstructor},
{ &kNS_MSGSEARCHDBVIEW_CID, false, NULL, nsMsgSearchDBViewConstructor},
{ &kNS_MSGQUICKSEARCHDBVIEW_CID, false, NULL, nsMsgQuickSearchDBViewConstructor},
{ &kNS_MSG_XFVFDBVIEW_CID, false, NULL, nsMsgXFVirtualFolderDBViewConstructor},
{ &kNS_MSG_GROUPDBVIEW_CID, false, NULL, nsMsgGroupViewConstructor},
{ &kNS_MSGOFFLINEMANAGER_CID, false, NULL, nsMsgOfflineManagerConstructor},
{ &kNS_MSGPROGRESS_CID, false, NULL, nsMsgProgressConstructor},
{ &kNS_SPAMSETTINGS_CID, false, NULL, nsSpamSettingsConstructor},
{ &kNS_CIDPROTOCOL_CID, false, NULL, nsCidProtocolHandlerConstructor},
{ &kNS_MSGTAGSERVICE_CID, false, NULL, nsMsgTagServiceConstructor},
{ &kNS_MSGNOTIFICATIONSERVICE_CID, false, NULL, nsMsgFolderNotificationServiceConstructor},
#ifdef XP_WIN
{ &kNS_MESSENGERWININTEGRATION_CID, false, NULL, nsMessengerWinIntegrationConstructor},
#endif
#ifdef XP_OS2
{ &kNS_MESSENGEROS2INTEGRATION_CID, false, NULL, nsMessengerOS2IntegrationConstructor},
#endif
#ifdef XP_MACOSX
{ &kNS_MESSENGEROSXINTEGRATION_CID, false, NULL, nsMessengerOSXIntegrationConstructor},
// RegisterOSXIntegration,
// UnregisterOSXIntegration,
#endif
#if defined(MOZ_WIDGET_GTK) || defined(MOZ_WIDGET_GTK2)
{ &kNS_MESSENGERUNIXINTEGRATION_CID, false, NULL, nsMessengerUnixIntegrationConstructor},
#endif
{ &kNS_MESSENGERCONTENTHANDLER_CID, false, NULL, nsMessengerContentHandlerConstructor},
{ &kNS_MSGCONTENTPOLICY_CID, false, NULL, nsMsgContentPolicyConstructor},
// RegisterMailnewsContentPolicy, UnregisterMailnewsContentPolicy
{ &kNS_MSGSHUTDOWNSERVICE_CID, false, NULL, nsMsgShutdownServiceConstructor},
{ &kMAILDIRPROVIDER_CID, false, NULL, nsMailDirProviderConstructor},
// nsMailDirProvider::Register,
// nsMailDirProvider::Unregister
{&kNS_STOPWATCH_CID, false, NULL, nsStopwatchConstructor},
{NULL}
};
NS_IMPL_NSGETMODULE(nsMsgBaseModule, gComponents)
const mozilla::Module::ContractIDEntry kMailNewsBaseContracts[] = {
{ NS_MESSENGERBOOTSTRAP_CONTRACTID, &kNS_MESSENGERBOOTSTRAP_CID },
{ NS_MESSENGERWINDOWSERVICE_CONTRACTID, &kNS_MESSENGERWINDOWSERVICE_CID },
{ NS_MSGMAILSESSION_CONTRACTID, &kNS_MSGMAILSESSION_CID },
{ NS_MESSENGER_CONTRACTID, &kNS_MESSENGER_CID },
{ NS_MSGACCOUNTMANAGER_CONTRACTID, &kNS_MSGACCOUNTMANAGER_CID },
{ NS_MSGACCOUNT_CONTRACTID, &kNS_MSGACCOUNT_CID },
{ NS_MSGIDENTITY_CONTRACTID, &kNS_MSGIDENTITY_CID },
{ NS_MAILNEWSFOLDERDATASOURCE_CONTRACTID, &kNS_MAILNEWSFOLDERDATASOURCE_CID },
{ NS_MAILNEWSUNREADFOLDERDATASOURCE_CONTRACTID, &kNS_MAILNEWSUNREADFOLDERDATASOURCE_CID },
{ NS_MAILNEWSFAVORITEFOLDERDATASOURCE_CONTRACTID, &kNS_MAILNEWSFAVORITEFOLDERDATASOURCE_CID },
{ NS_MAILNEWSRECENTFOLDERDATASOURCE_CONTRACTID, &kNS_MAILNEWSRECENTFOLDERDATASOURCE_CID },
{ NS_RDF_DATASOURCE_CONTRACTID_PREFIX "msgaccountmanager", &kNS_MSGACCOUNTMANAGERDATASOURCE_CID },
{ NS_MSGFILTERSERVICE_CONTRACTID, &kNS_MSGFILTERSERVICE_CID },
{ NS_MSGSEARCHSESSION_CONTRACTID, &kNS_MSGSEARCHSESSION_CID },
{ NS_MSGSEARCHTERM_CONTRACTID, &kNS_MSGSEARCHTERM_CID },
{ NS_MSGSEARCHVALIDITYMANAGER_CONTRACTID, &kNS_MSGSEARCHVALIDITYMANAGER_CID },
{ NS_MSGBIFFMANAGER_CONTRACTID, &kNS_MSGBIFFMANAGER_CID },
{ NS_MSGPURGESERVICE_CONTRACTID, &kNS_MSGPURGESERVICE_CID },
{ NS_STATUSBARBIFFMANAGER_CONTRACTID, &kNS_STATUSBARBIFFMANAGER_CID },
{ NS_COPYMESSAGESTREAMLISTENER_CONTRACTID, &kNS_COPYMESSAGESTREAMLISTENER_CID },
{ NS_MSGCOPYSERVICE_CONTRACTID, &kNS_MSGCOPYSERVICE_CID },
{ NS_MSGFOLDERCACHE_CONTRACTID, &kNS_MSGFOLDERCACHE_CID },
{ NS_MSGSTATUSFEEDBACK_CONTRACTID, &kNS_MSGSTATUSFEEDBACK_CID },
{ NS_MSGWINDOW_CONTRACTID, &kNS_MSGWINDOW_CID },
{ NS_MSGPRINTENGINE_CONTRACTID, &kNS_MSG_PRINTENGINE_CID },
{ NS_MSGSERVICEPROVIDERSERVICE_CONTRACTID, &kNS_MSGSERVICEPROVIDERSERVICE_CID },
{ NS_SUBSCRIBEDATASOURCE_CONTRACTID, &kNS_SUBSCRIBEDATASOURCE_CID },
{ NS_SUBSCRIBABLESERVER_CONTRACTID, &kNS_SUBSCRIBABLESERVER_CID },
{ NS_MSGLOCALFOLDERCOMPACTOR_CONTRACTID, &kNS_MSGLOCALFOLDERCOMPACTOR_CID },
{ NS_MSGOFFLINESTORECOMPACTOR_CONTRACTID, &kNS_MSG_OFFLINESTORECOMPACTOR_CID },
{ NS_MSGTHREADEDDBVIEW_CONTRACTID, &kNS_MSGTHREADEDDBVIEW_CID },
{ NS_MSGTHREADSWITHUNREADDBVIEW_CONTRACTID, &kNS_MSGTHREADSWITHUNREADDBVIEW_CID },
{ NS_MSGWATCHEDTHREADSWITHUNREADDBVIEW_CONTRACTID, &kNS_MSGWATCHEDTHREADSWITHUNREADDBVIEW_CID },
{ NS_MSGSEARCHDBVIEW_CONTRACTID, &kNS_MSGSEARCHDBVIEW_CID },
{ NS_MSGQUICKSEARCHDBVIEW_CONTRACTID, &kNS_MSGQUICKSEARCHDBVIEW_CID },
{ NS_MSGXFVFDBVIEW_CONTRACTID, &kNS_MSG_XFVFDBVIEW_CID },
{ NS_MSGGROUPDBVIEW_CONTRACTID, &kNS_MSG_GROUPDBVIEW_CID },
{ NS_MSGOFFLINEMANAGER_CONTRACTID, &kNS_MSGOFFLINEMANAGER_CID },
{ NS_MSGPROGRESS_CONTRACTID, &kNS_MSGPROGRESS_CID },
{ NS_SPAMSETTINGS_CONTRACTID, &kNS_SPAMSETTINGS_CID },
{ NS_CIDPROTOCOLHANDLER_CONTRACTID, &kNS_CIDPROTOCOL_CID },
{ NS_MSGTAGSERVICE_CONTRACTID, &kNS_MSGTAGSERVICE_CID },
{ NS_MSGNOTIFICATIONSERVICE_CONTRACTID, &kNS_MSGNOTIFICATIONSERVICE_CID },
#ifdef XP_WIN
{ NS_MESSENGEROSINTEGRATION_CONTRACTID, &kNS_MESSENGERWININTEGRATION_CID },
#endif
#ifdef XP_OS2
{ NS_MESSENGEROSINTEGRATION_CONTRACTID, &kNS_MESSENGEROS2INTEGRATION_CID },
#endif
#ifdef XP_MACOSX
{ NS_MESSENGEROSINTEGRATION_CONTRACTID, &kNS_MESSENGEROSXINTEGRATION_CID },
#endif
#if defined(MOZ_WIDGET_GTK) || defined(MOZ_WIDGET_GTK2)
{ NS_MESSENGEROSINTEGRATION_CONTRACTID, &kNS_MESSENGERUNIXINTEGRATION_CID },
#endif
{ NS_MESSENGERCONTENTHANDLER_CONTRACTID, &kNS_MESSENGERCONTENTHANDLER_CID },
{ NS_MSGCONTENTPOLICY_CONTRACTID, &kNS_MSGCONTENTPOLICY_CID },
{ NS_MSGSHUTDOWNSERVICE_CONTRACTID, &kNS_MSGSHUTDOWNSERVICE_CID },
{ NS_MAILDIRPROVIDER_CONTRACTID, &kMAILDIRPROVIDER_CID },
{ NS_STOPWATCH_CONTRACTID, &kNS_STOPWATCH_CID },
{ NULL }
};
static const mozilla::Module::CategoryEntry kMailNewsBaseCategories[] = {
{ XPCOM_DIRECTORY_PROVIDER_CATEGORY, "mail-directory-provider", NS_MAILDIRPROVIDER_CONTRACTID },
{ "content-policy", NS_MSGCONTENTPOLICY_CONTRACTID, NS_MSGCONTENTPOLICY_CONTRACTID},
#ifdef XP_MACOSX
{ "app-startup", NS_MESSENGEROSINTEGRATION_CONTRACTID, "service," NS_MESSENGEROSINTEGRATION_CONTRACTID},
#endif
{ NULL }
};
static const mozilla::Module kMailNewsBaseModule = {
mozilla::Module::kVersion,
kMailNewsBaseCIDs,
kMailNewsBaseContracts,
kMailNewsBaseCategories
};
NSMODULE_DEFN(mailnewsbase_provider) = &kMailNewsBaseModule;

Просмотреть файл

@ -10,8 +10,6 @@
#include "windows.h"
#endif
#include "nsIClassInfoImpl.h"
#include "nsStopwatch.h"
#include "nsMemory.h"
@ -27,8 +25,7 @@
* bug 96669 has been integrated.
*/
NS_DECL_CLASSINFO(nsStopwatch)
NS_IMPL_ISUPPORTS1_CI(nsStopwatch, nsIStopwatch)
NS_IMPL_ISUPPORTS1(nsStopwatch, nsIStopwatch)
#ifdef WINCE
#error "WINCE apparently does not provide the clock support we require."

Просмотреть файл

@ -35,6 +35,7 @@
*
* ***** END LICENSE BLOCK ***** */
#include "mozilla/ModuleUtils.h"
#include "msgCore.h"
#include "nsISupports.h"
@ -42,7 +43,6 @@
#include "nsIFactory.h"
#include "nsICategoryManager.h"
#include "nsIGenericFactory.h"
#include "nsIServiceManager.h"
#include "nsServiceManagerUtils.h"
#include "nsIModule.h"
@ -86,122 +86,86 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(nsMailtoUrl)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsURLFetcher)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsMsgCompUtils)
static NS_METHOD
RegisterCommandLineHandler(nsIComponentManager* compMgr, nsIFile* path,
const char *location, const char *type,
const nsModuleComponentInfo *info)
{
nsCOMPtr<nsICategoryManager> catMan (do_GetService(NS_CATEGORYMANAGER_CONTRACTID));
NS_ENSURE_TRUE(catMan, NS_ERROR_FAILURE);
NS_DEFINE_NAMED_CID(NS_MSGCOMPOSE_CID);
NS_DEFINE_NAMED_CID(NS_MSGCOMPOSESERVICE_CID);
NS_DEFINE_NAMED_CID(NS_MSGCOMPOSECONTENTHANDLER_CID);
NS_DEFINE_NAMED_CID(NS_MSGCOMPOSEPARAMS_CID);
NS_DEFINE_NAMED_CID(NS_MSGCOMPOSESENDLISTENER_CID);
NS_DEFINE_NAMED_CID(NS_MSGCOMPOSEPROGRESSPARAMS_CID);
NS_DEFINE_NAMED_CID(NS_MSGCOMPFIELDS_CID);
NS_DEFINE_NAMED_CID(NS_MSGATTACHMENT_CID);
NS_DEFINE_NAMED_CID(NS_MSGSEND_CID);
NS_DEFINE_NAMED_CID(NS_MSGSENDLATER_CID);
NS_DEFINE_NAMED_CID(NS_SMTPSERVICE_CID);
NS_DEFINE_NAMED_CID(NS_SMTPSERVER_CID);
NS_DEFINE_NAMED_CID(NS_SMTPURL_CID);
NS_DEFINE_NAMED_CID(NS_MAILTOURL_CID);
NS_DEFINE_NAMED_CID(NS_MSGQUOTE_CID);
NS_DEFINE_NAMED_CID(NS_MSGQUOTELISTENER_CID);
NS_DEFINE_NAMED_CID(NS_URLFETCHER_CID);
NS_DEFINE_NAMED_CID(NS_MSGCOMPUTILS_CID);
return catMan->AddCategoryEntry("command-line-handler", "m-compose",
NS_MSGCOMPOSESTARTUPHANDLER_CONTRACTID,
PR_TRUE, PR_TRUE, nsnull);
}
static NS_METHOD
UnregisterCommandLineHandler(nsIComponentManager* compMgr, nsIFile* path,
const char *location,
const nsModuleComponentInfo *info)
{
nsCOMPtr<nsICategoryManager> catMan (do_GetService(NS_CATEGORYMANAGER_CONTRACTID));
NS_ENSURE_TRUE(catMan, NS_ERROR_FAILURE);
catMan->DeleteCategoryEntry("command-line-handler", "m-compose",
PR_TRUE);
return NS_OK;
}
////////////////////////////////////////////////////////////
//
////////////////////////////////////////////////////////////
static const nsModuleComponentInfo components[] =
{
{ "Msg Compose",
NS_MSGCOMPOSE_CID,
NS_MSGCOMPOSE_CONTRACTID,
nsMsgComposeConstructor },
{ "Msg Compose Service",
NS_MSGCOMPOSESERVICE_CID,
NS_MSGCOMPOSESERVICE_CONTRACTID,
nsMsgComposeServiceConstructor },
{ "Msg Compose Startup Handler",
NS_MSGCOMPOSESERVICE_CID,
NS_MSGCOMPOSESTARTUPHANDLER_CONTRACTID,
nsMsgComposeServiceConstructor,
RegisterCommandLineHandler,
UnregisterCommandLineHandler },
{ "mailto content handler",
NS_MSGCOMPOSECONTENTHANDLER_CID,
NS_MSGCOMPOSECONTENTHANDLER_CONTRACTID,
nsMsgComposeContentHandlerConstructor },
{ "Msg Compose Parameters",
NS_MSGCOMPOSEPARAMS_CID,
NS_MSGCOMPOSEPARAMS_CONTRACTID,
nsMsgComposeParamsConstructor },
{ "Msg Compose Send Listener",
NS_MSGCOMPOSESENDLISTENER_CID,
NS_MSGCOMPOSESENDLISTENER_CONTRACTID,
nsMsgComposeSendListenerConstructor },
{ "Msg Compose Progress Parameters",
NS_MSGCOMPOSEPROGRESSPARAMS_CID,
NS_MSGCOMPOSEPROGRESSPARAMS_CONTRACTID,
nsMsgComposeProgressParamsConstructor },
{ "Msg Compose Fields",
NS_MSGCOMPFIELDS_CID,
NS_MSGCOMPFIELDS_CONTRACTID,
nsMsgCompFieldsConstructor },
{ "Msg Compose Attachment",
NS_MSGATTACHMENT_CID,
NS_MSGATTACHMENT_CONTRACTID,
nsMsgAttachmentConstructor },
{ "Msg Send",
NS_MSGSEND_CID,
NS_MSGSEND_CONTRACTID,
nsMsgComposeAndSendConstructor },
{ "Msg Send Later",
NS_MSGSENDLATER_CID,
NS_MSGSENDLATER_CONTRACTID,
nsMsgSendLaterConstructor },
{ "SMTP Service",
NS_SMTPSERVICE_CID,
NS_SMTPSERVICE_CONTRACTID,
nsSmtpServiceConstructor },
{ "SMTP Service",
NS_SMTPSERVICE_CID,
NS_MAILTOHANDLER_CONTRACTID,
nsSmtpServiceConstructor },
{ "SMTP Server",
NS_SMTPSERVER_CID,
NS_SMTPSERVER_CONTRACTID,
nsSmtpServerConstructor },
{ "SMTP URL",
NS_SMTPURL_CID,
NS_SMTPURL_CONTRACTID,
nsSmtpUrlConstructor },
{ "MAILTO URL",
NS_MAILTOURL_CID,
NS_MAILTOURL_CONTRACTID,
nsMailtoUrlConstructor },
{ "Msg Quote",
NS_MSGQUOTE_CID,
NS_MSGQUOTE_CONTRACTID,
nsMsgQuoteConstructor },
{ "Msg Quote Listener",
NS_MSGQUOTELISTENER_CID,
NS_MSGQUOTELISTENER_CONTRACTID,
nsMsgQuoteListenerConstructor },
{ "URL Fetcher",
NS_URLFETCHER_CID,
NS_URLFETCHER_CONTRACTID,
nsURLFetcherConstructor },
{ "Msg Compose Utils",
NS_MSGCOMPUTILS_CID,
NS_MSGCOMPUTILS_CONTRACTID,
nsMsgCompUtilsConstructor },
const mozilla::Module::CIDEntry kMsgComposeCIDs[] = {
{ &kNS_MSGCOMPOSE_CID, false, NULL, nsMsgComposeConstructor},
{ &kNS_MSGCOMPOSESERVICE_CID, false, NULL, nsMsgComposeServiceConstructor},
{ &kNS_MSGCOMPOSECONTENTHANDLER_CID, false, NULL, nsMsgComposeContentHandlerConstructor},
{ &kNS_MSGCOMPOSEPARAMS_CID, false, NULL, nsMsgComposeParamsConstructor},
{ &kNS_MSGCOMPOSESENDLISTENER_CID, false, NULL, nsMsgComposeSendListenerConstructor},
{ &kNS_MSGCOMPOSEPROGRESSPARAMS_CID, false, NULL, nsMsgComposeProgressParamsConstructor},
{ &kNS_MSGCOMPFIELDS_CID, false, NULL, nsMsgCompFieldsConstructor},
{ &kNS_MSGATTACHMENT_CID, false, NULL, nsMsgAttachmentConstructor},
{ &kNS_MSGSEND_CID, false, NULL, nsMsgComposeAndSendConstructor},
{ &kNS_MSGSENDLATER_CID, false, NULL, nsMsgSendLaterConstructor},
{ &kNS_SMTPSERVICE_CID, false, NULL, nsSmtpServiceConstructor},
{ &kNS_SMTPSERVER_CID, false, NULL, nsSmtpServerConstructor},
{ &kNS_SMTPURL_CID, false, NULL, nsSmtpUrlConstructor},
{ &kNS_MAILTOURL_CID, false, NULL, nsMailtoUrlConstructor},
{ &kNS_MSGQUOTE_CID, false, NULL, nsMsgQuoteConstructor},
{ &kNS_MSGQUOTELISTENER_CID, false, NULL, nsMsgQuoteListenerConstructor},
{ &kNS_URLFETCHER_CID, false, NULL, nsURLFetcherConstructor},
{ &kNS_MSGCOMPUTILS_CID, false, NULL, nsMsgCompUtilsConstructor},
{ NULL}
};
const mozilla::Module::ContractIDEntry kMsgComposeContracts[] = {
{ NS_MSGCOMPOSE_CONTRACTID, &kNS_MSGCOMPOSE_CID},
{ NS_MSGCOMPOSESERVICE_CONTRACTID, &kNS_MSGCOMPOSESERVICE_CID},
{ NS_MSGCOMPOSESTARTUPHANDLER_CONTRACTID, &kNS_MSGCOMPOSESERVICE_CID},
{ NS_MSGCOMPOSECONTENTHANDLER_CONTRACTID, &kNS_MSGCOMPOSECONTENTHANDLER_CID},
{ NS_MSGCOMPOSEPARAMS_CONTRACTID, &kNS_MSGCOMPOSEPARAMS_CID},
{ NS_MSGCOMPOSESENDLISTENER_CONTRACTID, &kNS_MSGCOMPOSESENDLISTENER_CID},
{ NS_MSGCOMPOSEPROGRESSPARAMS_CONTRACTID, &kNS_MSGCOMPOSEPROGRESSPARAMS_CID},
{ NS_MSGCOMPFIELDS_CONTRACTID, &kNS_MSGCOMPFIELDS_CID},
{ NS_MSGATTACHMENT_CONTRACTID, &kNS_MSGATTACHMENT_CID},
{ NS_MSGSEND_CONTRACTID, &kNS_MSGSEND_CID},
{ NS_MSGSENDLATER_CONTRACTID, &kNS_MSGSENDLATER_CID},
{ NS_SMTPSERVICE_CONTRACTID, &kNS_SMTPSERVICE_CID},
{ NS_MAILTOHANDLER_CONTRACTID, &kNS_SMTPSERVICE_CID},
{ NS_SMTPSERVER_CONTRACTID, &kNS_SMTPSERVER_CID},
{ NS_SMTPURL_CONTRACTID, &kNS_SMTPURL_CID},
{ NS_MAILTOURL_CONTRACTID, &kNS_MAILTOURL_CID},
{ NS_MSGQUOTE_CONTRACTID, &kNS_MSGQUOTE_CID},
{ NS_MSGQUOTELISTENER_CONTRACTID, &kNS_MSGQUOTELISTENER_CID},
{ NS_URLFETCHER_CONTRACTID, &kNS_URLFETCHER_CID},
{ NS_MSGCOMPUTILS_CONTRACTID, &kNS_MSGCOMPUTILS_CID},
{ NULL }
};
static const mozilla::Module::CategoryEntry kMsgComposeCategories[] = {
{ "command-line-handler", "m-compose",
NS_MSGCOMPOSESTARTUPHANDLER_CONTRACTID},
{ NULL }
};
static const mozilla::Module kMsgComposeModule = {
mozilla::Module::kVersion,
kMsgComposeCIDs,
kMsgComposeContracts,
kMsgComposeCategories,
NULL,
NULL,
NULL
};
NSMODULE_DEFN(msg_compose) = &kMsgComposeModule;
NS_IMPL_NSGETMODULE(nsMsgComposeModule, components)

Просмотреть файл

@ -39,7 +39,6 @@
#include "nsIURL.h"
#include "nsIInputStream.h"
#include "nsIOutputStream.h"
#include "nsIGenericFactory.h"
#include "nsIServiceManager.h"
#include "nsIStreamListener.h"
#include "nsIStreamConverter.h"

Просмотреть файл

@ -36,10 +36,10 @@
*
* ***** END LICENSE BLOCK ***** */
#include "mozilla/ModuleUtils.h"
#include "msgCore.h" // for pre-compiled headers...
#include "nsCOMPtr.h"
#include "nsIModule.h"
#include "nsIGenericFactory.h"
#include "nsMsgDBCID.h"
// include files for components this factory creates...
@ -54,25 +54,48 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(nsMsgRetentionSettings)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsMsgDownloadSettings)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsMsgDBService)
// The list of components we register
static const nsModuleComponentInfo msgDB_components[] = {
{ "Mail DB", NS_MAILDB_CID, NS_MAILBOXDB_CONTRACTID, nsMailDatabaseConstructor },
{ "News DB", NS_NEWSDB_CID, NS_NEWSDB_CONTRACTID, nsNewsDatabaseConstructor },
{ "Imap DB", NS_IMAPDB_CID, NS_IMAPDB_CONTRACTID, nsImapMailDatabaseConstructor },
{ "Msg Retention Settings", NS_MSG_RETENTIONSETTINGS_CID,
NS_MSG_RETENTIONSETTINGS_CONTRACTID, nsMsgRetentionSettingsConstructor },
{ "Msg Download Settings", NS_MSG_DOWNLOADSETTINGS_CID,
NS_MSG_DOWNLOADSETTINGS_CONTRACTID, nsMsgDownloadSettingsConstructor },
{ "Msg DB Service", NS_MSGDB_SERVICE_CID, NS_MSGDB_SERVICE_CONTRACTID, nsMsgDBServiceConstructor }
NS_DEFINE_NAMED_CID(NS_MAILDB_CID);
NS_DEFINE_NAMED_CID(NS_NEWSDB_CID);
NS_DEFINE_NAMED_CID(NS_IMAPDB_CID);
NS_DEFINE_NAMED_CID(NS_MSG_RETENTIONSETTINGS_CID);
NS_DEFINE_NAMED_CID(NS_MSG_DOWNLOADSETTINGS_CID);
NS_DEFINE_NAMED_CID(NS_MSGDB_SERVICE_CID);
const mozilla::Module::CIDEntry kMsgDBCIDs[] = {
{ &kNS_MAILDB_CID, false, NULL, nsMailDatabaseConstructor },
{ &kNS_NEWSDB_CID, false, NULL, nsNewsDatabaseConstructor },
{ &kNS_IMAPDB_CID, false, NULL, nsImapMailDatabaseConstructor },
{ &kNS_MSG_RETENTIONSETTINGS_CID, false, NULL, nsMsgRetentionSettingsConstructor },
{ &kNS_MSG_DOWNLOADSETTINGS_CID, false, NULL, nsMsgDownloadSettingsConstructor },
{ &kNS_MSGDB_SERVICE_CID, false, NULL, nsMsgDBServiceConstructor },
{ NULL }
};
const mozilla::Module::ContractIDEntry kMsgDBContracts[] = {
{ NS_MAILBOXDB_CONTRACTID, &kNS_MAILDB_CID },
{ NS_NEWSDB_CONTRACTID, &kNS_NEWSDB_CID },
{ NS_IMAPDB_CONTRACTID, &kNS_IMAPDB_CID },
{ NS_MSG_RETENTIONSETTINGS_CONTRACTID, &kNS_MSG_RETENTIONSETTINGS_CID },
{ NS_MSG_DOWNLOADSETTINGS_CONTRACTID, &kNS_MSG_DOWNLOADSETTINGS_CID },
{ NS_MSGDB_SERVICE_CONTRACTID, &kNS_MSGDB_SERVICE_CID },
{ NULL }
};
static void
msgDBModuleDtor(nsIModule* self)
msgDBModuleDtor()
{
nsMsgDatabase::CleanupCache();
}
NS_IMPL_NSGETMODULE_WITH_DTOR(nsMsgDBModule, msgDB_components, msgDBModuleDtor)
static const mozilla::Module kMsgDBModule = {
mozilla::Module::kVersion,
kMsgDBCIDs,
kMsgDBContracts,
NULL,
NULL,
NULL,
msgDBModuleDtor
};
NSMODULE_DEFN(msgdb) = &kMsgDBModule;

Просмотреть файл

@ -36,11 +36,11 @@
*
* ***** END LICENSE BLOCK ***** */
#include "mozilla/ModuleUtils.h"
#include "nsISupports.h"
#include "nsCOMPtr.h"
#include "nsIFactory.h"
#include "nsIGenericFactory.h"
#include "nsIServiceManager.h"
#include "nsIModule.h"
@ -51,16 +51,26 @@
NS_GENERIC_FACTORY_CONSTRUCTOR(nsBayesianFilter)
NS_DEFINE_NAMED_CID(NS_BAYESIANFILTER_CID);
const mozilla::Module::CIDEntry kBayesianFilterCIDs[] = {
{ &kNS_BAYESIANFILTER_CID, false, NULL, nsBayesianFilterConstructor },
{ NULL }
};
const mozilla::Module::ContractIDEntry kBayesianFilterContracts[] = {
{ NS_BAYESIANFILTER_CONTRACTID, &kNS_BAYESIANFILTER_CID },
{ NULL }
};
/////////////////////////////////////////////////////////////////////////////
//
/////////////////////////////////////////////////////////////////////////////
static const nsModuleComponentInfo components[] =
{
{"Bayesian Filter",
NS_BAYESIANFILTER_CID,
NS_BAYESIANFILTER_CONTRACTID,
nsBayesianFilterConstructor}
static const mozilla::Module kBayesianFilterModule = {
mozilla::Module::kVersion,
kBayesianFilterCIDs,
kBayesianFilterContracts
};
NS_IMPL_NSGETMODULE(nsBayesianFilterModule, components)
NSMODULE_DEFN(bayesianfilter) = &kBayesianFilterModule;

Просмотреть файл

@ -36,11 +36,11 @@
*
* ***** END LICENSE BLOCK ***** */
#include "mozilla/ModuleUtils.h"
#include "nsISupports.h"
#include "nsCOMPtr.h"
#include "nsIFactory.h"
#include "nsIGenericFactory.h"
#include "nsIServiceManager.h"
#include "nsIModule.h"
@ -50,12 +50,26 @@
NS_GENERIC_FACTORY_CONSTRUCTOR(nsFts3Tokenizer)
static const nsModuleComponentInfo components[] =
{
{"FTS3 Tokenizer",
NS_FTS3TOKENIZER_CID,
NS_FTS3TOKENIZER_CONTRACTID,
nsFts3TokenizerConstructor}
NS_DEFINE_NAMED_CID(NS_FTS3TOKENIZER_CID);
const mozilla::Module::CIDEntry kFts3TokenizerCIDs[] = {
{ &kNS_FTS3TOKENIZER_CID, false, NULL, nsFts3TokenizerConstructor },
{ NULL }
};
NS_IMPL_NSGETMODULE(nsFts3TokenizerModule, components)
const mozilla::Module::ContractIDEntry kFts3TokenizerContracts[] = {
{ NS_FTS3TOKENIZER_CONTRACTID, &kNS_FTS3TOKENIZER_CID },
{ NULL }
};
/////////////////////////////////////////////////////////////////////////////
//
/////////////////////////////////////////////////////////////////////////////
static const mozilla::Module kFts3TokenizerModule = {
mozilla::Module::kVersion,
kFts3TokenizerCIDs,
kFts3TokenizerContracts
};
NSMODULE_DEFN(fts3tokenizer) = &kFts3TokenizerModule;

Просмотреть файл

@ -36,11 +36,11 @@
*
* ***** END LICENSE BLOCK ***** */
#include "mozilla/ModuleUtils.h"
#include "nsISupports.h"
#include "nsCOMPtr.h"
#include "nsIFactory.h"
#include "nsIGenericFactory.h"
#include "nsIServiceManager.h"
#include "nsIModule.h"
@ -51,16 +51,26 @@
NS_GENERIC_FACTORY_CONSTRUCTOR(nsMsgMailViewList)
NS_DEFINE_NAMED_CID(NS_MSGMAILVIEWLIST_CID);
const mozilla::Module::CIDEntry kMsgMailViewListCIDs[] = {
{ &kNS_MSGMAILVIEWLIST_CID, false, NULL, nsMsgMailViewListConstructor },
{ NULL }
};
const mozilla::Module::ContractIDEntry kMsgMailViewListContracts[] = {
{ NS_MSGMAILVIEWLIST_CONTRACTID, &kNS_MSGMAILVIEWLIST_CID },
{ NULL }
};
/////////////////////////////////////////////////////////////////////////////
//
/////////////////////////////////////////////////////////////////////////////
static const nsModuleComponentInfo components[] =
{
{"Default Mail List View",
NS_MSGMAILVIEWLIST_CID,
NS_MSGMAILVIEWLIST_CONTRACTID,
nsMsgMailViewListConstructor}
static const mozilla::Module kMsgMailViewListModule = {
mozilla::Module::kVersion,
kMsgMailViewListCIDs,
kMsgMailViewListContracts
};
NS_IMPL_NSGETMODULE(nsMsgMailViewModule, components)
NSMODULE_DEFN(msgmailviewlist) = &kMsgMailViewListModule;

Просмотреть файл

@ -36,11 +36,11 @@
*
* ***** END LICENSE BLOCK ***** */
#include "mozilla/ModuleUtils.h"
#include "nsISupports.h"
#include "nsCOMPtr.h"
#include "nsIFactory.h"
#include "nsIGenericFactory.h"
#include "nsIServiceManager.h"
#include "nsIModule.h"
@ -51,16 +51,27 @@
NS_GENERIC_FACTORY_CONSTRUCTOR(nsMsgMdnGenerator)
NS_DEFINE_NAMED_CID(NS_MSGMDNGENERATOR_CID);
const mozilla::Module::CIDEntry kMdnGeneratorCIDs[] = {
{ &kNS_MSGMDNGENERATOR_CID, false, NULL, nsMsgMdnGeneratorConstructor },
{ NULL }
};
const mozilla::Module::ContractIDEntry kMdnGeneratorContracts[] = {
{ NS_MSGMDNGENERATOR_CONTRACTID, &kNS_MSGMDNGENERATOR_CID },
{ NULL }
};
/////////////////////////////////////////////////////////////////////////////
//
/////////////////////////////////////////////////////////////////////////////
static const nsModuleComponentInfo components[] =
{
{"Msg Mdn Generator",
NS_MSGMDNGENERATOR_CID,
NS_MSGMDNGENERATOR_CONTRACTID,
nsMsgMdnGeneratorConstructor}
static const mozilla::Module kMdnGeneratorModule = {
mozilla::Module::kVersion,
kMdnGeneratorCIDs,
kMdnGeneratorContracts
};
NS_IMPL_NSGETMODULE(nsMsgMdnModule, components)
NSMODULE_DEFN(mdngenerator) = &kMdnGeneratorModule;

Просмотреть файл

@ -36,11 +36,11 @@
*
* ***** END LICENSE BLOCK ***** */
#include "mozilla/ModuleUtils.h"
#include "nsISupports.h"
#include "nsCOMPtr.h"
#include "nsIFactory.h"
#include "nsIGenericFactory.h"
#include "nsIServiceManager.h"
#include "nsIModule.h"
@ -58,29 +58,35 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(nsMsgSMIMEComposeFields)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsSMimeJSHelper)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsEncryptedSMIMEURIsService)
////////////////////////////////////////////////////////////
//
////////////////////////////////////////////////////////////
NS_DEFINE_NAMED_CID(NS_MSGCOMPOSESECURE_CID);
NS_DEFINE_NAMED_CID(NS_MSGSMIMECOMPFIELDS_CID);
NS_DEFINE_NAMED_CID(NS_SMIMEJSJELPER_CID);
NS_DEFINE_NAMED_CID(NS_SMIMEENCRYPTURISERVICE_CID);
static const nsModuleComponentInfo components[] =
{
{ "Msg Compose Secure",
NS_MSGCOMPOSESECURE_CID,
NS_MSGCOMPOSESECURE_CONTRACTID,
nsMsgComposeSecureConstructor },
{ "Msg SMIME Compose Fields",
NS_MSGSMIMECOMPFIELDS_CID,
NS_MSGSMIMECOMPFIELDS_CONTRACTID,
nsMsgSMIMEComposeFieldsConstructor },
{ "SMIME JS Helper",
NS_SMIMEJSJELPER_CID,
NS_SMIMEJSHELPER_CONTRACTID,
nsSMimeJSHelperConstructor },
{ "SMIME Encrypted URI Cache Service",
NS_SMIMEENCRYPTURISERVICE_CID,
NS_SMIMEENCRYPTURISERVICE_CONTRACTID,
nsEncryptedSMIMEURIsServiceConstructor }
const mozilla::Module::CIDEntry kMsgSMIMECIDs[] = {
{ &kNS_MSGCOMPOSESECURE_CID, false, NULL, nsMsgComposeSecureConstructor },
{ &kNS_MSGSMIMECOMPFIELDS_CID, false, NULL, nsMsgSMIMEComposeFieldsConstructor },
{ &kNS_SMIMEJSJELPER_CID, false, NULL, nsSMimeJSHelperConstructor },
{ &kNS_SMIMEENCRYPTURISERVICE_CID, false, NULL, nsEncryptedSMIMEURIsServiceConstructor },
{ NULL }
};
const mozilla::Module::ContractIDEntry kMsgSMIMEContracts[] = {
{ NS_MSGCOMPOSESECURE_CONTRACTID, &kNS_MSGCOMPOSESECURE_CID },
{ NS_MSGSMIMECOMPFIELDS_CONTRACTID, &kNS_MSGSMIMECOMPFIELDS_CID },
{ NS_SMIMEJSHELPER_CONTRACTID, &kNS_SMIMEJSJELPER_CID },
{ NS_SMIMEENCRYPTURISERVICE_CONTRACTID, &kNS_SMIMEENCRYPTURISERVICE_CID },
{ NULL }
};
NS_IMPL_NSGETMODULE(nsMsgSMIMEModule, components)
/////////////////////////////////////////////////////////////////////////////
//
/////////////////////////////////////////////////////////////////////////////
static const mozilla::Module kMsgSMIMEModule = {
mozilla::Module::kVersion,
kMsgSMIMECIDs,
kMsgSMIMEContracts
};
NSMODULE_DEFN(msgsmime) = &kMsgSMIMEModule;

Просмотреть файл

@ -38,8 +38,7 @@
#include "msgCore.h" // for pre-compiled headers...
#include "nsCOMPtr.h"
#include "nsIModule.h"
#include "nsIGenericFactory.h"
#include "mozilla/ModuleUtils.h"
#include "nsIMAPHostSessionList.h"
#include "nsImapIncomingServer.h"
@ -61,53 +60,48 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(nsImapMailFolder)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsImapMockChannel)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsAutoSyncManager)
// The list of components we register
static const nsModuleComponentInfo gComponents[] = {
{ "IMAP URL", NS_IMAPURL_CID,
nsnull, nsImapUrlConstructor },
NS_DEFINE_NAMED_CID(NS_IMAPURL_CID);
NS_DEFINE_NAMED_CID(NS_IMAPPROTOCOL_CID);
NS_DEFINE_NAMED_CID(NS_IMAPMOCKCHANNEL_CID);
NS_DEFINE_NAMED_CID(NS_IIMAPHOSTSESSIONLIST_CID);
NS_DEFINE_NAMED_CID(NS_IMAPINCOMINGSERVER_CID);
NS_DEFINE_NAMED_CID(NS_IMAPRESOURCE_CID);
NS_DEFINE_NAMED_CID(NS_IMAPSERVICE_CID);
NS_DEFINE_NAMED_CID(NS_AUTOSYNCMANAGER_CID);
{ "IMAP Protocol Channel", NS_IMAPPROTOCOL_CID,
nsnull, nsImapProtocolConstructor },
{ "IMAP Mock Channel", NS_IMAPMOCKCHANNEL_CID,
nsnull, nsImapMockChannelConstructor },
{ "IMAP Host Session List", NS_IIMAPHOSTSESSIONLIST_CID,
nsnull, nsIMAPHostSessionListConstructor },
{ "IMAP Incoming Server", NS_IMAPINCOMINGSERVER_CID,
NS_IMAPINCOMINGSERVER_CONTRACTID, nsImapIncomingServerConstructor },
{ "Mail/News IMAP Resource Factory", NS_IMAPRESOURCE_CID,
NS_RDF_RESOURCE_FACTORY_CONTRACTID_PREFIX "imap",
nsImapMailFolderConstructor },
{ "IMAP Service", NS_IMAPSERVICE_CID,
"@mozilla.org/messenger/messageservice;1?type=imap-message",
nsImapServiceConstructor },
{ "IMAP Service", NS_IMAPSERVICE_CID,
"@mozilla.org/messenger/messageservice;1?type=imap",
nsImapServiceConstructor },
{ "IMAP Service", NS_IMAPSERVICE_CID,
NS_IMAPSERVICE_CONTRACTID,
nsImapServiceConstructor },
{ "IMAP Protocol Handler", NS_IMAPSERVICE_CID,
NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "imap", nsImapServiceConstructor},
{ "IMAP Protocol Handler", NS_IMAPSERVICE_CID,
NS_IMAPPROTOCOLINFO_CONTRACTID, nsImapServiceConstructor },
{ "imap folder content handler",
NS_IMAPSERVICE_CID,
NS_CONTENT_HANDLER_CONTRACTID_PREFIX"x-application-imapfolder",
nsImapServiceConstructor },
{ "Auto-Sync Manager", NS_AUTOSYNCMANAGER_CID,
NS_AUTOSYNCMANAGER_CONTRACTID,
nsAutoSyncManagerConstructor }
const mozilla::Module::CIDEntry kIMAPCIDs[] = {
{ &kNS_IMAPURL_CID, false, NULL, nsImapUrlConstructor },
{ &kNS_IMAPPROTOCOL_CID, false, nsnull, nsImapProtocolConstructor },
{ &kNS_IMAPMOCKCHANNEL_CID, false, nsnull, nsImapMockChannelConstructor },
{ &kNS_IIMAPHOSTSESSIONLIST_CID, false, nsnull, nsIMAPHostSessionListConstructor },
{ &kNS_IMAPINCOMINGSERVER_CID, false, nsnull, nsImapIncomingServerConstructor },
{ &kNS_IMAPRESOURCE_CID, false, nsnull, nsImapMailFolderConstructor },
{ &kNS_IMAPSERVICE_CID, false, nsnull, nsImapServiceConstructor },
{ &kNS_AUTOSYNCMANAGER_CID, false, nsnull, nsAutoSyncManagerConstructor },
{ NULL }
};
NS_IMPL_NSGETMODULE(IMAP_factory, gComponents)
const mozilla::Module::ContractIDEntry kIMAPContracts[] = {
{ NS_IMAPINCOMINGSERVER_CONTRACTID, &kNS_IMAPINCOMINGSERVER_CID},
{ NS_RDF_RESOURCE_FACTORY_CONTRACTID_PREFIX "imap", &kNS_IMAPRESOURCE_CID},
{ "@mozilla.org/messenger/messageservice;1?type=imap-message", &kNS_IMAPSERVICE_CID},
{ "@mozilla.org/messenger/messageservice;1?type=imap", &kNS_IMAPSERVICE_CID},
{ NS_IMAPSERVICE_CONTRACTID, &kNS_IMAPSERVICE_CID},
{ NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "imap", &kNS_IMAPSERVICE_CID},
{ NS_IMAPPROTOCOLINFO_CONTRACTID, &kNS_IMAPSERVICE_CID},
{ NS_CONTENT_HANDLER_CONTRACTID_PREFIX"x-application-imapfolder", &kNS_IMAPSERVICE_CID},
{ NS_AUTOSYNCMANAGER_CONTRACTID, &kNS_AUTOSYNCMANAGER_CID},
{ NULL }
};
/////////////////////////////////////////////////////////////////////////////
//
/////////////////////////////////////////////////////////////////////////////
static const mozilla::Module kIMAPModule = {
mozilla::Module::kVersion,
kIMAPCIDs,
kIMAPContracts
};
NSMODULE_DEFN(imap) = &kIMAPModule;

Просмотреть файл

@ -39,8 +39,7 @@
* ***** END LICENSE BLOCK ***** */
#include "msgCore.h" // for pre-compiled headers...
#include "nsIModule.h"
#include "nsIGenericFactory.h"
#include "mozilla/ModuleUtils.h"
#include "nsMsgLocalCID.h"
// include files for components this factory creates...
@ -82,80 +81,83 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(nsNoIncomingServer)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsRssService)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsRssIncomingServer)
// The list of components we register
static const nsModuleComponentInfo gComponents[] = {
{ "Mailbox URL", NS_MAILBOXURL_CID,
NS_MAILBOXURL_CONTRACTID, nsMailboxUrlConstructor },
{ "Mailbox Service", NS_MAILBOXSERVICE_CID,
NS_MAILBOXSERVICE_CONTRACTID1, nsMailboxServiceConstructor },
{ "Mailbox Service", NS_MAILBOXSERVICE_CID,
NS_MAILBOXSERVICE_CONTRACTID2, nsMailboxServiceConstructor },
{ "Mailbox Service", NS_MAILBOXSERVICE_CID,
NS_MAILBOXSERVICE_CONTRACTID3, nsMailboxServiceConstructor },
{ "Mailbox Protocol Handler", NS_MAILBOXSERVICE_CID,
NS_MAILBOXSERVICE_CONTRACTID4, nsMailboxServiceConstructor },
{ "Mailbox Parser", NS_MAILBOXPARSER_CID,
NS_MAILBOXPARSER_CONTRACTID, nsMsgMailboxParserConstructor },
{ "Pop3 URL", NS_POP3URL_CID,
NS_POP3URL_CONTRACTID, nsPop3URLConstructor },
{ "Pop3 Service", NS_POP3SERVICE_CID,
NS_POP3SERVICE_CONTRACTID1, nsPop3ServiceConstructor },
{ "POP Protocol Handler", NS_POP3SERVICE_CID,
NS_POP3SERVICE_CONTRACTID2, nsPop3ServiceConstructor },
{ "None Service", NS_NONESERVICE_CID,
NS_NONESERVICE_CONTRACTID, nsNoneServiceConstructor },
NS_DEFINE_NAMED_CID(NS_MAILBOXURL_CID);
NS_DEFINE_NAMED_CID(NS_MAILBOXSERVICE_CID);
NS_DEFINE_NAMED_CID(NS_MAILBOXPARSER_CID);
NS_DEFINE_NAMED_CID(NS_POP3URL_CID);
NS_DEFINE_NAMED_CID(NS_POP3SERVICE_CID);
NS_DEFINE_NAMED_CID(NS_NONESERVICE_CID);
#ifdef HAVE_MOVEMAIL
{ "Movemail Service", NS_MOVEMAILSERVICE_CID,
NS_MOVEMAILSERVICE_CONTRACTID, nsMovemailServiceConstructor },
NS_DEFINE_NAMED_CID(NS_MOVEMAILSERVICE_CID);
#endif /* HAVE_MOVEMAIL */
{ "pop3 Protocol Information", NS_POP3SERVICE_CID,
NS_POP3PROTOCOLINFO_CONTRACTID, nsPop3ServiceConstructor },
{ "none Protocol Information", NS_NONESERVICE_CID,
NS_NONEPROTOCOLINFO_CONTRACTID, nsNoneServiceConstructor },
NS_DEFINE_NAMED_CID(NS_LOCALMAILFOLDERRESOURCE_CID);
NS_DEFINE_NAMED_CID(NS_POP3INCOMINGSERVER_CID);
#ifdef HAVE_MOVEMAIL
{ "movemail Protocol Information", NS_MOVEMAILSERVICE_CID,
NS_MOVEMAILPROTOCOLINFO_CONTRACTID, nsMovemailServiceConstructor },
NS_DEFINE_NAMED_CID(NS_MOVEMAILINCOMINGSERVER_CID);
#endif /* HAVE_MOVEMAIL */
NS_DEFINE_NAMED_CID(NS_NOINCOMINGSERVER_CID);
NS_DEFINE_NAMED_CID(NS_PARSEMAILMSGSTATE_CID);
NS_DEFINE_NAMED_CID(NS_RSSSERVICE_CID);
NS_DEFINE_NAMED_CID(NS_RSSINCOMINGSERVER_CID);
{ "Local Mail Folder Resource Factory", NS_LOCALMAILFOLDERRESOURCE_CID,
NS_LOCALMAILFOLDERRESOURCE_CONTRACTID, nsMsgLocalMailFolderConstructor },
{ "Pop3 Incoming Server", NS_POP3INCOMINGSERVER_CID,
NS_POP3INCOMINGSERVER_CONTRACTID, nsPop3IncomingServerConstructor },
const mozilla::Module::CIDEntry kMsgLocalCIDs[] = {
{ &kNS_MAILBOXURL_CID, false, NULL, nsMailboxUrlConstructor },
{ &kNS_MAILBOXSERVICE_CID, false, NULL, nsMailboxServiceConstructor },
{ &kNS_MAILBOXPARSER_CID, false, NULL, nsMsgMailboxParserConstructor },
{ &kNS_POP3URL_CID, false, NULL, nsPop3URLConstructor },
{ &kNS_POP3SERVICE_CID, false, NULL, nsPop3ServiceConstructor },
{ &kNS_NONESERVICE_CID, false, NULL, nsNoneServiceConstructor },
#ifdef HAVE_MOVEMAIL
{ "Movemail Incoming Server", NS_MOVEMAILINCOMINGSERVER_CID,
NS_MOVEMAILINCOMINGSERVER_CONTRACTID, nsMovemailIncomingServerConstructor },
{ &kNS_MOVEMAILSERVICE_CID, false, NULL, nsMovemailServiceConstructor },
#endif /* HAVE_MOVEMAIL */
{ "No Incoming Server", NS_NOINCOMINGSERVER_CID,
NS_NOINCOMINGSERVER_CONTRACTID, nsNoIncomingServerConstructor },
{ "Parse MailMessage State", NS_PARSEMAILMSGSTATE_CID,
NS_PARSEMAILMSGSTATE_CONTRACTID, nsParseMailMessageStateConstructor },
{ "RSS Service", NS_RSSSERVICE_CID,
NS_RSSSERVICE_CONTRACTID, nsRssServiceConstructor },
{ "RSS Protocol Information", NS_RSSSERVICE_CID,
NS_RSSPROTOCOLINFO_CONTRACTID, nsRssServiceConstructor },
{ "RSS Incoming Server", NS_RSSINCOMINGSERVER_CID,
NS_RSSINCOMINGSERVER_CONTRACTID, nsRssIncomingServerConstructor },
{ &kNS_LOCALMAILFOLDERRESOURCE_CID, false, NULL, nsMsgLocalMailFolderConstructor },
{ &kNS_POP3INCOMINGSERVER_CID, false, NULL, nsPop3IncomingServerConstructor },
#ifdef HAVE_MOVEMAIL
{ &kNS_MOVEMAILINCOMINGSERVER_CID, false, NULL, nsMovemailIncomingServerConstructor },
#endif /* HAVE_MOVEMAIL */
{ &kNS_NOINCOMINGSERVER_CID, false, NULL, nsNoIncomingServerConstructor },
{ &kNS_PARSEMAILMSGSTATE_CID, false, NULL, nsParseMailMessageStateConstructor },
{ &kNS_RSSSERVICE_CID, false, NULL, nsRssServiceConstructor },
{ &kNS_RSSINCOMINGSERVER_CID, false, NULL, nsRssIncomingServerConstructor },
{ NULL }
};
NS_IMPL_NSGETMODULE(local_mail_services, gComponents)
const mozilla::Module::ContractIDEntry kMsgLocalContracts[] = {
{ NS_MAILBOXURL_CONTRACTID, &kNS_MAILBOXURL_CID},
{ NS_MAILBOXSERVICE_CONTRACTID1, &kNS_MAILBOXSERVICE_CID},
{ NS_MAILBOXSERVICE_CONTRACTID2, &kNS_MAILBOXSERVICE_CID},
{ NS_MAILBOXSERVICE_CONTRACTID3, &kNS_MAILBOXSERVICE_CID},
{ NS_MAILBOXSERVICE_CONTRACTID4, &kNS_MAILBOXSERVICE_CID},
{ NS_MAILBOXPARSER_CONTRACTID, &kNS_MAILBOXPARSER_CID },
{ NS_POP3URL_CONTRACTID, &kNS_POP3URL_CID},
{ NS_POP3SERVICE_CONTRACTID1, &kNS_POP3SERVICE_CID},
{ NS_POP3SERVICE_CONTRACTID2, &kNS_POP3SERVICE_CID},
{ NS_NONESERVICE_CONTRACTID, &kNS_NONESERVICE_CID},
#ifdef HAVE_MOVEMAIL
{ NS_MOVEMAILSERVICE_CONTRACTID, &kNS_MOVEMAILSERVICE_CID},
#endif /* HAVE_MOVEMAIL */
{ NS_POP3PROTOCOLINFO_CONTRACTID, &kNS_POP3SERVICE_CID},
{ NS_NONEPROTOCOLINFO_CONTRACTID, &kNS_NONESERVICE_CID},
#ifdef HAVE_MOVEMAIL
{ NS_MOVEMAILPROTOCOLINFO_CONTRACTID, &kNS_MOVEMAILSERVICE_CID},
#endif /* HAVE_MOVEMAIL */
{ NS_LOCALMAILFOLDERRESOURCE_CONTRACTID, &kNS_LOCALMAILFOLDERRESOURCE_CID},
{ NS_POP3INCOMINGSERVER_CONTRACTID, &kNS_POP3INCOMINGSERVER_CID},
#ifdef HAVE_MOVEMAIL
{ NS_MOVEMAILINCOMINGSERVER_CONTRACTID, &kNS_MOVEMAILINCOMINGSERVER_CID},
#endif /* HAVE_MOVEMAIL */
{ NS_NOINCOMINGSERVER_CONTRACTID, &kNS_NOINCOMINGSERVER_CID},
{ NS_PARSEMAILMSGSTATE_CONTRACTID, &kNS_PARSEMAILMSGSTATE_CID},
{ NS_RSSSERVICE_CONTRACTID, &kNS_RSSSERVICE_CID},
{ NS_RSSPROTOCOLINFO_CONTRACTID, &kNS_RSSSERVICE_CID},
{ NS_RSSINCOMINGSERVER_CONTRACTID, &kNS_RSSINCOMINGSERVER_CID},
{NULL }
};
static const mozilla::Module kMsgLocalModule = {
mozilla::Module::kVersion,
kMsgLocalCIDs,
kMsgLocalContracts,
};
NSMODULE_DEFN(msglocal) = &kMsgLocalModule;

Просмотреть файл

@ -38,7 +38,7 @@
#include "objbase.h"
#include "nsISupports.h"
#include "nsIGenericFactory.h"
#include "mozilla/ModuleUtils.h"
#include "nsIObserverService.h"
#include "nsIAppStartupNotifier.h"
#include "nsIServiceManager.h"
@ -55,22 +55,6 @@
NS_IMPL_THREADSAFE_ISUPPORTS2(nsMapiSupport, nsIMapiSupport, nsIObserver)
static NS_METHOD nsMapiRegistrationProc(nsIComponentManager *aCompMgr,
nsIFile *aPath, const char *registryLocation, const char *componentType,
const nsModuleComponentInfo *info)
{
nsresult rv;
nsCOMPtr<nsICategoryManager> categoryManager(do_GetService(NS_CATEGORYMANAGER_CONTRACTID, &rv));
if (NS_SUCCEEDED(rv))
rv = categoryManager->AddCategoryEntry(APPSTARTUP_CATEGORY, "Mapi Support",
"service," NS_IMAPISUPPORT_CONTRACTID, PR_TRUE, PR_TRUE, nsnull);
return rv ;
}
NS_IMETHODIMP
nsMapiSupport::Observe(nsISupports *aSubject, const char *aTopic, const PRUnichar *aData)
{
@ -167,20 +151,32 @@ nsMapiSupport::UnRegisterServer()
return NS_OK;
}
NS_DEFINE_NAMED_CID(NS_IMAPISUPPORT_CID);
NS_GENERIC_FACTORY_CONSTRUCTOR(nsMapiSupport)
// The list of components we register
static const nsModuleComponentInfo components[] =
{
{
NS_IMAPISUPPORT_CLASSNAME,
NS_IMAPISUPPORT_CID,
NS_IMAPISUPPORT_CONTRACTID,
nsMapiSupportConstructor,
nsMapiRegistrationProc,
nsnull
}
static const mozilla::Module::CategoryEntry kMAPICategories[] = {
{ APPSTARTUP_CATEGORY, "Mapi Support", "service," NS_IMAPISUPPORT_CONTRACTID, },
{ NULL }
};
NS_IMPL_NSGETMODULE(msgMapiModule, components)
const mozilla::Module::CIDEntry kMAPICIDs[] = {
{ &kNS_IMAPISUPPORT_CID, false, NULL, nsMapiSupportConstructor },
{ NULL }
};
const mozilla::Module::ContractIDEntry kMAPIContracts[] = {
{ NS_IMAPISUPPORT_CONTRACTID, &kNS_IMAPISUPPORT_CID },
{ NULL }
};
static const mozilla::Module kMAPIModule = {
mozilla::Module::kVersion,
kMAPICIDs,
kMAPIContracts,
kMAPICategories
};
NSMODULE_DEFN(mapi) = &kMAPIModule;

Просмотреть файл

@ -36,8 +36,7 @@
*
* ***** END LICENSE BLOCK ***** */
#include "nsIModule.h"
#include "nsIGenericFactory.h"
#include "mozilla/ModuleUtils.h"
#include "nsMsgMimeCID.h"
#include "nsCOMPtr.h"
@ -56,37 +55,36 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(nsStreamConverter)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsMsgHeaderParser)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsMimeHeaders)
// Destructor for stream converter
static NS_IMETHODIMP streamConverterDestructor()
{
return NS_OK;
}
NS_DEFINE_NAMED_CID(NS_MIME_OBJECT_CLASS_ACCESS_CID);
NS_DEFINE_NAMED_CID(NS_MIME_CONVERTER_CID);
NS_DEFINE_NAMED_CID(NS_MSGHEADERPARSER_CID);
NS_DEFINE_NAMED_CID(NS_MAILNEWS_MIME_STREAM_CONVERTER_CID);
NS_DEFINE_NAMED_CID(NS_IMIMEHEADERS_CID);
// The list of components we register
static const nsModuleComponentInfo gComponents[] = {
{ "MimeObjectClassAccess", NS_MIME_OBJECT_CLASS_ACCESS_CID,
nsnull, nsMimeObjectClassAccessConstructor },
{ "Mime Converter", NS_MIME_CONVERTER_CID,
NS_MIME_CONVERTER_CONTRACTID, nsMimeConverterConstructor },
{ "Msg Header Parser", NS_MSGHEADERPARSER_CID,
NS_MAILNEWS_MIME_HEADER_PARSER_CONTRACTID, nsMsgHeaderParserConstructor },
{ "Mailnews Mime Stream Converter", NS_MAILNEWS_MIME_STREAM_CONVERTER_CID,
NS_MAILNEWS_MIME_STREAM_CONVERTER_CONTRACTID,
nsStreamConverterConstructor, 0, 0, streamConverterDestructor },
{ "Mailnews Mime Stream Converter", NS_MAILNEWS_MIME_STREAM_CONVERTER_CID,
NS_MAILNEWS_MIME_STREAM_CONVERTER_CONTRACTID1,
nsStreamConverterConstructor, 0, 0, streamConverterDestructor },
{ "Mailnews Mime Stream Converter", NS_MAILNEWS_MIME_STREAM_CONVERTER_CID,
NS_MAILNEWS_MIME_STREAM_CONVERTER_CONTRACTID2,
nsStreamConverterConstructor, 0, 0, streamConverterDestructor },
{ "Mime Headers", NS_IMIMEHEADERS_CID,
NS_IMIMEHEADERS_CONTRACTID, nsMimeHeadersConstructor }
const mozilla::Module::CIDEntry kMimeCIDs[] = {
{ &kNS_MIME_OBJECT_CLASS_ACCESS_CID, false, NULL, nsMimeObjectClassAccessConstructor },
{ &kNS_MIME_CONVERTER_CID, false, NULL, nsMimeConverterConstructor },
{ &kNS_MSGHEADERPARSER_CID, false, NULL, nsMsgHeaderParserConstructor },
{ &kNS_MAILNEWS_MIME_STREAM_CONVERTER_CID, false, NULL, nsStreamConverterConstructor },
{ &kNS_IMIMEHEADERS_CID, false, NULL, nsMimeHeadersConstructor },
{ NULL }
};
NS_IMPL_NSGETMODULE(mime_services, gComponents)
const mozilla::Module::ContractIDEntry kMimeContracts[] = {
{ NS_MIME_OBJECT_CONTRACTID, &kNS_MIME_OBJECT_CLASS_ACCESS_CID},
{ NS_MIME_CONVERTER_CONTRACTID, &kNS_MIME_CONVERTER_CID},
{ NS_MAILNEWS_MIME_HEADER_PARSER_CONTRACTID, &kNS_MSGHEADERPARSER_CID},
{ NS_MAILNEWS_MIME_STREAM_CONVERTER_CONTRACTID, &kNS_MAILNEWS_MIME_STREAM_CONVERTER_CID},
{ NS_MAILNEWS_MIME_STREAM_CONVERTER_CONTRACTID1, &kNS_MAILNEWS_MIME_STREAM_CONVERTER_CID},
{ NS_MAILNEWS_MIME_STREAM_CONVERTER_CONTRACTID2, &kNS_MAILNEWS_MIME_STREAM_CONVERTER_CID},
{ NS_IMIMEHEADERS_CONTRACTID, &kNS_IMIMEHEADERS_CID},
{ NULL }
};
static const mozilla::Module kMimeModule = {
mozilla::Module::kVersion,
kMimeCIDs,
kMimeContracts
};
NSMODULE_DEFN(mime) = &kMimeModule;

Просмотреть файл

@ -35,7 +35,7 @@
*
* ***** END LICENSE BLOCK ***** */
#include "nsIGenericFactory.h"
#include "mozilla/ModuleUtils.h"
/* Include all of the interfaces our factory can generate components for */
#include "nsMimeContentTypeHandler.h"
@ -46,6 +46,8 @@
*/
#define VCARD_CONTENT_TYPE "text/x-vcard"
NS_DEFINE_NAMED_CID(NS_VCARD_CONTENT_TYPE_HANDLER_CID);
////////////////////////////////////////////////////////////////////////
// Define the contructor function for the CID
//
@ -60,7 +62,7 @@ extern "C" MimeObjectClass *
MIME_VCardCreateContentTypeHandlerClass(const char *content_type,
contentTypeHandlerInitStruct *initStruct);
static NS_IMETHODIMP
static nsresult
nsVCardMimeContentTypeHandlerConstructor(nsISupports *aOuter,
REFNSIID aIID,
void **aResult)
@ -89,20 +91,25 @@ nsVCardMimeContentTypeHandlerConstructor(nsISupports *aOuter,
return rv;
}
////////////////////////////////////////////////////////////////////////
// Define a table of CIDs implemented by this module along with other
// information like the function to create an instance, contractid, and
// class name.
//
static const nsModuleComponentInfo components[] =
{
{ "MIME VCard Handler", NS_VCARD_CONTENT_TYPE_HANDLER_CID, "@mozilla.org/mimecth;1?type=text/x-vcard",
nsVCardMimeContentTypeHandlerConstructor, }
const mozilla::Module::CIDEntry kVCardCIDs[] = {
{ &kNS_VCARD_CONTENT_TYPE_HANDLER_CID, false, NULL, nsVCardMimeContentTypeHandlerConstructor},
{ NULL }
};
////////////////////////////////////////////////////////////////////////
// Implement the NSGetModule() exported function for your module
// and the entire implementation of the module object.
//
NS_IMPL_NSGETMODULE(nsVCardModule, components)
const mozilla::Module::ContractIDEntry kVCardContracts[] = {
{ "@mozilla.org/mimecth;1?type=text/x-vcard", &kNS_VCARD_CONTENT_TYPE_HANDLER_CID},
{ NULL }
};
static const mozilla::Module kVCardModule = {
mozilla::Module::kVersion,
kVCardCIDs,
kVCardContracts,
NULL,
NULL,
NULL,
NULL
};
NSMODULE_DEFN(vcard) = &kVCardModule;

Просмотреть файл

@ -41,9 +41,7 @@
#include "nsCOMPtr.h"
#include "pratom.h"
#include "nsServiceManagerUtils.h"
#include "nsIGenericFactory.h"
#include "nsIModule.h"
#include "nsICategoryManager.h"
#include "mozilla/ModuleUtils.h"
/* Include all of the interfaces our factory can generate components for */
#include "nsMimeEmitterCID.h"
@ -58,58 +56,40 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(nsMimeXmlEmitter)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsMimePlainEmitter)
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsMimeHtmlDisplayEmitter, Init)
NS_DEFINE_NAMED_CID(NS_HTML_MIME_EMITTER_CID);
NS_DEFINE_NAMED_CID(NS_XML_MIME_EMITTER_CID);
NS_DEFINE_NAMED_CID(NS_PLAIN_MIME_EMITTER_CID);
NS_DEFINE_NAMED_CID(NS_RAW_MIME_EMITTER_CID);
static NS_METHOD RegisterMimeEmitter(nsIComponentManager *aCompMgr, nsIFile *aPath, const char *registryLocation,
const char *componentType, const nsModuleComponentInfo *info)
{
nsresult rv;
nsCOMPtr<nsICategoryManager> catman = do_GetService(NS_CATEGORYMANAGER_CONTRACTID, &rv);
if (NS_FAILED(rv)) return rv;
nsCString previous;
return catman->AddCategoryEntry("mime-emitter", info->mContractID, info->mContractID,
PR_TRUE, PR_TRUE, getter_Copies(previous));
}
static NS_METHOD UnRegisterMimeEmitter(nsIComponentManager *aCompMgr,
nsIFile *aPath,
const char *registryLocation,
const nsModuleComponentInfo *info)
{
// do we need to unregister our category entries??
return NS_OK;
}
static const nsModuleComponentInfo components[] =
{
{ "HTML MIME Emitter",
NS_HTML_MIME_EMITTER_CID,
NS_HTML_MIME_EMITTER_CONTRACTID,
nsMimeHtmlDisplayEmitterConstructor,
RegisterMimeEmitter,
UnRegisterMimeEmitter
},
{ "XML MIME Emitter",
NS_XML_MIME_EMITTER_CID,
NS_XML_MIME_EMITTER_CONTRACTID,
nsMimeXmlEmitterConstructor,
RegisterMimeEmitter,
UnRegisterMimeEmitter
},
{ "PLAIN MIME Emitter",
NS_PLAIN_MIME_EMITTER_CID,
NS_PLAIN_MIME_EMITTER_CONTRACTID,
nsMimePlainEmitterConstructor,
RegisterMimeEmitter,
UnRegisterMimeEmitter
},
{ "RAW MIME Emitter",
NS_RAW_MIME_EMITTER_CID,
NS_RAW_MIME_EMITTER_CONTRACTID,
nsMimeRawEmitterConstructor,
RegisterMimeEmitter,
UnRegisterMimeEmitter
}
static const mozilla::Module::CategoryEntry kMimeEmitterCategories[] = {
{ "mime-emitter", NS_HTML_MIME_EMITTER_CONTRACTID, NS_HTML_MIME_EMITTER_CONTRACTID},
{ "mime-emitter", NS_XML_MIME_EMITTER_CONTRACTID, NS_XML_MIME_EMITTER_CONTRACTID},
{ "mime-emitter", NS_PLAIN_MIME_EMITTER_CONTRACTID, NS_PLAIN_MIME_EMITTER_CONTRACTID},
{ "mime-emitter", NS_RAW_MIME_EMITTER_CONTRACTID, NS_RAW_MIME_EMITTER_CONTRACTID},
{ NULL }
};
NS_IMPL_NSGETMODULE(nsMimeEmitterModule, components)
const mozilla::Module::CIDEntry kMimeEmitterCIDs[] = {
{ &kNS_HTML_MIME_EMITTER_CID, false, NULL, nsMimeHtmlDisplayEmitterConstructor},
{ &kNS_XML_MIME_EMITTER_CID, false, NULL, nsMimeXmlEmitterConstructor},
{ &kNS_PLAIN_MIME_EMITTER_CID, false, NULL, nsMimePlainEmitterConstructor},
{ &kNS_RAW_MIME_EMITTER_CID, false, NULL, nsMimeRawEmitterConstructor},
{ NULL }
};
const mozilla::Module::ContractIDEntry kMimeEmitterContracts[] = {
{ NS_HTML_MIME_EMITTER_CONTRACTID, &kNS_HTML_MIME_EMITTER_CID},
{ NS_XML_MIME_EMITTER_CONTRACTID, &kNS_XML_MIME_EMITTER_CID},
{ NS_PLAIN_MIME_EMITTER_CONTRACTID, &kNS_PLAIN_MIME_EMITTER_CID},
{ NS_RAW_MIME_EMITTER_CONTRACTID, &kNS_RAW_MIME_EMITTER_CID},
{ NULL }
};
static const mozilla::Module kMimeEmitterModule = {
mozilla::Module::kVersion,
kMimeEmitterCIDs,
kMimeEmitterContracts,
kMimeEmitterCategories
};
NSMODULE_DEFN(mimeemitter) = &kMimeEmitterModule;

Просмотреть файл

@ -64,6 +64,9 @@
{ 0x403b0540, 0xb7c3, 0x11d2, \
{ 0xb3, 0x5e, 0x52, 0x54, 0x0, 0xe2, 0xd6, 0x3a } }
#define NS_MIME_OBJECT_CONTRACTID \
"@mozilla.org/messenger/mimeobject;1"
// {932C53A5-F398-11d2-82B7-444553540002}
#define NS_MSGHEADERPARSER_CID \
{ 0x932c53a5, 0xf398, 0x11d2, \

Просмотреть файл

@ -36,9 +36,7 @@
* ***** END LICENSE BLOCK ***** */
#include "nsISupports.h"
#include "nsIFactory.h"
#include "nsIModule.h"
#include "nsIGenericFactory.h"
#include "mozilla/ModuleUtils.h"
#include "msgCore.h"
#include "pratom.h"
@ -70,107 +68,59 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(nsNNTPNewsgroupList)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsMsgNewsFolder)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsNewsDownloadDialogArgs)
static NS_METHOD
RegisterCommandLineHandler(nsIComponentManager* compMgr, nsIFile* path,
const char *location, const char *type,
const nsModuleComponentInfo *info)
{
nsCOMPtr<nsICategoryManager> catMan (do_GetService(NS_CATEGORYMANAGER_CONTRACTID));
NS_ENSURE_TRUE(catMan, NS_ERROR_FAILURE);
NS_DEFINE_NAMED_CID(NS_NNTPSERVICE_CID);
NS_DEFINE_NAMED_CID(NS_NNTPURL_CID);
NS_DEFINE_NAMED_CID(NS_NEWSFOLDERRESOURCE_CID);
NS_DEFINE_NAMED_CID(NS_NNTPINCOMINGSERVER_CID);
NS_DEFINE_NAMED_CID(NS_NNTPNEWSGROUPPOST_CID);
NS_DEFINE_NAMED_CID(NS_NNTPNEWSGROUPLIST_CID);
NS_DEFINE_NAMED_CID(NS_NNTPARTICLELIST_CID);
NS_DEFINE_NAMED_CID(NS_NEWSDOWNLOADDIALOGARGS_CID);
return catMan->AddCategoryEntry("command-line-handler", "m-news",
NS_NEWSSTARTUPHANDLER_CONTRACTID,
PR_TRUE, PR_TRUE, nsnull);
}
static NS_METHOD
UnregisterCommandLineHandler(nsIComponentManager* compMgr, nsIFile* path,
const char *location,
const nsModuleComponentInfo *info)
{
nsCOMPtr<nsICategoryManager> catMan (do_GetService(NS_CATEGORYMANAGER_CONTRACTID));
NS_ENSURE_TRUE(catMan, NS_ERROR_FAILURE);
catMan->DeleteCategoryEntry("command-line-handler", "m-news",
PR_TRUE);
return NS_OK;
}
static const nsModuleComponentInfo components[] =
{
{ "NNTP URL",
NS_NNTPURL_CID,
NS_NNTPURL_CONTRACTID,
nsNntpUrlConstructor },
{ "NNTP Service",
NS_NNTPSERVICE_CID,
NS_NNTPSERVICE_CONTRACTID,
nsNntpServiceConstructor },
{ "News Startup Handler",
NS_NNTPSERVICE_CID,
NS_NEWSSTARTUPHANDLER_CONTRACTID,
nsNntpServiceConstructor,
RegisterCommandLineHandler,
UnregisterCommandLineHandler },
{ "NNTP Protocol Info",
NS_NNTPSERVICE_CID,
NS_NNTPPROTOCOLINFO_CONTRACTID,
nsNntpServiceConstructor },
{ "NNTP Message Service",
NS_NNTPSERVICE_CID,
NS_NNTPMESSAGESERVICE_CONTRACTID,
nsNntpServiceConstructor },
{ "News Message Service",
NS_NNTPSERVICE_CID,
NS_NEWSMESSAGESERVICE_CONTRACTID,
nsNntpServiceConstructor },
{ "News Protocol Handler",
NS_NNTPSERVICE_CID,
NS_NEWSPROTOCOLHANDLER_CONTRACTID,
nsNntpServiceConstructor },
{ "Secure News Protocol Handler",
NS_NNTPSERVICE_CID,
NS_SNEWSPROTOCOLHANDLER_CONTRACTID,
nsNntpServiceConstructor },
{ "NNTP Protocol Handler",
NS_NNTPSERVICE_CID,
NS_NNTPPROTOCOLHANDLER_CONTRACTID,
nsNntpServiceConstructor },
{ "newsgroup content handler",
NS_NNTPSERVICE_CID,
NS_CONTENT_HANDLER_CONTRACTID_PREFIX"x-application-newsgroup",
nsNntpServiceConstructor },
{ "newsgroup listids content handler",
NS_NNTPSERVICE_CID,
NS_CONTENT_HANDLER_CONTRACTID_PREFIX"x-application-newsgroup-listids",
nsNntpServiceConstructor },
{ "News Folder Resource",
NS_NEWSFOLDERRESOURCE_CID,
NS_NEWSFOLDERRESOURCE_CONTRACTID,
nsMsgNewsFolderConstructor },
{ "NNTP Incoming Servier",
NS_NNTPINCOMINGSERVER_CID,
NS_NNTPINCOMINGSERVER_CONTRACTID,
nsNntpIncomingServerConstructor },
{ "NNTP Newsgroup Post",
NS_NNTPNEWSGROUPPOST_CID,
NS_NNTPNEWSGROUPPOST_CONTRACTID,
nsNNTPNewsgroupPostConstructor },
{ "NNTP Newsgroup List",
NS_NNTPNEWSGROUPLIST_CID,
NS_NNTPNEWSGROUPLIST_CONTRACTID,
nsNNTPNewsgroupListConstructor },
{ "NNTP Article List",
NS_NNTPARTICLELIST_CID,
NS_NNTPARTICLELIST_CONTRACTID,
nsNNTPArticleListConstructor },
{ "News download dialog args",
NS_NEWSDOWNLOADDIALOGARGS_CID,
NS_NEWSDOWNLOADDIALOGARGS_CONTRACTID,
nsNewsDownloadDialogArgsConstructor }
static const mozilla::Module::CategoryEntry kMsgNewsCategories[] = {
{ "command-line-handler", "m-news", NS_NEWSSTARTUPHANDLER_CONTRACTID },
{ NULL }
};
NS_IMPL_NSGETMODULE(nsMsgNewsModule, components)
const mozilla::Module::CIDEntry kMsgNewsCIDs[] = {
{ &kNS_NNTPURL_CID, false, NULL, nsNntpUrlConstructor },
{ &kNS_NNTPSERVICE_CID, false, NULL, nsNntpServiceConstructor },
{ &kNS_NEWSFOLDERRESOURCE_CID, false, NULL, nsMsgNewsFolderConstructor },
{ &kNS_NNTPINCOMINGSERVER_CID, false, NULL, nsNntpIncomingServerConstructor },
{ &kNS_NNTPNEWSGROUPPOST_CID, false, NULL, nsNNTPNewsgroupPostConstructor },
{ &kNS_NNTPNEWSGROUPLIST_CID, false, NULL, nsNNTPNewsgroupListConstructor },
{ &kNS_NNTPARTICLELIST_CID, false, NULL, nsNNTPArticleListConstructor },
{ &kNS_NEWSDOWNLOADDIALOGARGS_CID, false, NULL, nsNewsDownloadDialogArgsConstructor },
{ NULL }
};
const mozilla::Module::ContractIDEntry kMsgNewsContracts[] = {
{ NS_NNTPURL_CONTRACTID, &kNS_NNTPURL_CID },
{ NS_NNTPSERVICE_CONTRACTID, &kNS_NNTPSERVICE_CID },
{ NS_NEWSSTARTUPHANDLER_CONTRACTID, &kNS_NNTPSERVICE_CID },
{ NS_NNTPPROTOCOLINFO_CONTRACTID, &kNS_NNTPSERVICE_CID },
{ NS_NNTPMESSAGESERVICE_CONTRACTID, &kNS_NNTPSERVICE_CID },
{ NS_NEWSMESSAGESERVICE_CONTRACTID, &kNS_NNTPSERVICE_CID },
{ NS_NEWSPROTOCOLHANDLER_CONTRACTID, &kNS_NNTPSERVICE_CID },
{ NS_SNEWSPROTOCOLHANDLER_CONTRACTID, &kNS_NNTPSERVICE_CID },
{ NS_NNTPPROTOCOLHANDLER_CONTRACTID, &kNS_NNTPSERVICE_CID },
{ NS_CONTENT_HANDLER_CONTRACTID_PREFIX"x-application-newsgroup", &kNS_NNTPSERVICE_CID },
{ NS_CONTENT_HANDLER_CONTRACTID_PREFIX"x-application-newsgroup-listids", &kNS_NNTPSERVICE_CID },
{ NS_NEWSFOLDERRESOURCE_CONTRACTID, &kNS_NEWSFOLDERRESOURCE_CID },
{ NS_NNTPINCOMINGSERVER_CONTRACTID, &kNS_NNTPINCOMINGSERVER_CID },
{ NS_NNTPNEWSGROUPPOST_CONTRACTID, &kNS_NNTPNEWSGROUPPOST_CID },
{ NS_NNTPNEWSGROUPLIST_CONTRACTID, &kNS_NNTPNEWSGROUPLIST_CID },
{ NS_NNTPARTICLELIST_CONTRACTID, &kNS_NNTPARTICLELIST_CID },
{ NS_NEWSDOWNLOADDIALOGARGS_CONTRACTID, &kNS_NEWSDOWNLOADDIALOGARGS_CID },
{ NULL }
};
static const mozilla::Module kMsgNewsModule = {
mozilla::Module::kVersion,
kMsgNewsCIDs,
kMsgNewsContracts,
kMsgNewsCategories
};
NSMODULE_DEFN(msgnews) = &kMsgNewsModule;