Bug 1025824 - Fix mHwcLayerMap handling r=sushil
[gecko.git] / dom / wifi / nsIWifi.idl
blob82ab9a75bd2d529c77bb4137e5ef5b9d44571c10
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 #include "nsISupports.idl"
6 #include "nsIDOMDOMRequest.idl"
7 #include "nsIDOMEvent.idl"
9 interface nsIVariant;
11 [scriptable, uuid(cf1ac02b-1f39-446e-815b-651ac78d2233)]
12 interface nsIWifiScanResult : nsISupports {
13 readonly attribute DOMString ssid;
14 readonly attribute DOMString bssid;
16 const int32_t WPA_PSK = 0x01;
17 const int32_t WPA_EAP = 0x02;
18 const int32_t WEP = 0x04;
19 readonly attribute uint32_t capabilities;
21 /**
22 * Strength of the signal to network.
24 readonly attribute uint32_t signalStrength;
26 readonly attribute uint32_t relSignalStrength;
27 readonly attribute boolean connected;
30 [scriptable, uuid(a6931ebf-8493-4014-90e2-99f406999982)]
31 interface nsIWifiScanResultsReady : nsISupports {
33 /**
34 * Callback with list of networks.
36 void onready(in uint32_t count, [array, size_is(count)] in nsIWifiScanResult results);
38 /**
39 * Callback if scanning for networks failed after 3 retry attempts.
41 void onfailure();
44 [scriptable, uuid(08dfefed-5c5d-4468-8c5d-2c65c24692d9)]
45 interface nsIWifi : nsISupports
47 /**
48 * Shutdown the wifi system.
50 void shutdown();
52 /**
53 * Returns the list of currently available networks as well as the list of
54 * currently configured networks.
56 * On success a callback is notified with the list of networks.
57 * On failure after 3 scan retry attempts a callback is notified of failure.
59 void getWifiScanResults(in nsIWifiScanResultsReady callback);