michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this file, michael@0: * You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #include "nsISupports.idl" michael@0: michael@0: [scriptable, uuid(acb93ff8-aa6d-4bc8-bedd-2a6a3b802a74)] michael@0: interface nsIRecoveryService : nsISupports michael@0: { michael@0: /** michael@0: * Possible values of fotaStatus.result. These should stay in sync with michael@0: * librecovery/librecovery.h michael@0: */ michael@0: const long FOTA_UPDATE_UNKNOWN = 0; michael@0: const long FOTA_UPDATE_FAIL = 1; michael@0: const long FOTA_UPDATE_SUCCESS = 2; michael@0: michael@0: /** michael@0: * Uses recovery to wipe the data and cache partitions. If this call is michael@0: * successful, the device should reboot before the function call ever returns. michael@0: * michael@0: * @throws NS_ERROR_FAILURE when rebooting into recovery fails for some reason. michael@0: */ michael@0: void factoryReset(); michael@0: michael@0: /** michael@0: * Use recovery to install an OTA update.zip. If this call is michael@0: * successful, the device should reboot before the function call ever returns. michael@0: * michael@0: * @throws NS_ERROR_FAILURE when rebooting into recovery fails for some reason. michael@0: */ michael@0: void installFotaUpdate(in string updatePath); michael@0: michael@0: /** michael@0: * @return The status of the last FOTA update. One of FOTA_UPDATE_UNKNOWN, michael@0: * FOTA_UPDATE_FAIL, FOTA_UPDATE_SUCCESS. michael@0: */ michael@0: long getFotaUpdateStatus(); michael@0: };