Bumping manifests a=b2g-bump
[gecko.git] / dom / webidl / MozTetheringManager.webidl
blob57cde749ffac359459118c4f63af855551bf2e6b
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
3  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5 enum TetheringType {
6   "bluetooth",
7   "usb",
8   "wifi"
9 };
11 enum SecurityType {
12   "open",
13   "wpa-psk",
14   "wpa2-psk"
17 dictionary WifiTetheringConfig {
18   DOMString ssid;
19   SecurityType security;
20   DOMString key;
23 dictionary TetheringConfiguration {
24   DOMString ip;
25   DOMString prefix;
26   DOMString startIp;
27   DOMString endIp;
28   DOMString dns1;
29   DOMString dns2;
30   WifiTetheringConfig wifiConfig;
33 [JSImplementation="@mozilla.org/tetheringmanager;1",
34  NavigatorProperty="mozTetheringManager",
35  AvailableIn="CertifiedApps"]
36 interface MozTetheringManager {
37   /**
38    * Enable/Disable tethering.
39    * @param enabled True to enable tethering, False to disable tethering.
40    * @param type Tethering type to enable/disable.
41    * @param config Configuration should have following fields when enable is True:
42    *               - ip ip address.
43    *               - prefix mask length.
44    *               - startIp start ip address allocated by DHCP server for tethering.
45    *               - endIp end ip address allocated by DHCP server for tethering.
46    *               - dns1 first DNS server address.
47    *               - dns2 second DNS server address.
48    *               - wifiConfig wifi tethering configuration
49    *                  - ssid SSID network name.
50    *                  - security open, wpa-psk or wpa2-psk.
51    *                  - key password for wpa-psk or wpa2-psk.
52    *               config should not be set when enabled is False.
53    */
54   Promise<any> setTetheringEnabled(boolean enabled,
55                                    TetheringType type,
56                                    optional TetheringConfiguration config);