mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-04 16:15:25 +00:00
7f6b485c6a
Adopted from Shih-Chiang Chien's original code.
76 lines
2.7 KiB
Plaintext
76 lines
2.7 KiB
Plaintext
/* 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 "domstubs.idl"
|
|
|
|
[scriptable, uuid(3615a616-571d-4194-bf54-ccf546067b14)]
|
|
interface nsIB2GCameraContent : nsISupports
|
|
{
|
|
/* temporary solution, waiting for getUserMedia */
|
|
DOMString getCameraURI([optional] in jsval options);
|
|
};
|
|
|
|
[scriptable, uuid(53990d7a-ab2a-11e1-8543-7767e4cbcbff)]
|
|
interface nsIB2GKeyboard : nsISupports
|
|
{
|
|
void sendKey(in long keyCode, in long charCode);
|
|
|
|
// Select the <select> option specified by index.
|
|
// If this method is called on a <select> that support multiple
|
|
// selection, then the option specified by index will be added to
|
|
// the selection.
|
|
// If this method is called for a select that does not support multiple
|
|
// selection the previous element will be unselected.
|
|
void setSelectedOption(in jsval index);
|
|
|
|
// Select the <select> options specified by indexes. All other options
|
|
// will be deselected.
|
|
// If this method is called for a <select> that does not support multiple
|
|
// selection, then the last index specified in indexes will be selected.
|
|
void setSelectedOptions(in jsval indexes);
|
|
|
|
// Set the value on the currently focused element. This has to be used
|
|
// for special situations where the value had to be chosen amongst a
|
|
// list (type=month) or a widget (type=date, time, etc.).
|
|
// If the value passed in parameter isn't valid (in the term of HTML5
|
|
// Forms Validation), the value will simply be ignored by the element.
|
|
void setValue(in jsval value);
|
|
|
|
attribute nsIDOMEventListener onfocuschange;
|
|
};
|
|
|
|
[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();
|
|
};
|