An interface that describes an object representing an available update to
the current application - this update may have several available patches
from which one must be selected to download and install, for example we
might select a binary difference patch first and attempt to apply that,
then if the application process fails fall back to downloading a complete
file-replace patch. This object also contains information about the update
that the front end and other application services can use to learn more
about what is going on.
Retrieves a patch.
index | The index of the patch to retrieve. |
The nsIUpdatePatch at the specified index. |
Serializes this update object into a DOM Element
updates | The document to serialize into |
The DOM Element created by the serialization process |
The type of update:
“major” A major new version of the Application
“minor” A minor update to the Application (e.g. security update)
The name of the update, or “
The string to display in the user interface for the version. If you want
a real version number use appVersion.
The Application version of this update.
The Toolkit version of this update.
The Application version prior to the application being updated.
The Build ID of this update. Used to determine a particular build, down
to the hour, minute and second of its creation. This allows the system
to differentiate between several nightly builds with the same |version|
for example.
The URL to a page which offers details about the content of this
update. Ideally, this page is not the release notes but some other page
that summarizes the differences between this update and the previous,
which also links to the release notes.
The URL to a page that is typically localized to display in the update
prompt.
The URL to a HTML fragment that contains a license for this update. If
this is specified, the user is shown the license file after they choose
to install the update and they must agree to it before the download
commences.
The URL to the Update Service that supplied this update.
The channel used to retrieve this update from the Update Service.
Whether to show the update prompt which requires user confirmation when an
update is found during a background update check. This overrides the
default setting to download the update in the background.
Whether to show the “No Thanks” button in the update prompt. This allows
the user to never receive a notification for that specific update version
again.
Whether the update is no longer supported on this system.
Allows overriding the default amount of time in seconds before prompting the
user to apply an update. If not specified, the value of
app.update.promptWaitTime will be used.
Whether or not the update being downloaded is a complete replacement of
the user’s existing installation or a patch representing the difference
between the new version and the previous version.
Whether or not the update is a security update or not. If this is true,
then we present more serious sounding user interface messages to the
user.
Whether or not the update being downloaded is an OS update. This is
generally only possible in Gonk right now.
When the update was installed.
A message associated with this update, if any.
The currently selected patch for this update.
The state of the selected patch:
“downloading” The update is being downloaded.
“pending” The update is ready to be applied.
“pending-service” The update is ready to be applied with the service.
“applying” The update is being applied.
“applied” The update is ready to be switched to.
“applied-os” The update is OS update and to be installed.
“applied-service” The update is ready to be switched to with the service.
“succeeded” The update was successfully applied.
“download-failed” The update failed to be downloaded.
“failed” The update failed to be applied.
A numeric error code that conveys additional information about the state
of a failed update or failed certificate attribute check during an update
check. If the update is not in the “failed” state or the certificate
attribute check has not failed the value is zero.
TODO: Define typical error codes (for now, see updater/errors.h and the
CERT_ATTR_CHECK_FAILED_* values in nsUpdateService.js)
The number of patches supplied by this update.