mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 15:52:07 +00:00
nsIComponentManager API Changes (bug 98553)
a) create a new nsIComponentManager with only four functions on it: CreateInstance CreateInstanceByContractID GetClassInfo GetClassInfoByContractID. b) rename the old nsIComponentManager to nsIComponentManagerObsolete. c) fixes callers which use to access the nsIComponentManager for component registration functionality. These callers will temporary use the nsIComponentManagerObsolete interface. d) Create a new API NS_GetComponentManager() which mirrors the NS_GetServiceManager() e) Perserves the old NS_GetGlobalComponentManager(). Note the cast usage. r/sr = rpotts@netscape.com alecf@netscape.com brendan@mozilla.org
This commit is contained in:
parent
a0b5e27034
commit
9e34255b5b
@ -72,7 +72,7 @@ main(void)
|
||||
// To break free from such dependencies, we can GetService() the component
|
||||
// manager from the service manager that is returned from NS_InitXPCOM().
|
||||
// We feel that linkage dependency to XPCOM library is inevitable.
|
||||
(void) nsComponentManager::AutoRegister(nsIComponentManager::NS_Startup, nsnull);
|
||||
(void) nsComponentManager::AutoRegister(nsIComponentManagerObsolete::NS_Startup, nsnull);
|
||||
|
||||
// Create an instance of our component
|
||||
nsCOMPtr<nsISample> mysample = do_CreateInstance(NS_SAMPLE_CONTRACTID, &rv);
|
||||
|
Loading…
Reference in New Issue
Block a user