Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

nsIApplicationUpdateService

This interface describes a global application service that handles performing background update checks. It also provides utilities for selecting and downloading update patches.
1.0
28
Introduced
Gecko 1.8
Inherits from: nsISupports Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1)

Method overview

void addDownloadListener(in nsIRequestObserver listener);
AString downloadUpdate(in nsIUpdate update, in boolean background);
void pauseDownload();
void removeDownloadListener(in nsIRequestObserver listener);
nsIUpdate selectUpdate([array, size_is(updateCount)] in nsIUpdate updates, in unsigned long updateCount);

Attributes

Attribute Type Description
backgroundChecker nsIUpdateChecker The update checker being used for background update checking. Read only.
canApplyUpdates boolean true if the Update Service can download and install updates. Indicates if the current user has access privileges to the install directory. Read only.
canCheckForUpdates boolean true if the Update Service can check for updates. Application updates might be disabled by the application and the platform the application is running on. Read only.
canUpdate boolean true if the update service is able to download and install updates. This depends on whether or not the current user has the necessary access privileges for the install directory. Read only. Obsolete since Gecko 1.9.1.7pre
isDownloading boolean true if a download is in progress, otherwise false. Read only.

Methods

addDownloadListener()

Adds a listener that receives progress and state information about the update that is currently being downloaded. This information is most commonly used to update a user interface that informs the user as to the status of an update.

void addDownloadListener(
  in nsIRequestObserver listener
);
Parameters
listener
An object implementing nsIRequestObserver and optionally nsIProgressEventSink that will be notified of state and progress information as the update is downloaded.

downloadUpdate()

Starts downloading a software update.

 AString downloadUpdate(
   in nsIUpdate update,
   in boolean background
 );
Parameters
update
An nsIUpdate object indicating the update to download.
background
true to download the update in the background or false to download it in the foreground.
Return value

A string indicating the status of the update upon return:

"downloading"
The update is being downloaded.
"pending"
The update is ready to be applied.
"applying"
The update is in the process of being applied.
"succeeded"
The update has been installed successfully.
"download-failed"
The update failed to be downloaded.
"failed"
Installing the update failed.

pauseDownload()

Pauses the currently active update download.

void pauseDownload();
Parameters

None.

removeDownloadListener()

Removes a listener that is receiving progress and state information about the update that is currently being downloaded.

void removeDownloadListener(
  in nsIRequestObserver listener
);
Parameters
listener
The listener object to remove.

selectUpdate()

Selects the best update to install from a provided list of available updates.

nsIUpdate selectUpdate(
  [array, size_is(updateCount)] in nsIUpdate updates,
  in unsigned long updateCount
);
Parameters
updates
An array of updates that are available to install.
updateCount
The number of updates in the updates array.
Return value

An nsIUpdate object indicating the most appropriate update to install.

See also

Document Tags and Contributors

 Contributors to this page: Sheppy, trevorh, Smi
 Last updated by: Sheppy,