Bug 784733 - Define wifi power saving mode api interface. r=mrbkap
authorVincent Chang <vchang@mozilla.com>
Tue, 18 Sep 2012 15:03:46 +0800
changeset 108074 8381cb18f0f6bd3e0ac550515d215921b60dcdd1
parent 108073 97b007a4a58766b6c2370260743e525986d00913
child 108075 bebaecb60f44c15310cca144f6a5f5231837ad69
push id82
push usershu@rfrn.org
push dateFri, 05 Oct 2012 13:20:22 +0000
reviewersmrbkap
bugs784733
milestone18.0a1
Bug 784733 - Define wifi power saving mode api interface. r=mrbkap
dom/wifi/nsIWifi.idl
--- a/dom/wifi/nsIWifi.idl
+++ b/dom/wifi/nsIWifi.idl
@@ -31,17 +31,17 @@ interface nsIWifi : nsISupports
     /**
      * Request to enable/disable Wifi Tethering.
      * enabled: true or false.
      * callback: report status to NetworkManager.
      */
     void setWifiTethering(in boolean enabled, in nsIWifiTetheringCallback callback);
 };
 
-[scriptable, uuid(540674a6-edbe-11e1-87c9-dbcd31c74284)]
+[scriptable, uuid(e3a967e0-015e-11e2-a21f-0800200c9a66)]
 interface nsIDOMWifiManager : nsISupports
 {
     /**
      * Returns the list of currently available networks as well as the list of
      * currently configured networks.
      * onsuccess: We have obtained the current list of networks. request.value
      *            is an object whose property names are SSIDs and values are
      *            network objects.
@@ -83,16 +83,24 @@ interface nsIDOMWifiManager : nsISupport
      *               If method field is 'pin', 'pin' field can exist and has
      *               a PIN number.
      * onsuccess: We have successfully started/canceled wps.
      * onerror: We have failed to start/cancel wps.
      */
     nsIDOMDOMRequest wps(in jsval detail);
 
     /**
+     * Turn on/off wifi power saving mode.
+     * @param enabled true or false.
+     * onsuccess: We have successfully turn on/off wifi power saving mode.
+     * onerror: We have failed to turn on/off wifi power saving mode.
+     */
+    nsIDOMDOMRequest setPowerSavingMode(in boolean enabled);
+
+    /**
      * Returns whether or not wifi is currently enabled.
      */
     readonly attribute boolean enabled;
 
     /**
      * An non-null object containing the following information:
      *  - status ("disconnected", "connecting", "associated", "connected")
      *  - network