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/. */
17 dictionary WifiTetheringConfig {
19 SecurityType security;
23 dictionary TetheringConfiguration {
30 WifiTetheringConfig wifiConfig;
33 [JSImplementation="@mozilla.org/tetheringmanager;1",
34 NavigatorProperty="mozTetheringManager",
35 AvailableIn="CertifiedApps"]
36 interface MozTetheringManager {
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:
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.
54 Promise<any> setTetheringEnabled(boolean enabled,
56 optional TetheringConfiguration config);