2012-05-21 11:12:37 +00:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2011-12-06 14:14:55 +00:00
|
|
|
|
|
|
|
#include "nsISupports.idl"
|
2012-03-14 20:39:15 +00:00
|
|
|
#include "nsIDOMDOMRequest.idl"
|
|
|
|
#include "nsIDOMEvent.idl"
|
2012-02-16 14:00:53 +00:00
|
|
|
|
2012-06-16 18:14:12 +00:00
|
|
|
interface nsIVariant;
|
|
|
|
|
2012-10-02 00:40:19 +00:00
|
|
|
[scriptable, uuid(cf1ac02b-1f39-446e-815b-651ac78d2233)]
|
|
|
|
interface nsIWifiScanResult : nsISupports {
|
|
|
|
readonly attribute DOMString ssid;
|
|
|
|
readonly attribute DOMString bssid;
|
|
|
|
|
|
|
|
const int32_t WPA_PSK = 0x01;
|
|
|
|
const int32_t WPA_EAP = 0x02;
|
|
|
|
const int32_t WEP = 0x04;
|
|
|
|
readonly attribute uint32_t capabilities;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Strength of the signal to network.
|
|
|
|
*/
|
|
|
|
readonly attribute uint32_t signalStrength;
|
|
|
|
|
|
|
|
readonly attribute uint32_t relSignalStrength;
|
|
|
|
readonly attribute boolean connected;
|
|
|
|
};
|
|
|
|
|
|
|
|
[scriptable, uuid(a6931ebf-8493-4014-90e2-99f406999982)]
|
|
|
|
interface nsIWifiScanResultsReady : nsISupports {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Callback with list of networks.
|
|
|
|
*/
|
|
|
|
void onready(in uint32_t count, [array, size_is(count)] in nsIWifiScanResult results);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Callback if scanning for networks failed after 3 retry attempts.
|
|
|
|
*/
|
|
|
|
void onfailure();
|
|
|
|
};
|
|
|
|
|
|
|
|
[scriptable, uuid(08dfefed-5c5d-4468-8c5d-2c65c24692d9)]
|
2012-06-16 18:14:12 +00:00
|
|
|
interface nsIWifi : nsISupports
|
|
|
|
{
|
2012-03-20 13:57:07 +00:00
|
|
|
/**
|
|
|
|
* Shutdown the wifi system.
|
|
|
|
*/
|
|
|
|
void shutdown();
|
2012-10-02 00:40:19 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns the list of currently available networks as well as the list of
|
|
|
|
* currently configured networks.
|
|
|
|
*
|
|
|
|
* On success a callback is notified with the list of networks.
|
|
|
|
* On failure after 3 scan retry attempts a callback is notified of failure.
|
|
|
|
*/
|
|
|
|
void getWifiScanResults(in nsIWifiScanResultsReady callback);
|
2011-12-06 14:14:55 +00:00
|
|
|
};
|