Changing RegisterFactory to use the new API.

This commit is contained in:
ebina%netscape.com 1999-02-26 15:59:52 +00:00
Родитель 80b0e6a236
Коммит 1b377a9c65
8 изменённых файлов: 17 добавлений и 16 удалений

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

@ -31,8 +31,8 @@ NSRegisterSelf(nsISupports* aServMgr, const char* path)
{
nsresult ret;
ret = nsRepository::RegisterFactory(kPropertiesCID, path, PR_TRUE,
PR_TRUE);
ret = nsRepository::RegisterComponent(kPropertiesCID, NULL, NULL,
path, PR_TRUE, PR_TRUE);
if (NS_FAILED(ret)) {
return ret;
}

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

@ -60,9 +60,9 @@ extern "C" void NS_SetupRegistry();
int
main(int argc, char *argv[])
{
nsRepository::RegisterFactory(kNetServiceCID, NETLIB_DLL, PR_FALSE,
PR_FALSE);
nsRepository::RegisterFactory(kEventQueueServiceCID, XPCOM_DLL,
nsRepository::RegisterComponent(kNetServiceCID, NULL, NULL, NETLIB_DLL,
PR_FALSE, PR_FALSE);
nsRepository::RegisterComponent(kEventQueueServiceCID, NULL, NULL, XPCOM_DLL,
PR_FALSE, PR_FALSE);
#ifdef XP_MAC // have not build this on PC and UNIX yet so make it #ifdef XP_MAC
NS_SetupRegistry();

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

@ -165,7 +165,7 @@ NSCanUnload(nsISupports* serviceMgr)
extern "C" NS_EXPORT nsresult
NSRegisterSelf(nsISupports* serviceMgr, const char *path)
{
return nsRepository::RegisterFactory(kIEditFactoryIID, path,
return nsRepository::RegisterComponent(kIEditFactoryIID, NULL, NULL, path,
PR_TRUE, PR_TRUE); //this will register the factory with the xpcom dll.
}
@ -290,7 +290,7 @@ nsEditor::EnableUndo(PRBool aEnable)
nsresult result=NS_OK;
/** -- temp code until the txn mgr auto-registers -- **/
nsRepository::RegisterFactory(kCTransactionManagerFactoryCID,
nsRepository::RegisterComponent(kCTransactionManagerFactoryCID, NULL, NULL,
TRANSACTION_MANAGER_DLL, PR_FALSE, PR_FALSE);
/** -- end temp code -- **/
if (PR_TRUE==aEnable)

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

@ -165,7 +165,7 @@ NSCanUnload(nsISupports* serviceMgr)
extern "C" NS_EXPORT nsresult
NSRegisterSelf(nsISupports* serviceMgr, const char *path)
{
return nsRepository::RegisterFactory(kIEditFactoryIID, path,
return nsRepository::RegisterComponent(kIEditFactoryIID, NULL, NULL, path,
PR_TRUE, PR_TRUE); //this will register the factory with the xpcom dll.
}
@ -290,7 +290,7 @@ nsEditor::EnableUndo(PRBool aEnable)
nsresult result=NS_OK;
/** -- temp code until the txn mgr auto-registers -- **/
nsRepository::RegisterFactory(kCTransactionManagerFactoryCID,
nsRepository::RegisterComponent(kCTransactionManagerFactoryCID, NULL, NULL,
TRANSACTION_MANAGER_DLL, PR_FALSE, PR_FALSE);
/** -- end temp code -- **/
if (PR_TRUE==aEnable)

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

@ -134,7 +134,8 @@ extern "C" NS_EXPORT nsresult NSGetFactory(nsISupports* serviceMgr,
extern "C" NS_EXPORT nsresult NSRegisterSelf(nsISupports* serviceMgr, const char *path)
{
return nsRepository::RegisterFactory(kCTransactionManagerFactoryCID, path,
return nsRepository::RegisterComponent(kCTransactionManagerFactoryCID,
NULL, NULL, path,
PR_TRUE, PR_TRUE);
}

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

@ -4542,7 +4542,7 @@ main (int argc, char *argv[])
{
nsresult result;
nsRepository::RegisterFactory(kCTransactionManagerFactoryCID,
nsRepository::RegisterComponent(kCTransactionManagerFactoryCID, NULL, NULL,
TRANSACTION_MANAGER_DLL, PR_FALSE, PR_FALSE);
result = simple_test();

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

@ -1433,8 +1433,8 @@ extern "C" NS_EXPORT nsresult
NSRegisterSelf(nsISupports* serviceMgr, const char *path)
{
printf("*** SilentDownload is being registered\n");
nsRepository::RegisterFactory(kSilentDownloadCID, path, PR_TRUE, PR_TRUE);
nsRepository::RegisterFactory(kSilentDownloadTaskCID, path, PR_TRUE, PR_TRUE);
nsRepository::RegisterComponent(kSilentDownloadCID, NULL, NULL, path, PR_TRUE, PR_TRUE);
nsRepository::RegisterComponent(kSilentDownloadTaskCID, NULL, NULL, path, PR_TRUE, PR_TRUE);
return NS_OK;
}

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

@ -60,9 +60,9 @@ extern "C" void NS_SetupRegistry();
int
main(int argc, char *argv[])
{
nsRepository::RegisterFactory(kNetServiceCID, NETLIB_DLL, PR_FALSE,
PR_FALSE);
nsRepository::RegisterFactory(kEventQueueServiceCID, XPCOM_DLL,
nsRepository::RegisterComponent(kNetServiceCID, NULL, NULL, NETLIB_DLL,
PR_FALSE, PR_FALSE);
nsRepository::RegisterComponent(kEventQueueServiceCID, NULL, NULL, XPCOM_DLL,
PR_FALSE, PR_FALSE);
#ifdef XP_MAC // have not build this on PC and UNIX yet so make it #ifdef XP_MAC
NS_SetupRegistry();