michael@0: /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #include "nsISupports.idl" michael@0: michael@0: /** michael@0: * This interface is implemented by an object that wants michael@0: * to observe an event corresponding to a topic. michael@0: */ michael@0: michael@0: [scriptable, function, uuid(DB242E01-E4D9-11d2-9DDE-000064657374)] michael@0: interface nsIObserver : nsISupports { michael@0: michael@0: /** michael@0: * Observe will be called when there is a notification for the michael@0: * topic |aTopic|. This assumes that the object implementing michael@0: * this interface has been registered with an observer service michael@0: * such as the nsIObserverService. michael@0: * michael@0: * If you expect multiple topics/subjects, the impl is michael@0: * responsible for filtering. michael@0: * michael@0: * You should not modify, add, remove, or enumerate michael@0: * notifications in the implemention of observe. michael@0: * michael@0: * @param aSubject : Notification specific interface pointer. michael@0: * @param aTopic : The notification topic or subject. michael@0: * @param aData : Notification specific wide string. michael@0: * subject event. michael@0: */ michael@0: void observe( in nsISupports aSubject, michael@0: in string aTopic, michael@0: in wstring aData ); michael@0: michael@0: }; michael@0: