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]

[src]

Cast this nsIObserverService to one of its base interfaces.

impl nsIObserverService
[src]

[src]

/**
     * 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);

[src]

/**
     * 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);

[src]

/**
     * 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);

[src]

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

[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 nsIObserverService
[src]

IID: nsIID = nsID(3498004882, 58321, 4562, [138, 205, 0, 16, 90, 27, 136, 96])

[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]

[src]

Increment the reference count.

[src]

Decrement the reference count, potentially freeing backing memory.

impl Deref for nsIObserverService
[src]

The resulting type after dereferencing.

[src]

Dereferences the value.