Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions
nsIServiceManager Interface Reference

The nsIServiceManager manager interface provides a means to obtain global services in an application. More...

import "nsIServiceManager.idl";

Inheritance diagram for nsIServiceManager:
Inheritance graph
[legend]
Collaboration diagram for nsIServiceManager:
Collaboration graph
[legend]

List of all members.

Public Member Functions

void getService (in nsCIDRef aClass, in nsIIDRef aIID,[iid_is(aIID), retval] out nsQIResult result)
 getServiceByContractID
void getServiceByContractID (in string aContractID, in nsIIDRef aIID,[iid_is(aIID), retval] out nsQIResult result)
boolean isServiceInstantiated (in nsCIDRef aClass, in nsIIDRef aIID)
 isServiceInstantiated
boolean isServiceInstantiatedByContractID (in string aContractID, in nsIIDRef aIID)

Detailed Description

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.

FROZEN

Definition at line 56 of file nsIServiceManager.idl.


Member Function Documentation

void nsIServiceManager::getService ( in nsCIDRef  aClass,
in nsIIDRef  aIID,
[iid_is(aIID), retval] out nsQIResult  result 
)

getServiceByContractID

Returns the instance that implements aClass or aContractID and the interface aIID. This may result in the instance being created.

Parameters:
aClassor aContractID : aClass or aContractID of object instance requested
aIID: IID of interface requested
result: resulting service
void nsIServiceManager::getServiceByContractID ( in string  aContractID,
in nsIIDRef  aIID,
[iid_is(aIID), retval] out nsQIResult  result 
)
boolean nsIServiceManager::isServiceInstantiated ( in nsCIDRef  aClass,
in nsIIDRef  aIID 
)

isServiceInstantiated

isServiceInstantiated will return a true if the service has already been created, otherwise false

Parameters:
aClassor aContractID : aClass or aContractID of object instance requested
aIID: IID of interface requested
aIID: IID of interface requested

The documentation for this interface was generated from the following file: