Thu, 15 Jan 2015 15:55:04 +0100
Back out 97036ab72558 which inappropriately compared turds to third parties.
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 |
michael@0 | 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 4 | |
michael@0 | 5 | #include "nsISupports.idl" |
michael@0 | 6 | #include "nsIDOMDOMRequest.idl" |
michael@0 | 7 | #include "nsIDOMEvent.idl" |
michael@0 | 8 | |
michael@0 | 9 | interface nsIVariant; |
michael@0 | 10 | |
michael@0 | 11 | [scriptable, uuid(cf1ac02b-1f39-446e-815b-651ac78d2233)] |
michael@0 | 12 | interface nsIWifiScanResult : nsISupports { |
michael@0 | 13 | readonly attribute DOMString ssid; |
michael@0 | 14 | readonly attribute DOMString bssid; |
michael@0 | 15 | |
michael@0 | 16 | const int32_t WPA_PSK = 0x01; |
michael@0 | 17 | const int32_t WPA_EAP = 0x02; |
michael@0 | 18 | const int32_t WEP = 0x04; |
michael@0 | 19 | readonly attribute uint32_t capabilities; |
michael@0 | 20 | |
michael@0 | 21 | /** |
michael@0 | 22 | * Strength of the signal to network. |
michael@0 | 23 | */ |
michael@0 | 24 | readonly attribute uint32_t signalStrength; |
michael@0 | 25 | |
michael@0 | 26 | readonly attribute uint32_t relSignalStrength; |
michael@0 | 27 | readonly attribute boolean connected; |
michael@0 | 28 | }; |
michael@0 | 29 | |
michael@0 | 30 | [scriptable, uuid(a6931ebf-8493-4014-90e2-99f406999982)] |
michael@0 | 31 | interface nsIWifiScanResultsReady : nsISupports { |
michael@0 | 32 | |
michael@0 | 33 | /** |
michael@0 | 34 | * Callback with list of networks. |
michael@0 | 35 | */ |
michael@0 | 36 | void onready(in uint32_t count, [array, size_is(count)] in nsIWifiScanResult results); |
michael@0 | 37 | |
michael@0 | 38 | /** |
michael@0 | 39 | * Callback if scanning for networks failed after 3 retry attempts. |
michael@0 | 40 | */ |
michael@0 | 41 | void onfailure(); |
michael@0 | 42 | }; |
michael@0 | 43 | |
michael@0 | 44 | [scriptable, uuid(08dfefed-5c5d-4468-8c5d-2c65c24692d9)] |
michael@0 | 45 | interface nsIWifi : nsISupports |
michael@0 | 46 | { |
michael@0 | 47 | /** |
michael@0 | 48 | * Shutdown the wifi system. |
michael@0 | 49 | */ |
michael@0 | 50 | void shutdown(); |
michael@0 | 51 | |
michael@0 | 52 | /** |
michael@0 | 53 | * Returns the list of currently available networks as well as the list of |
michael@0 | 54 | * currently configured networks. |
michael@0 | 55 | * |
michael@0 | 56 | * On success a callback is notified with the list of networks. |
michael@0 | 57 | * On failure after 3 scan retry attempts a callback is notified of failure. |
michael@0 | 58 | */ |
michael@0 | 59 | void getWifiScanResults(in nsIWifiScanResultsReady callback); |
michael@0 | 60 | }; |