Interface nsIUpdateType

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.

Hierarchy

Properties

appVersion: string

The Application version of this update.

buildID: string

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.

channel: string

The channel used to retrieve this update from the Update Service.

detailsURL: string

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.

displayVersion: string

The string to display in the user interface for the version. If you want a real version number use appVersion.

elevationFailure: boolean

Whether an elevation failure has been encountered for this update.

errorCode: number

A numeric error code that conveys additional information about the state of a failed update. If the update is not in the "failed" state the value is zero. The possible values are located in common/updatererrors.h and values between 80 and 99 are in nsUpdateService.js.

installDate: number

When the update was installed.

isCompleteUpdate: boolean

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.

name: string

The name of the update, or " "

patchCount: number

The number of patches supplied by this update.

previousAppVersion: string

The Application version prior to the application being updated.

promptWaitTime: number

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.

selectedPatch: nsIUpdatePatch

The currently selected patch for this update.

serviceURL: string

The URL to the Update Service that supplied this update.

state: string

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. "pending-elevate" The update is ready to be applied but requires elevation. "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.

statusText: string

A message associated with this update, if any.

type: string

The type of update: "major" A major new version of the Application "minor" A minor update to the Application (e.g. security update)

unsupported: boolean

Whether the update is no longer supported on this system.

Methods

  • Increases the reference count for this interface. The associated instance will not be deleted unless the reference count is returned to zero.

    Returns

    The resulting reference count.

    Returns number

  • Parameters

    • aIID: object
    • Optional aInstancePtr: object

    Returns any

  • A run time mechanism for interface discovery.

    Returns

    NS_OK if the interface is supported by the associated instance, NS_NOINTERFACE if it is not.

    aInstancePtr must not be null.

    Parameters

    • aIID: object

      [in] A requested interface IID

    • aInstancePtr: object

      [out] A pointer to an interface pointer to receive the result.

    Returns void

  • Decreases the reference count for this interface. Generally, if the reference count returns to zero, the associated instance is deleted.

    Returns

    The resulting reference count.

    Returns number

  • Retrieves a patch.

    Returns

    The nsIUpdatePatch at the specified index.

    Parameters

    • index: number

      The index of the patch to retrieve.

    Returns nsIUpdatePatch

  • Serializes this update object into a DOM Element

    Returns

    The DOM Element created by the serialization process

    Parameters

    • updates: Document

      The document to serialize into

    Returns Element

Generated using TypeDoc