You are currently viewing a snapshot of www.mozilla.org taken on April 21, 2008. Most of this content is highly out of date (some pages haven't been updated since the project began in 1998) and exists for historical purposes only. If there are any pages on this archive site that you think should be added back to www.mozilla.org, please file a bug.
This interface provides a means to obtain global services (ie, access to a singleton object) in an application. The service manager depends on the registry to find and instantiate factories to obtain services. Users of the service manager must first obtain a pointer to the global service manager by calling
NS_GetServiceManager. After that, they can request specific services by calling
GetService. When they are finished they should
NS_RELEASEthe service as usual. A user of a service may keep references to particular services indefinitely and must call
Releaseonly when it shuts down. This interface is scriptable.void nsIServiceManager::getService(in nsCIDRef aClass, in nsIIDRef aIID, [iid_is(aIID),retval] out nsQIResult result)void nsIServiceManager::getServiceByContractID( in string aContractID, in nsIIDRef aIID, [iid_is(aIID),retval] out nsQIResult result)
| Written by:Ellen Evans | Comments, questions, complaints?