mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-30 00:01:50 +00:00
Changing RegisterFactory to use the new API.
This commit is contained in:
parent
80b0e6a236
commit
1b377a9c65
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user