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