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.
AddObserver
Registers a given listener for a notifications regarding the specified
topic.
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. |
removeObserver
Unregisters a given listener from notifications regarding the specified
topic.
anObserver | : The interface pointer which will stop recieving notifications. |
aTopic | : The notification topic or subject. |
notifyObservers
Notifies all registered listeners of the given topic.
aSubject | : Notification specific interface pointer. |
aTopic | : The notification topic or subject. |
someData | : Notification specific wide string. |
enumerateObservers
Returns an enumeration of all registered listeners.
aTopic | : The notification topic or subject. |