1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/xpcom/ds/nsIObserver.idl Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,38 @@ 1.4 +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ 1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.8 + 1.9 +#include "nsISupports.idl" 1.10 + 1.11 +/** 1.12 + * This interface is implemented by an object that wants 1.13 + * to observe an event corresponding to a topic. 1.14 + */ 1.15 + 1.16 +[scriptable, function, uuid(DB242E01-E4D9-11d2-9DDE-000064657374)] 1.17 +interface nsIObserver : nsISupports { 1.18 + 1.19 + /** 1.20 + * Observe will be called when there is a notification for the 1.21 + * topic |aTopic|. This assumes that the object implementing 1.22 + * this interface has been registered with an observer service 1.23 + * such as the nsIObserverService. 1.24 + * 1.25 + * If you expect multiple topics/subjects, the impl is 1.26 + * responsible for filtering. 1.27 + * 1.28 + * You should not modify, add, remove, or enumerate 1.29 + * notifications in the implemention of observe. 1.30 + * 1.31 + * @param aSubject : Notification specific interface pointer. 1.32 + * @param aTopic : The notification topic or subject. 1.33 + * @param aData : Notification specific wide string. 1.34 + * subject event. 1.35 + */ 1.36 + void observe( in nsISupports aSubject, 1.37 + in string aTopic, 1.38 + in wstring aData ); 1.39 + 1.40 +}; 1.41 +