add nsCommonDialogs and nsDialogParamBlock factories and registration

This commit is contained in:
davidm%netscape.com 1999-08-11 03:03:47 +00:00
Родитель c9ebe00bfa
Коммит 8a9583b465
2 изменённых файлов: 22 добавлений и 4 удалений

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

@ -27,7 +27,8 @@
#include "nsIWindowMediator.h"
#include "nsISessionHistory.h"
#include "rdf.h"
#include "nsICommonDialogs.h"
#include "nsIDialogParamBlock.h"
/* extern the factory entry points for each component... */
nsresult NS_NewAppShellServiceFactory(nsIFactory** aFactory);
nsresult NS_NewXPConnectFactoryFactory(nsIFactory** aResult);
@ -45,6 +46,8 @@ static NS_DEFINE_IID(kNetSupportDialogCID, NS_NETSUPPORTDIALOG_CID);
static NS_DEFINE_CID(kWindowMediatorCID, NS_WINDOWMEDIATOR_CID);
static NS_DEFINE_CID(kSessionHistoryCID, NS_SESSION_HISTORY_CID);
static NS_DEFINE_CID( kCommonDialogsCID, NS_CommonDialog_CID );
static NS_DEFINE_CID( kDialogParamBlockCID, NS_DialogParamBlock_CID );
/*
* Global entry point to register all components in the registry...
*/
@ -63,6 +66,8 @@ NSRegisterSelf(nsISupports* serviceMgr, const char *path)
nsComponentManager::RegisterComponent(kWindowMediatorCID,
"window-mediator", NS_RDF_DATASOURCE_PROGID_PREFIX "window-mediator",
path, PR_TRUE, PR_TRUE);
nsComponentManager::RegisterComponent(kCommonDialogsCID, NULL, "component://netscape/appshell/commonDialogs", path, PR_TRUE, PR_TRUE);
nsComponentManager::RegisterComponent(kDialogParamBlockCID, NULL, NULL, path, PR_TRUE, PR_TRUE);
return NS_OK;
}
@ -80,6 +85,8 @@ NSUnregisterSelf(nsISupports* serviceMgr, const char *path)
nsComponentManager::UnregisterComponent(kNetSupportDialogCID, path);
nsComponentManager::UnregisterComponent(kWindowMediatorCID, path);
nsComponentManager::UnregisterComponent(kSessionHistoryCID, path);
nsComponentManager::UnregisterComponent(kCommonDialogsCID, path);
nsComponentManager::UnregisterComponent(kDialogParamBlockCID, path);
return NS_OK;
}
@ -138,7 +145,14 @@ NSGetFactory(nsISupports* serviceMgr,
{
rv = NS_NewSessionHistoryFactory( aFactory );
}
else if ( aClass.Equals( kCommonDialogsCID ) )
{
rv = NS_NewCommonDialogsFactory( aFactory );
}
else if ( aClass.Equals( kDialogParamBlockCID ) )
{
rv = NS_NewDialogParamBlockFactory( aFactory );
}
return rv;
}

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

@ -38,6 +38,8 @@
#include "nsISessionHistory.h"
#include "rdf.h"
#include "nsIWindowMediator.h"
#include "nsICommonDialogs.h"
#include "nsIDialogParamBlock.h"
static NS_DEFINE_CID(kAppCoresManagerCID, NS_APPCORESMANAGER_CID);
static NS_DEFINE_CID(kToolkitCoreCID, NS_TOOLKITCORE_CID);
@ -46,7 +48,7 @@ static NS_DEFINE_CID(kProfileCoreCID, NS_PROFILECORE_CID);
static NS_DEFINE_CID(kBrowserAppCoreCID, NS_BROWSERAPPCORE_CID);
static NS_DEFINE_CID(kRDFCoreCID, NS_RDFCORE_CID);
static NS_DEFINE_CID(kSessionHistoryCID, NS_SESSION_HISTORY_CID);
static NS_DEFINE_CID( kCommonDialogsCID, NS_CommonDialog_CID );
#ifdef XP_PC
#define APPSHELL_DLL "nsappshell.dll"
@ -81,7 +83,7 @@ static NS_DEFINE_CID(kXPConnectFactoryCID, NS_XPCONNECTFACTORY_CID);
static NS_DEFINE_CID(kNetSupportDialogCID, NS_NETSUPPORTDIALOG_CID);
static NS_DEFINE_CID(kProtocolHelperCID, NS_PROTOCOL_HELPER_CID);
static NS_DEFINE_CID(kWindowMediatorCID, NS_WINDOWMEDIATOR_CID);
static NS_DEFINE_CID( kDialogParamBlockCID, NS_DialogParamBlock_CID );
nsresult NS_AutoregisterComponents()
{
nsresult rv = nsComponentManager::AutoRegister(nsIComponentManager::NS_Startup,
@ -123,6 +125,8 @@ NS_SetupRegistry_1()
"window-mediator", NS_RDF_DATASOURCE_PROGID_PREFIX "window-mediator",
APPSHELL_DLL, PR_FALSE, PR_FALSE);
nsComponentManager::RegisterComponentLib(kSessionHistoryCID, NULL, NULL, APPSHELL_DLL, PR_FALSE, PR_FALSE);
nsComponentManager::RegisterComponentLib(kCommonDialogsCID, NULL, "component://netscape/appshell/commonDialogs", APPSHELL_DLL, PR_FALSE, PR_FALSE);
nsComponentManager::RegisterComponentLib(kDialogParamBlockCID, NULL, NULL, APPSHELL_DLL, PR_FALSE, PR_FALSE);
// APPCORES_DLL
nsComponentManager::RegisterComponentLib(kAppCoresManagerCID, NULL, NULL, APPCORES_DLL, PR_FALSE, PR_FALSE);