Parameters

From nsIAlertsService

 Displays a sliding notification window.
    
 @param imageUrl       A URL identifying the image to put in the alert.
 @param title          The title for the alert.
 @param text           The contents of the alert.
 @param textClickable  If true, causes the alert text to look like a link
                       and notifies the listener when user attempts to 
                       click the alert text.
 @param cookie         A blind cookie the alert will pass back to the 
                       consumer during the alert listener callbacks.
 @param alertListener  Used for callbacks. May be null if the caller 
                       doesn't care about callbacks.
 @param name           The name of the notification.  This is currently
                       only used on OS X with Growl.  On OS X with Growl,
                       users can disable notifications with a given name.

 @throws NS_ERROR_NOT_AVAILABLE If the notification cannot be displayed.

 The following arguments will be passed to the alertListener's observe() 
 method:
   subject - null
   topic   - "alertfinished" when the alert goes away
             "alertclickcallback" when the text is clicked
   data    - the value of the cookie parameter passed to showAlertNotification.
void showAlertNotification(in AString imageUrl, in AString title, in AString text, [optional] in boolean textClickable, [optional] in AString cookie, [optional] in nsIObserver alertListener, [optional] in AString name)

From nsICommandManager


          
void addCommandObserver(in nsIObserver aCommandObserver, in string aCommandToObserve)

          
void removeCommandObserver(in nsIObserver aCommandObserver, in string aCommandObserved)

From nsIDOMXULDocument

 Loads a XUL overlay and merges it with the current document, notifying an
 observer when the merge is complete. 
 @param   url
          The URL of the overlay to load and merge
 @param   observer
          An object implementing nsIObserver that will be notified with a
          message of topic "xul-overlay-merged" when the merge is complete. 
          The subject parameter of |observe| will QI to a nsIURI - the URI 
          of the merged overlay. This parameter is optional and may be null.

 NOTICE:  In the 2.0 timeframe this API will change such that the 
          implementation will fire a DOMXULOverlayMerged event upon merge
          completion rather than notifying an observer. Do not rely on this
          API's behavior _not_ to change because it will!
          - Ben Goodger (8/23/2005)
void loadOverlay(in DOMString url, in nsIObserver aObserver)

From nsIExtensionManager

 Adds active download entries to the UI
 @param   items
          A list of nsIUpdateItems to entries to add
 @param   itemCount
          The length of |items|
 @param   manager
          null when called from chrome
          the XPInstallManager when not called from chrome (e.g. web page)

 @throws  NS_ERROR_ILLEGAL_VALUE if any item is invalid, or if itemCount == 0.
void addDownloads([array, size_is(itemCount)] in nsIUpdateItem items, in unsigned long itemCount, in nsIObserver manager)

From nsIIdleService

 Add an observer to be notified when the user idles for some period of
 time, and when they get back from that.

 @param observer the observer to be notified
 @param time the amount of time in seconds the user should be idle before
             the observer should be notified.

 @note
 The subject of the notification the observer will get is always the
 nsIIdleService itself.
 When the user goes idle, the observer topic is "idle" and when they get
 back, the observer topic is "back".
 The data param for the notification contains the current user idle time.

 @note
 You can add the same observer twice.
 @note
 Most implementations need to poll the OS for idle info themselves,
 meaning your notifications could arrive with a delay up to the length
 of the polling interval in that implementation.
 Current implementations use a delay of 5 seconds.
void addIdleObserver(in nsIObserver observer, in unsigned long time)
 Remove an observer registered with addIdleObserver.
 @param observer the observer that needs to be removed.
 @param time the amount of time they were listening for.
 @note
 Removing an observer will remove it once, for the idle time you specify. 
 If you have added an observer multiple times, you will need to remove it
 just as many times.
void removeIdleObserver(in nsIObserver observer, in unsigned long time)

From nsIKeygenThread

 startKeyGeneration - run the thread
   A user interface using this interface needs to
   call this method as soon as the status information
   is displaying. This will trigger key generation.
   To allow the closure of the status information,
   the thread needs a handle to an observer.

   observer will be called on the UI thread.
   When the key generation is done, the observe method will
   be called with a topic of "keygen-finished" and null data
   and subject.
void startKeyGeneration(in nsIObserver observer)

From nsIObserverService

 AddObserver

 Registers a given listener for a notifications regarding the specified
 topic.

 @param anObserve : The interface pointer which will receive notifications.
 @param aTopic    : The notification topic or subject.
 @param ownsWeak  : 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.
void addObserver(in nsIObserver anObserver, in string aTopic, in boolean ownsWeak)
 removeObserver

 Unregisters a given listener from notifications regarding the specified
 topic.

 @param anObserver : The interface pointer which will stop recieving
                     notifications.
 @param aTopic     : The notification topic or subject.
void removeObserver(in nsIObserver anObserver, in string aTopic)

From nsIPref


          
void addObserver(in string aDomain, in nsIObserver aObserver, in boolean aHoldWeak)

          
void removeObserver(in string aDomain, in nsIObserver aObserver)

From nsIPrefBranch2

 Add a preference change observer. On preference changes, the following
 arguments will be passed to the nsIObserver.observe() method:
   aSubject - The nsIPrefBranch object (this)
   aTopic   - The string defined by NS_PREFBRANCH_PREFCHANGE_TOPIC_ID
   aData    - The name of the preference which has changed, relative to
              the |root| of the aSubject branch.

 aSubject.get*Pref(aData) will get the new value of the modified
 preference. For example, if your observer is registered with
 addObserver("bar.", ...) on a branch with root "foo.", modifying
 the preference "foo.bar.baz" will trigger the observer, and aData
 parameter will be "bar.baz".

 @param aDomain   The preference on which to listen for changes. This can
                  be the name of an entire branch to observe.
                  e.g. Holding the "root" prefbranch and calling
                  addObserver("foo.bar.", ...) will observe changes to
                  foo.bar.baz and foo.bar.bzip
 @param aObserver The object to be notified if the preference changes.
 @param aHoldWeak true  Hold a weak reference to |aObserver|. The object
                        must implement the nsISupportsWeakReference
                        interface or this will fail.
                  false Hold a strong reference to |aObserver|.

 @note
 Registering as a preference observer can open an object to potential
 cyclical references which will cause memory leaks. These cycles generally
 occur because an object both registers itself as an observer (causing the
 branch to hold a reference to the observer) and holds a reference to the
 branch object for the purpose of getting/setting preference values. There
 are 3 approaches which have been implemented in an attempt to avoid these
 situations.
 1) The nsPrefBranch object supports nsISupportsWeakReference. Any consumer
    may hold a weak reference to it instead of a strong one.
 2) The nsPrefBranch object listens for xpcom-shutdown and frees all of the
    objects currently in its observer list. This ensures that long lived
    objects (services for example) will be freed correctly.
 3) The observer can request to be held as a weak reference when it is
    registered. This insures that shorter lived objects (say one tied to an
    open window) will not fall into the cyclical reference trap.

 @note
 The list of registered observers may be changed during the dispatch of
 nsPref:changed notification. However, the observers are not guaranteed
 to be notified in any particular order, so you can't be sure whether the
 added/removed observer will be called during the notification when it
 is added/removed.

 @note
 It is possible to change preferences during the notification.

 @note
 It is not safe to change observers during this callback in Gecko 
 releases before 1.9. If you want a safe way to remove a pref observer,
 please use an nsITimer.

 @see nsIObserver
 @see removeObserver
void addObserver(in string aDomain, in nsIObserver aObserver, in boolean aHoldWeak)
 Remove a preference change observer.

 @param aDomain   The preference which is being observed for changes.
 @param aObserver An observer previously registered with addObserver().

 @note
 Note that you must call removeObserver() on the same nsIPrefBranch2
 instance on which you called addObserver() in order to remove aObserver;
 otherwise, the observer will not be removed.

 @see nsIObserver
 @see addObserver
void removeObserver(in string aDomain, in nsIObserver aObserver)

From nsIPrintProgress


          
void openProgressDialog(in nsIDOMWindowInternal parent, in string dialogURL, in nsISupports parameters, in nsIObserver openDialogObserver, out boolean notifyOnOpen)

From nsIPrintingPrompt

  Shows the print progress dialog

  @param printSettings - PrintSettings for page setup (required)
  @param aObs - An observer to know if the contents of the Print Settings 
                object has changed while the dialog is being shown. 
                For example, some platforms may implement an "Apply" button (not required)
void showPageSetup(in nsIPrintSettings printSettings, in nsIObserver aObs)
  Shows the print progress dialog

  @param webBrowserPrint - represents the document to be printed
  @param printSettings - PrintSettings for print "job"
  @param openDialogObserver - an observer that will be notifed when the dialog is opened
  @param isForPrinting - true - for printing, false for print preview
  @param webProgressListener - additional listener can be registered for progress notifications
  @param printProgressParams - parameter object for passing progress state
  @param notifyOnOpen - this indicates that the observer will be notified when the progress
                        dialog has been opened. If false is returned it means the observer
                        (usually the caller) shouldn't wait
                        For Print Preview Progress there is intermediate progress
void showProgress(in nsIWebBrowserPrint webBrowserPrint, in nsIPrintSettings printSettings, in nsIObserver openDialogObserver, in boolean isForPrinting, out nsIWebProgressListener webProgressListener, out nsIPrintProgressParams printProgressParams, out boolean notifyOnOpen)

From nsIPrintingPromptService

  Shows the print progress dialog

  @param parent - a DOM windows the dialog will be parented to (required)
  @param printSettings - PrintSettings for page setup (required)
  @param aObs - An observer to know if the contents of the Print Settings 
                object has changed while the dialog is being shown. 
                For example, some platforms may implement an "Apply" button (not required)
void showPageSetup(in nsIDOMWindow parent, in nsIPrintSettings printSettings, in nsIObserver aObs)
  Shows the print progress dialog

  @param parent - a DOM windows the dialog will be parented to
  @param webBrowserPrint - represents the document to be printed
  @param printSettings - PrintSettings for print "job"
  @param openDialogObserver - an observer that will be notifed when the dialog is opened
  @param isForPrinting - true - for printing, false for print preview
  @param webProgressListener - additional listener can be registered for progress notifications
  @param printProgressParams - parameter object for passing progress state
  @param notifyOnOpen - this indicates that the observer will be notified when the progress
                        dialog has been opened. If false is returned it means the observer
                        (usually the caller) shouldn't wait
                        For Print Preview Progress there is intermediate progress
void showProgress(in nsIDOMWindow parent, in nsIWebBrowserPrint webBrowserPrint, in nsIPrintSettings printSettings, in nsIObserver openDialogObserver, in boolean isForPrinting, out nsIWebProgressListener webProgressListener, out nsIPrintProgressParams printProgressParams, out boolean notifyOnOpen)

From nsIProcess

 Executes the file this object was initialized with optionally calling
 an observer after the process has finished running.
 @param args       An array of arguments to pass to the process in the
                   native character set.
 @param count      The length of the args array.
 @param observer   An observer to notify when the process has completed. It
                   will receive this process instance as the subject and
                   "process-finished" or "process-failed" as the topic. The
                   observer will be notified on the main thread.
 @param holdWeak   Whether to use a weak reference to hold the observer.
void runAsync([array, size_is(count)] in string args, in unsigned long count, [optional] in nsIObserver observer, [optional] in boolean holdWeak)

From nsIProtectedAuthThread

 login - run the thread
   A user interface implementing this interface needs to
   call this method as soon as the message to the user is
   displayed. This will trigger login operation. No user 
   cancellation is possible during login operation.

   When the login is done, the observe method of @observer will
   be called on the UI thread with a topic of "login-finished"
   and null data and subject.
void login(in nsIObserver observer)

From nsITimer

 Initialize a timer that will fire after the said delay.
 A user must keep a reference to this timer till it is 
 is no longer needed or has been cancelled.

 @param aObserver   the callback object that observes the 
                    ``timer-callback'' topic with the subject being
                    the timer itself when the timer fires:

                    observe(nsISupports aSubject, => nsITimer
                            string aTopic,        => ``timer-callback''
                            wstring data          =>  null

 @param aDelay      delay in milliseconds for timer to fire
 @param aType       timer type per TYPE* consts defined above
void init(in nsIObserver aObserver, in unsigned long aDelay, in unsigned long aType)

From nsIWindowWatcher

 Clients of this service can register themselves to be notified
      when a window is opened or closed (added to or removed from this
      service). This method adds an aObserver to the list of objects
      to be notified.
      @param aObserver the object to be notified when windows are
                       opened or closed. Its Observe method will be
                       called with the following parameters:

      aObserver::Observe interprets its parameters so:
      aSubject the window being opened or closed, sent as an nsISupports
               which can be QIed to an nsIDOMWindow.
      aTopic   a wstring, either "domwindowopened" or "domwindowclosed".
      someData not used.
void registerNotification(in nsIObserver aObserver)
 Clients of this service can register themselves to be notified
      when a window is opened or closed (added to or removed from this
      service). This method removes an aObserver from the list of objects
      to be notified.
      @param aObserver the observer to be removed.
void unregisterNotification(in nsIObserver aObserver)

From nsIXPIDialogService

 @brief Create and open a download-and-install progress dialog

 When called the XPIDialogService implementation creates and opens
 a dialog to display the status of the install. When the dialog
 is ready to be used then the observer must be called: the subject
 is an nsIXPIProgressDialog that nsXPInstallManager can use to control
 the dialog, the topic is "xpinstall-progress"  and the data is "open".

 If the user wishes to cancel the download, the dialog can call the
 observe method with the same subject and topic and the data "cancel".

 @note Unless this routine throws an exception the observer <b>must</b>
 be called or nsXPInstallManager will wait forever and never clean
 itself up.

 @param packageList   three strings per package as in confirmInstall()
 @param count         the number of strings in the list
 @param observer      nsIObserver to receive messages from the dialog
void openProgressDialog([array, size_is(count)] in wstring packageList, in unsigned long count, in nsIObserver observer)