Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
michael@0 | 1 | /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ |
michael@0 | 2 | /* This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 3 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 5 | |
michael@0 | 6 | #include "nsISupports.idl" |
michael@0 | 7 | |
michael@0 | 8 | /** |
michael@0 | 9 | * This interface is implemented by an object that wants |
michael@0 | 10 | * to observe an event corresponding to a topic. |
michael@0 | 11 | */ |
michael@0 | 12 | |
michael@0 | 13 | [scriptable, function, uuid(DB242E01-E4D9-11d2-9DDE-000064657374)] |
michael@0 | 14 | interface nsIObserver : nsISupports { |
michael@0 | 15 | |
michael@0 | 16 | /** |
michael@0 | 17 | * Observe will be called when there is a notification for the |
michael@0 | 18 | * topic |aTopic|. This assumes that the object implementing |
michael@0 | 19 | * this interface has been registered with an observer service |
michael@0 | 20 | * such as the nsIObserverService. |
michael@0 | 21 | * |
michael@0 | 22 | * If you expect multiple topics/subjects, the impl is |
michael@0 | 23 | * responsible for filtering. |
michael@0 | 24 | * |
michael@0 | 25 | * You should not modify, add, remove, or enumerate |
michael@0 | 26 | * notifications in the implemention of observe. |
michael@0 | 27 | * |
michael@0 | 28 | * @param aSubject : Notification specific interface pointer. |
michael@0 | 29 | * @param aTopic : The notification topic or subject. |
michael@0 | 30 | * @param aData : Notification specific wide string. |
michael@0 | 31 | * subject event. |
michael@0 | 32 | */ |
michael@0 | 33 | void observe( in nsISupports aSubject, |
michael@0 | 34 | in string aTopic, |
michael@0 | 35 | in wstring aData ); |
michael@0 | 36 | |
michael@0 | 37 | }; |
michael@0 | 38 |