hal/gonk/nsIRecoveryService.idl

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/hal/gonk/nsIRecoveryService.idl	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,39 @@
     1.4 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.5 + * License, v. 2.0. If a copy of the MPL was not distributed with this file,
     1.6 + * You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.7 +
     1.8 +#include "nsISupports.idl"
     1.9 +
    1.10 +[scriptable, uuid(acb93ff8-aa6d-4bc8-bedd-2a6a3b802a74)]
    1.11 +interface nsIRecoveryService : nsISupports
    1.12 +{
    1.13 +  /**
    1.14 +   * Possible values of fotaStatus.result. These should stay in sync with
    1.15 +   * librecovery/librecovery.h
    1.16 +   */
    1.17 +  const long FOTA_UPDATE_UNKNOWN = 0;
    1.18 +  const long FOTA_UPDATE_FAIL    = 1;
    1.19 +  const long FOTA_UPDATE_SUCCESS = 2;
    1.20 +
    1.21 +  /**
    1.22 +   * Uses recovery to wipe the data and cache partitions. If this call is
    1.23 +   * successful, the device should reboot before the function call ever returns.
    1.24 +   *
    1.25 +   * @throws NS_ERROR_FAILURE when rebooting into recovery fails for some reason.
    1.26 +   */
    1.27 +  void factoryReset();
    1.28 +
    1.29 +  /**
    1.30 +   * Use recovery to install an OTA update.zip. If this call is
    1.31 +   * successful, the device should reboot before the function call ever returns.
    1.32 +   *
    1.33 +   * @throws NS_ERROR_FAILURE when rebooting into recovery fails for some reason.
    1.34 +   */
    1.35 +  void installFotaUpdate(in string updatePath);
    1.36 +
    1.37 +  /**
    1.38 +   * @return The status of the last FOTA update. One of FOTA_UPDATE_UNKNOWN,
    1.39 +   *         FOTA_UPDATE_FAIL, FOTA_UPDATE_SUCCESS.
    1.40 +   */
    1.41 +  long getFotaUpdateStatus();
    1.42 +};

mercurial