From f3c0c2ca83b130caff89e63f3d71fefc51a068ff Mon Sep 17 00:00:00 2001 From: "ebina%netscape.com" Date: Fri, 26 Feb 1999 15:59:52 +0000 Subject: [PATCH] Changing RegisterFactory to use the new API. git-svn-id: svn://10.0.0.236/trunk@22111 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/base/src/nsBaseDLL.cpp | 4 ++-- mozilla/base/tests/PropertiesTest.cpp | 6 +++--- mozilla/editor/base/nsEditor.cpp | 4 ++-- mozilla/editor/libeditor/base/nsEditor.cpp | 4 ++-- mozilla/editor/txmgr/src/nsTransactionManagerFactory.cpp | 3 ++- mozilla/editor/txmgr/tests/TestTXMgr.cpp | 2 +- mozilla/silentdl/nsSilentDownload.cpp | 4 ++-- mozilla/xpcom/tests/PropertiesTest.cpp | 6 +++--- 8 files changed, 17 insertions(+), 16 deletions(-) diff --git a/mozilla/base/src/nsBaseDLL.cpp b/mozilla/base/src/nsBaseDLL.cpp index 1a332ed626c..df3c430f17e 100644 --- a/mozilla/base/src/nsBaseDLL.cpp +++ b/mozilla/base/src/nsBaseDLL.cpp @@ -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; } diff --git a/mozilla/base/tests/PropertiesTest.cpp b/mozilla/base/tests/PropertiesTest.cpp index df7e961db53..a780f7a7a3a 100644 --- a/mozilla/base/tests/PropertiesTest.cpp +++ b/mozilla/base/tests/PropertiesTest.cpp @@ -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(); diff --git a/mozilla/editor/base/nsEditor.cpp b/mozilla/editor/base/nsEditor.cpp index f99d8bd0f37..938f77c8f49 100644 --- a/mozilla/editor/base/nsEditor.cpp +++ b/mozilla/editor/base/nsEditor.cpp @@ -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) diff --git a/mozilla/editor/libeditor/base/nsEditor.cpp b/mozilla/editor/libeditor/base/nsEditor.cpp index f99d8bd0f37..938f77c8f49 100644 --- a/mozilla/editor/libeditor/base/nsEditor.cpp +++ b/mozilla/editor/libeditor/base/nsEditor.cpp @@ -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) diff --git a/mozilla/editor/txmgr/src/nsTransactionManagerFactory.cpp b/mozilla/editor/txmgr/src/nsTransactionManagerFactory.cpp index 8076ee7cc67..564757bffaa 100644 --- a/mozilla/editor/txmgr/src/nsTransactionManagerFactory.cpp +++ b/mozilla/editor/txmgr/src/nsTransactionManagerFactory.cpp @@ -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); } diff --git a/mozilla/editor/txmgr/tests/TestTXMgr.cpp b/mozilla/editor/txmgr/tests/TestTXMgr.cpp index fef1f3812c7..e3646803a16 100644 --- a/mozilla/editor/txmgr/tests/TestTXMgr.cpp +++ b/mozilla/editor/txmgr/tests/TestTXMgr.cpp @@ -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(); diff --git a/mozilla/silentdl/nsSilentDownload.cpp b/mozilla/silentdl/nsSilentDownload.cpp index 7ceb0170a53..4c177244dea 100644 --- a/mozilla/silentdl/nsSilentDownload.cpp +++ b/mozilla/silentdl/nsSilentDownload.cpp @@ -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; } diff --git a/mozilla/xpcom/tests/PropertiesTest.cpp b/mozilla/xpcom/tests/PropertiesTest.cpp index df7e961db53..a780f7a7a3a 100644 --- a/mozilla/xpcom/tests/PropertiesTest.cpp +++ b/mozilla/xpcom/tests/PropertiesTest.cpp @@ -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();