Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
michael@0 | 1 | /* This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this file, |
michael@0 | 3 | * You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 4 | |
michael@0 | 5 | /** |
michael@0 | 6 | * This dictionnary holds the parameters sent to the network worker. |
michael@0 | 7 | */ |
michael@0 | 8 | dictionary NetworkCommandOptions |
michael@0 | 9 | { |
michael@0 | 10 | long id = 0; // opaque id. |
michael@0 | 11 | DOMString cmd = ""; // the command name. |
michael@0 | 12 | DOMString ifname; // for "removeNetworkRoute", "setDNS", |
michael@0 | 13 | // "setDefaultRouteAndDNS", "removeDefaultRoute" |
michael@0 | 14 | // "addHostRoute", "removeHostRoute" |
michael@0 | 15 | // "removeHostRoutes". |
michael@0 | 16 | DOMString ip; // for "removeNetworkRoute", "setWifiTethering". |
michael@0 | 17 | unsigned long prefixLength; // for "removeNetworkRoute". |
michael@0 | 18 | DOMString domain; // for "setDNS" |
michael@0 | 19 | sequence<DOMString> dnses; // for "setDNS", "setDefaultRouteAndDNS". |
michael@0 | 20 | DOMString oldIfname; // for "setDefaultRouteAndDNS". |
michael@0 | 21 | DOMString gateway; // for "addSecondaryRoute", "removeSecondaryRoute". |
michael@0 | 22 | sequence<DOMString> gateways; // for "setDefaultRouteAndDNS", "removeDefaultRoute", |
michael@0 | 23 | // "addHostRoute", "removeHostRoute". |
michael@0 | 24 | sequence<DOMString> hostnames; // for "addHostRoute", "removeHostRoute". |
michael@0 | 25 | DOMString mode; // for "setWifiOperationMode". |
michael@0 | 26 | boolean report; // for "setWifiOperationMode". |
michael@0 | 27 | boolean isAsync; // for "setWifiOperationMode". |
michael@0 | 28 | boolean enabled; // for "setDhcpServer". |
michael@0 | 29 | DOMString wifictrlinterfacename; // for "setWifiTethering". |
michael@0 | 30 | DOMString internalIfname; // for "setWifiTethering". |
michael@0 | 31 | DOMString externalIfname; // for "setWifiTethering". |
michael@0 | 32 | boolean enable; // for "setWifiTethering". |
michael@0 | 33 | DOMString ssid; // for "setWifiTethering". |
michael@0 | 34 | DOMString security; // for "setWifiTethering". |
michael@0 | 35 | DOMString key; // for "setWifiTethering". |
michael@0 | 36 | DOMString prefix; // for "setWifiTethering", "setDhcpServer". |
michael@0 | 37 | DOMString link; // for "setWifiTethering", "setDhcpServer". |
michael@0 | 38 | sequence<DOMString> interfaceList; // for "setWifiTethering". |
michael@0 | 39 | DOMString wifiStartIp; // for "setWifiTethering". |
michael@0 | 40 | DOMString wifiEndIp; // for "setWifiTethering". |
michael@0 | 41 | DOMString usbStartIp; // for "setWifiTethering". |
michael@0 | 42 | DOMString usbEndIp; // for "setWifiTethering". |
michael@0 | 43 | DOMString dns1; // for "setWifiTethering". |
michael@0 | 44 | DOMString dns2; // for "setWifiTethering". |
michael@0 | 45 | float rxBytes; // for "getNetworkInterfaceStats". |
michael@0 | 46 | float txBytes; // for "getNetworkInterfaceStats". |
michael@0 | 47 | DOMString date; // for "getNetworkInterfaceStats". |
michael@0 | 48 | long threshold; // for "setNetworkInterfaceAlarm", |
michael@0 | 49 | // "enableNetworkInterfaceAlarm". |
michael@0 | 50 | DOMString startIp; // for "setDhcpServer". |
michael@0 | 51 | DOMString endIp; // for "setDhcpServer". |
michael@0 | 52 | DOMString serverIp; // for "setDhcpServer". |
michael@0 | 53 | DOMString maskLength; // for "setDhcpServer". |
michael@0 | 54 | DOMString preInternalIfname; // for "updateUpStream". |
michael@0 | 55 | DOMString preExternalIfname; // for "updateUpStream". |
michael@0 | 56 | DOMString curInternalIfname; // for "updateUpStream". |
michael@0 | 57 | DOMString curExternalIfname; // for "updateUpStream". |
michael@0 | 58 | }; |
michael@0 | 59 | |
michael@0 | 60 | /** |
michael@0 | 61 | * This dictionary holds the parameters sent back to NetworkService.js. |
michael@0 | 62 | */ |
michael@0 | 63 | dictionary NetworkResultOptions |
michael@0 | 64 | { |
michael@0 | 65 | long id = 0; // opaque id. |
michael@0 | 66 | boolean ret = false; // for sync command. |
michael@0 | 67 | boolean broadcast = false; // for netd broadcast message. |
michael@0 | 68 | DOMString topic = ""; // for netd broadcast message. |
michael@0 | 69 | DOMString reason = ""; // for netd broadcast message. |
michael@0 | 70 | |
michael@0 | 71 | long resultCode = 0; // for all commands. |
michael@0 | 72 | DOMString resultReason = ""; // for all commands. |
michael@0 | 73 | boolean error = false; // for all commands. |
michael@0 | 74 | |
michael@0 | 75 | float rxBytes = -1; // for "getNetworkInterfaceStats". |
michael@0 | 76 | float txBytes = -1; // for "getNetworkInterfaceStats". |
michael@0 | 77 | DOMString date = ""; // for "getNetworkInterfaceStats". |
michael@0 | 78 | boolean enable = false; // for "setWifiTethering", "setUSBTethering" |
michael@0 | 79 | // "enableUsbRndis". |
michael@0 | 80 | boolean result = false; // for "enableUsbRndis". |
michael@0 | 81 | boolean success = false; // for "setDhcpServer". |
michael@0 | 82 | DOMString curExternalIfname = ""; // for "updateUpStream". |
michael@0 | 83 | DOMString curInternalIfname = ""; // for "updateUpStream". |
michael@0 | 84 | }; |