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.
nsIServiceManager
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 callingGetService
. When they are finished they shouldNS_RELEASE
the service as usual. A user of a service may keep references to particular services indefinitely and must callRelease
only when it shuts down. This interface is scriptable.Returns the object that implements
aClass
and the interfaceaIID
. This may result in the object being created.Syntax:
void nsIServiceManager::getService(in nsCIDRef aClass, in nsIIDRef aIID, [iid_is(aIID),retval] out nsQIResult result)Parameters:
nsresult:
Returns the object that implements
aContractID
and the interfaceaIID
. This may result in the instance being created.Syntax:
void nsIServiceManager::getServiceByContractID( in string aContractID, in nsIIDRef aIID, [iid_is(aIID),retval] out nsQIResult result)Parameters:
nsresult:
Returns
TRUE
if the singleton service object has already been created.Syntax:
boolean nsIServiceManager::isServiceInstantiated( in nsCIDRef aClass,in nsIIDRef aIID)Parameters:
Return:
Returns
TRUE
if the singleton service object has already been created.Syntax:
boolean nsIServiceManager::isServiceInstantiated( in string aContractID,in nsIIDRef aIID)Parameters:
nsresult:
Written by:Ellen Evans | Comments, questions, complaints?
Bug 143387 |