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]
pub fn coerce<T: nsIServiceManagerCoerce>(&self) -> &T
[src]
Cast this nsIServiceManager
to one of its base interfaces.
impl nsIServiceManager
[src]
pub unsafe fn GetService(
&self,
aClass: &nsCID,
aIID: &nsIID,
result: *mut *mut c_void
) -> nsresult
[src]
&self,
aClass: &nsCID,
aIID: &nsIID,
result: *mut *mut c_void
) -> nsresult
/**
* 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);
pub unsafe fn GetServiceByContractID(
&self,
aContractID: *const c_char,
aIID: &nsIID,
result: *mut *mut c_void
) -> nsresult
[src]
&self,
aContractID: *const c_char,
aIID: &nsIID,
result: *mut *mut c_void
) -> nsresult
void getServiceByContractID (in string aContractID, in nsIIDRef aIID, [iid_is (aIID), retval] out nsQIResult result);
pub unsafe fn IsServiceInstantiated(
&self,
aClass: &nsCID,
aIID: &nsIID,
_retval: *mut bool
) -> nsresult
[src]
&self,
aClass: &nsCID,
aIID: &nsIID,
_retval: *mut bool
) -> nsresult
/**
* 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);
pub unsafe fn IsServiceInstantiatedByContractID(
&self,
aContractID: *const c_char,
aIID: &nsIID,
_retval: *mut bool
) -> nsresult
[src]
&self,
aContractID: *const c_char,
aIID: &nsIID,
_retval: *mut bool
) -> nsresult
boolean isServiceInstantiatedByContractID (in string aContractID, in nsIIDRef aIID);
Methods from Deref<Target = nsISupports>
pub fn coerce<T: nsISupportsCoerce>(&self) -> &T
[src]
Cast this nsISupports
to one of its base interfaces.
pub unsafe fn QueryInterface(
&self,
uuid: &nsIID,
result: *mut *mut c_void
) -> nsresult
[src]
&self,
uuid: &nsIID,
result: *mut *mut c_void
) -> nsresult
void QueryInterface (in nsIIDRef uuid, [iid_is (uuid), retval] out nsQIResult result);
pub unsafe fn AddRef(&self) -> nsrefcnt
[src]
[noscript,notxpcom] nsrefcnt AddRef ();
pub unsafe fn Release(&self) -> nsrefcnt
[src]
[noscript,notxpcom] nsrefcnt Release ();
Trait Implementations
impl XpCom for nsIServiceManager
[src]
const IID: nsIID
IID: nsIID = nsID(2343788249, 58162, 17965, [145, 85, 74, 0, 42, 181, 201, 88])
fn query_interface<T: XpCom>(&self) -> Option<RefPtr<T>>
[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]
unsafe fn addref(&self)
[src]
Increment the reference count.
unsafe fn release(&self)
[src]
Decrement the reference count, potentially freeing backing memory.
impl Deref for nsIServiceManager
[src]
type Target = nsISupports
The resulting type after dereferencing.
fn deref(&self) -> &nsISupports
[src]
Dereferences the value.