Back to index

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

nsIObserverService More...

import "nsIObserverService.idl";

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

List of all members.

Public Member Functions

void addObserver (in nsIObserver anObserver, in string aTopic, in boolean ownsWeak)
 AddObserver.
void removeObserver (in nsIObserver anObserver, in string aTopic)
 removeObserver
void notifyObservers (in nsISupports aSubject, in string aTopic, in wstring someData)
 notifyObservers
nsISimpleEnumerator enumerateObservers (in string aTopic)
 enumerateObservers

Detailed Description

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.

FROZEN

Definition at line 55 of file nsIObserverService.idl.


Member Function Documentation

void nsIObserverService::addObserver ( in nsIObserver  anObserver,
in string  aTopic,
in boolean  ownsWeak 
)

AddObserver.

Registers a given listener for a notifications regarding the specified topic.

Parameters:
anObserve: The interface pointer which will receive notifications.
aTopic: The notification topic or subject.
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.

enumerateObservers

Returns an enumeration of all registered listeners.

Parameters:
aTopic: The notification topic or subject.
void nsIObserverService::notifyObservers ( in nsISupports  aSubject,
in string  aTopic,
in wstring  someData 
)

notifyObservers

Notifies all registered listeners of the given topic.

Parameters:
aSubject: Notification specific interface pointer.
aTopic: The notification topic or subject.
someData: Notification specific wide string.

removeObserver

Unregisters a given listener from notifications regarding the specified topic.

Parameters:
anObserver: The interface pointer which will stop recieving notifications.
aTopic: The notification topic or subject.

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