hal/gonk/nsIRecoveryService.idl

changeset 2
7e26c7da4463
equal deleted inserted replaced
-1:000000000000 0:57f3da43a133
1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
3 * You can obtain one at http://mozilla.org/MPL/2.0/. */
4
5 #include "nsISupports.idl"
6
7 [scriptable, uuid(acb93ff8-aa6d-4bc8-bedd-2a6a3b802a74)]
8 interface nsIRecoveryService : nsISupports
9 {
10 /**
11 * Possible values of fotaStatus.result. These should stay in sync with
12 * librecovery/librecovery.h
13 */
14 const long FOTA_UPDATE_UNKNOWN = 0;
15 const long FOTA_UPDATE_FAIL = 1;
16 const long FOTA_UPDATE_SUCCESS = 2;
17
18 /**
19 * Uses recovery to wipe the data and cache partitions. If this call is
20 * successful, the device should reboot before the function call ever returns.
21 *
22 * @throws NS_ERROR_FAILURE when rebooting into recovery fails for some reason.
23 */
24 void factoryReset();
25
26 /**
27 * Use recovery to install an OTA update.zip. If this call is
28 * successful, the device should reboot before the function call ever returns.
29 *
30 * @throws NS_ERROR_FAILURE when rebooting into recovery fails for some reason.
31 */
32 void installFotaUpdate(in string updatePath);
33
34 /**
35 * @return The status of the last FOTA update. One of FOTA_UPDATE_UNKNOWN,
36 * FOTA_UPDATE_FAIL, FOTA_UPDATE_SUCCESS.
37 */
38 long getFotaUpdateStatus();
39 };

mercurial