Struct xpcom::interfaces::nsIObserverService
[−]
[src]
#[repr(C)]pub struct nsIObserverService { /* fields omitted */ }
interface nsIObserverService : nsISupports
/**
* nsIObserverService
*
* Service allows a client listener (nsIObserver) to register and unregister for
* notifications of specific string referenced topic. Service also provides a
* way to notify registered listeners and a way to enumerate registered client
* listeners.
*/
Methods
impl nsIObserverService
[src]
pub fn coerce<T: nsIObserverServiceCoerce>(&self) -> &T
[src]
Cast this nsIObserverService
to one of its base interfaces.
impl nsIObserverService
[src]
pub unsafe fn AddObserver(
&self,
anObserver: *const nsIObserver,
aTopic: *const c_char,
ownsWeak: bool
) -> nsresult
[src]
&self,
anObserver: *const nsIObserver,
aTopic: *const c_char,
ownsWeak: bool
) -> nsresult
/**
* AddObserver
*
* Registers a given listener for a notifications regarding the specified
* topic.
*
* @param anObserve : The interface pointer which will receive notifications.
* @param aTopic : The notification topic or subject.
* @param ownsWeak : If set to false, the nsIObserverService will hold a
* strong reference to |anObserver|. If set to true and
* |anObserver| supports the nsIWeakReference interface,
* a weak reference will be held. Otherwise an error will be
* returned.
*/
void addObserver (in nsIObserver anObserver, in string aTopic, [optional] in boolean ownsWeak);
pub unsafe fn RemoveObserver(
&self,
anObserver: *const nsIObserver,
aTopic: *const c_char
) -> nsresult
[src]
&self,
anObserver: *const nsIObserver,
aTopic: *const c_char
) -> nsresult
/**
* removeObserver
*
* Unregisters a given listener from notifications regarding the specified
* topic.
*
* @param anObserver : The interface pointer which will stop recieving
* notifications.
* @param aTopic : The notification topic or subject.
*/
void removeObserver (in nsIObserver anObserver, in string aTopic);
pub unsafe fn NotifyObservers(
&self,
aSubject: *const nsISupports,
aTopic: *const c_char,
someData: *const int16_t
) -> nsresult
[src]
&self,
aSubject: *const nsISupports,
aTopic: *const c_char,
someData: *const int16_t
) -> nsresult
/**
* notifyObservers
*
* Notifies all registered listeners of the given topic.
*
* @param aSubject : Notification specific interface pointer.
* @param aTopic : The notification topic or subject.
* @param someData : Notification specific wide string.
*/
void notifyObservers (in nsISupports aSubject, in string aTopic, [optional] in wstring someData);
pub unsafe fn EnumerateObservers(
&self,
aTopic: *const c_char,
_retval: *mut *const nsISimpleEnumerator
) -> nsresult
[src]
&self,
aTopic: *const c_char,
_retval: *mut *const nsISimpleEnumerator
) -> nsresult
/**
* enumerateObservers
*
* Returns an enumeration of all registered listeners.
*
* @param aTopic : The notification topic or subject.
*/
nsISimpleEnumerator enumerateObservers (in string aTopic);
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 nsIObserverService
[src]
const IID: nsIID
IID: nsIID = nsID(3498004882, 58321, 4562, [138, 205, 0, 16, 90, 27, 136, 96])
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 nsIObserverService
[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 nsIObserverService
[src]
type Target = nsISupports
The resulting type after dereferencing.
fn deref(&self) -> &nsISupports
[src]
Dereferences the value.