Interface nsIUpdateCheckerType

An interface describing an object that knows how to check for updates. It can perform multiple update checks simultaneously or consolidate multiple check requests into a single web request, depending on whether the parameters specified for update checking match.

Hierarchy

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

  • Checks for available updates.

    Returns

    An nsIUpdateCheck object that describes the update check and provides a Promise that resolves to the update check results.

    Parameters

    • checkType: number

      Must be either BACKGROUND_CHECK or FOREGROUND_CHECK. If FOREGROUND_CHECK is specified, the normal nsIApplicationUpdateService.canCheckForUpdates check will be overridden and the "force" parameter will be included in the update URL.

      Regarding the "force" parameter: Sometimes the update server throttles updates, arbitrarily refraining from returning the newest version to some clients. The force parameter overrides this behavior and tells it to unconditionally return the newest available version.

      It's worth noting that the update server technically supports forcing the decision in the other direction too, preventing the newest version from being returned, but this interface doesn't actually support setting the force parameter this way. If the force parameter is used, it always forces getting the newest version.

    Returns nsIUpdateCheck

  • Gets the update URL.

    Returns

    A Promise that resolves to the URL to be used to check for updates, as a string. This URL should resolve to an XML describing the updates that are available to the current Firefox installation.

    Parameters

    • checkType: number

      Must be either BACKGROUND_CHECK or FOREGROUND_CHECK. See the checkType parameter of nsIUpdateChecker.checkForUpdates for more details.

    Returns any

  • Ends all pending update checks.

    Returns void

  • Ends a pending update check. Has no effect if the id is invalid or the check corresponding to the id has already completed.

    Note that because nsIUpdateChecker potentially combines multiple update checks, it is not guaranteed that this will actually cause the update request to be aborted. It also doesn't guarantee that nsIUpdateCheck.result will resolve when this is called. This merely marks the check id as cancelled and only if there are no other check ids waiting on the request does it abort it.

    Parameters

    • id: number

      The id of a check to stop (accessible via nsIUpdateCheck).

    Returns void

Generated using TypeDoc