michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this file, michael@0: * You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: /** michael@0: * This dictionnary holds the parameters sent to the network worker. michael@0: */ michael@0: dictionary NetworkCommandOptions michael@0: { michael@0: long id = 0; // opaque id. michael@0: DOMString cmd = ""; // the command name. michael@0: DOMString ifname; // for "removeNetworkRoute", "setDNS", michael@0: // "setDefaultRouteAndDNS", "removeDefaultRoute" michael@0: // "addHostRoute", "removeHostRoute" michael@0: // "removeHostRoutes". michael@0: DOMString ip; // for "removeNetworkRoute", "setWifiTethering". michael@0: unsigned long prefixLength; // for "removeNetworkRoute". michael@0: DOMString domain; // for "setDNS" michael@0: sequence dnses; // for "setDNS", "setDefaultRouteAndDNS". michael@0: DOMString oldIfname; // for "setDefaultRouteAndDNS". michael@0: DOMString gateway; // for "addSecondaryRoute", "removeSecondaryRoute". michael@0: sequence gateways; // for "setDefaultRouteAndDNS", "removeDefaultRoute", michael@0: // "addHostRoute", "removeHostRoute". michael@0: sequence hostnames; // for "addHostRoute", "removeHostRoute". michael@0: DOMString mode; // for "setWifiOperationMode". michael@0: boolean report; // for "setWifiOperationMode". michael@0: boolean isAsync; // for "setWifiOperationMode". michael@0: boolean enabled; // for "setDhcpServer". michael@0: DOMString wifictrlinterfacename; // for "setWifiTethering". michael@0: DOMString internalIfname; // for "setWifiTethering". michael@0: DOMString externalIfname; // for "setWifiTethering". michael@0: boolean enable; // for "setWifiTethering". michael@0: DOMString ssid; // for "setWifiTethering". michael@0: DOMString security; // for "setWifiTethering". michael@0: DOMString key; // for "setWifiTethering". michael@0: DOMString prefix; // for "setWifiTethering", "setDhcpServer". michael@0: DOMString link; // for "setWifiTethering", "setDhcpServer". michael@0: sequence interfaceList; // for "setWifiTethering". michael@0: DOMString wifiStartIp; // for "setWifiTethering". michael@0: DOMString wifiEndIp; // for "setWifiTethering". michael@0: DOMString usbStartIp; // for "setWifiTethering". michael@0: DOMString usbEndIp; // for "setWifiTethering". michael@0: DOMString dns1; // for "setWifiTethering". michael@0: DOMString dns2; // for "setWifiTethering". michael@0: float rxBytes; // for "getNetworkInterfaceStats". michael@0: float txBytes; // for "getNetworkInterfaceStats". michael@0: DOMString date; // for "getNetworkInterfaceStats". michael@0: long threshold; // for "setNetworkInterfaceAlarm", michael@0: // "enableNetworkInterfaceAlarm". michael@0: DOMString startIp; // for "setDhcpServer". michael@0: DOMString endIp; // for "setDhcpServer". michael@0: DOMString serverIp; // for "setDhcpServer". michael@0: DOMString maskLength; // for "setDhcpServer". michael@0: DOMString preInternalIfname; // for "updateUpStream". michael@0: DOMString preExternalIfname; // for "updateUpStream". michael@0: DOMString curInternalIfname; // for "updateUpStream". michael@0: DOMString curExternalIfname; // for "updateUpStream". michael@0: }; michael@0: michael@0: /** michael@0: * This dictionary holds the parameters sent back to NetworkService.js. michael@0: */ michael@0: dictionary NetworkResultOptions michael@0: { michael@0: long id = 0; // opaque id. michael@0: boolean ret = false; // for sync command. michael@0: boolean broadcast = false; // for netd broadcast message. michael@0: DOMString topic = ""; // for netd broadcast message. michael@0: DOMString reason = ""; // for netd broadcast message. michael@0: michael@0: long resultCode = 0; // for all commands. michael@0: DOMString resultReason = ""; // for all commands. michael@0: boolean error = false; // for all commands. michael@0: michael@0: float rxBytes = -1; // for "getNetworkInterfaceStats". michael@0: float txBytes = -1; // for "getNetworkInterfaceStats". michael@0: DOMString date = ""; // for "getNetworkInterfaceStats". michael@0: boolean enable = false; // for "setWifiTethering", "setUSBTethering" michael@0: // "enableUsbRndis". michael@0: boolean result = false; // for "enableUsbRndis". michael@0: boolean success = false; // for "setDhcpServer". michael@0: DOMString curExternalIfname = ""; // for "updateUpStream". michael@0: DOMString curInternalIfname = ""; // for "updateUpStream". michael@0: };