hal/gonk/nsIRecoveryService.idl
author Max Li <maxli@maxli.ca>
Sun, 21 Apr 2013 21:23:19 -0400
changeset 129499 7567cbe92349b3f1d3b88377fbc7a0b529fe475c
parent 111107 9ae8f8f7028fbd5793247806c7ffcaaf3ed79a67
child 194756 326396f9cc4e197baad1179bcb41dc4269629ae6
permissions -rw-r--r--
Bug 858016 - Double click does not enable fullscreen mode. r=jaws

/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
 * You can obtain one at http://mozilla.org/MPL/2.0/. */

#include "nsISupports.idl"

[scriptable, uuid(acb93ff8-aa6d-4bc8-bedd-2a6a3b802a74)]
interface nsIRecoveryService : nsISupports
{
  /**
   * Possible values of fotaStatus.result. These should stay in sync with
   * librecovery/librecovery.h
   */
  const long FOTA_UPDATE_UNKNOWN = 0;
  const long FOTA_UPDATE_FAIL    = 1;
  const long FOTA_UPDATE_SUCCESS = 2;

  /**
   * Uses recovery to wipe the data and cache partitions. If this call is
   * successful, the device should reboot before the function call ever returns.
   *
   * @throws NS_ERROR_FAILURE when rebooting into recovery fails for some reason.
   */
  void factoryReset();

  /**
   * Use recovery to install an OTA update.zip. If this call is
   * successful, the device should reboot before the function call ever returns.
   *
   * @throws NS_ERROR_FAILURE when rebooting into recovery fails for some reason.
   */
  void installFotaUpdate(in string updatePath);

  /**
   * @return The status of the last FOTA update. One of FOTA_UPDATE_UNKNOWN,
   *         FOTA_UPDATE_FAIL, FOTA_UPDATE_SUCCESS.
   */
  long getFotaUpdateStatus();
};