Struct xpcom::interfaces::nsIServiceManager [] [src]

#[repr(C)]
pub struct nsIServiceManager { /* fields omitted */ }

interface nsIServiceManager : nsISupports

/**
 * 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.
 */

Methods

impl nsIServiceManager
[src]

[src]

Cast this nsIServiceManager to one of its base interfaces.

impl nsIServiceManager
[src]

[src]

/**
     * getServiceByContractID
     *
     * Returns the instance that implements aClass or aContractID and the
     * interface aIID.  This may result in the instance being created.
     *
     * @param aClass or aContractID : aClass or aContractID of object
     *                                instance requested
     * @param aIID : IID of interface requested
     * @param result : resulting service
     */

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

[src]

void getServiceByContractID (in string aContractID, in nsIIDRef aIID, [iid_is (aIID), retval] out nsQIResult result);

[src]

/**
     * isServiceInstantiated
     *
     * isServiceInstantiated will return a true if the service has already
     * been created, or false otherwise. Throws if the service does not
     * implement the given IID.
     *
     * @param aClass or aContractID : aClass or aContractID of object
     *                                instance requested
     * @param aIID : IID of interface requested
     * @throws NS_NOINTERFACE if the IID given isn't supported by the object
     */

boolean isServiceInstantiated (in nsCIDRef aClass, in nsIIDRef aIID);

[src]

boolean isServiceInstantiatedByContractID (in string aContractID, in nsIIDRef aIID);

Methods from Deref<Target = nsISupports>

[src]

Cast this nsISupports to one of its base interfaces.

[src]

void QueryInterface (in nsIIDRef uuid, [iid_is (uuid), retval] out nsQIResult result);

[src]

[noscript,notxpcom] nsrefcnt AddRef ();

[src]

[noscript,notxpcom] nsrefcnt Release ();

Trait Implementations

impl XpCom for nsIServiceManager
[src]

IID: nsIID = nsID(2343788249, 58162, 17965, [145, 85, 74, 0, 42, 181, 201, 88])

[src]

Perform a QueryInterface call on this object, attempting to dynamically cast it to the requested interface type. Returns Some(RefPtr) if the cast succeeded, and None otherwise. Read more

impl RefCounted for nsIServiceManager
[src]

[src]

Increment the reference count.

[src]

Decrement the reference count, potentially freeing backing memory.

impl Deref for nsIServiceManager
[src]

The resulting type after dereferencing.

[src]

Dereferences the value.