dom/wifi/nsIWifi.idl

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/dom/wifi/nsIWifi.idl	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,60 @@
     1.4 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.5 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.6 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.7 +
     1.8 +#include "nsISupports.idl"
     1.9 +#include "nsIDOMDOMRequest.idl"
    1.10 +#include "nsIDOMEvent.idl"
    1.11 +
    1.12 +interface nsIVariant;
    1.13 +
    1.14 +[scriptable, uuid(cf1ac02b-1f39-446e-815b-651ac78d2233)]
    1.15 +interface nsIWifiScanResult : nsISupports {
    1.16 +    readonly attribute DOMString ssid;
    1.17 +    readonly attribute DOMString bssid;
    1.18 +
    1.19 +    const int32_t WPA_PSK = 0x01;
    1.20 +    const int32_t WPA_EAP = 0x02;
    1.21 +    const int32_t WEP = 0x04;
    1.22 +    readonly attribute uint32_t capabilities;
    1.23 +
    1.24 +    /**
    1.25 +     * Strength of the signal to network.
    1.26 +     */
    1.27 +    readonly attribute uint32_t signalStrength;
    1.28 +
    1.29 +    readonly attribute uint32_t relSignalStrength;
    1.30 +    readonly attribute boolean connected;
    1.31 +};
    1.32 +
    1.33 +[scriptable, uuid(a6931ebf-8493-4014-90e2-99f406999982)]
    1.34 +interface nsIWifiScanResultsReady : nsISupports {
    1.35 +
    1.36 +    /**
    1.37 +     * Callback with list of networks.
    1.38 +     */
    1.39 +    void onready(in uint32_t count, [array, size_is(count)] in nsIWifiScanResult results);
    1.40 +
    1.41 +    /**
    1.42 +     * Callback if scanning for networks failed after 3 retry attempts.
    1.43 +     */
    1.44 +    void onfailure();
    1.45 +};
    1.46 +
    1.47 +[scriptable, uuid(08dfefed-5c5d-4468-8c5d-2c65c24692d9)]
    1.48 +interface nsIWifi : nsISupports
    1.49 +{
    1.50 +    /**
    1.51 +     * Shutdown the wifi system.
    1.52 +     */
    1.53 +    void shutdown();
    1.54 +
    1.55 +    /**
    1.56 +     * Returns the list of currently available networks as well as the list of
    1.57 +     * currently configured networks.
    1.58 +     *
    1.59 +     * On success a callback is notified with the list of networks.
    1.60 +     * On failure after 3 scan retry attempts a callback is notified of failure.
    1.61 +     */
    1.62 +    void getWifiScanResults(in nsIWifiScanResultsReady callback);
    1.63 +};

mercurial