Changing RegisterFactory to use the new API.
git-svn-id: svn://10.0.0.236/trunk@22111 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user