nsIServiceManager
| IID: | 8bb35ed9-e332-462d-9155-4a002ab5c958 |
| Inherits From: | nsISupports |
| Status: | FROZEN |
The nsIServiceManager manager interface provides a means to obtain global services in an application. The service manager depends on the repository 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 can NS_RELEASE() the service as usual.
A user of a service may keep references to particular services indefinitely and only must call Release when it shuts down.
This interface is intended to be used as a service.
Methods
void getService ( nsCIDRef class , nsIIDRef IID , out nsQIResult* result )
void getServiceByContractID ( char* contractID , nsIIDRef IID , out nsQIResult* result )
PRBool isServiceInstantiated ( nsCIDRef class , nsIIDRef IID )
PRBool isServiceInstantiatedByContractID ( char* contractID , nsIIDRef IID )
void getService ( nsCIDRef class , nsIIDRef IID , out nsQIResult* result )
GetServiceByContractID
Returns the instance that implements class or contractID and the interface iID. This may result in the instance being created.
- Arguments:
- class: or contractID : class or contractID of object instance requested
- IID: : IID of interface requested
- result: : resulting service
void getServiceByContractID ( char* contractID , nsIIDRef IID , out nsQIResult* result )
- Arguments:
- contractID
- IID
- result
PRBool isServiceInstantiated ( nsCIDRef class , nsIIDRef IID )
IsServiceInstantiated will return a true if the service has already been created, otherwise false
- Arguments:
- class: or contractID : class or contractID of object instance requested
- IID: : IID of interface requested
PRBool isServiceInstantiatedByContractID ( char* contractID , nsIIDRef IID )
- Arguments:
- contractID
- IID
Reference documentation is generated from Mozilla's source.
