Optional
aInstancePtr: objectA run time mechanism for interface discovery.
NS_OK if the interface is supported by the associated instance, NS_NOINTERFACE if it is not.
aInstancePtr must not be null.
[in] A requested interface IID
[out] A pointer to an interface pointer to receive the result.
AddObserver
Registers a given listener for a notifications regarding the specified topic.
: The notification topic or subject.
: 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.
notifyObservers
Notifies all registered listeners of the given topic. Must not be used with shutdown topics (will assert on the parent process).
: Notification specific interface pointer.
: The notification topic or subject.
: Notification specific wide string.
removeObserver
Unregisters a given listener from notifications regarding the specified topic.
: The interface pointer which will stop recieving notifications.
: The notification topic or subject.
Generated using TypeDoc
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.