W3C home > Mailing lists > Public > public-dap-commits@w3.org > September 2011

2009/dap/system-info battery-status.html,1.49,1.50

From: Anssi Kostiainen via cvs-syncmail <cvsmail@w3.org>
Date: Mon, 12 Sep 2011 11:51:55 +0000
To: public-dap-commits@w3.org
Message-Id: <E1R353L-0001Fs-KJ@lionel-hutz.w3.org>
Update of /sources/public/2009/dap/system-info
In directory hutz:/tmp/cvs-serv4805

Modified Files:
	battery-status.html 
Log Message:
clarify status attribute: add a mapping table

Index: battery-status.html
===================================================================
RCS file: /sources/public/2009/dap/system-info/battery-status.html,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -d -r1.49 -r1.50
--- battery-status.html	12 Sep 2011 07:46:57 -0000	1.49
+++ battery-status.html	12 Sep 2011 11:51:53 -0000	1.50
@@ -299,15 +299,95 @@
         <dd>
           One of <code>"critical"</code>, <code>"low"</code>, <code>"ok"</code>
           or <code>null</code>.
-          Represents how much of the internal power source remains,
-          scaled from <code>critical</code> to <code>ok</code>. The
-          definitions of <code>critical</code>, <code>low</code>, and
-          <code>ok</code> mirror the definitions of
-          <a>batterycritical</a>, <a>batterylow</a> and <a>batteryok</a>
-          events respectively. If the implementation is unable to
-          report the battery's level, then status MUST be set to
-          <code>null</code>. If the device does not have a battery, then
+          Represents the battery status of the hosting device,
+          scaled from <code>critical</code> to <code>ok</code>.
+          If the implementation is unable to report the battery's level,
+          then <code>status</code> MUST be set to <code>null</code>.
+          If the device does not have a battery, then
           <code>status</code> MUST be set to <code>ok</code>.
+          <p>
+            The following table represents the relationship between
+            <code>status</code>, <code>isPlugged</code> and
+            <code>level</code> attributes, and corresponding events.
+            The definitions of <em>low_threshold</em> and
+            <em>critical_threshold</em> are left to the implementation.
+          </p>
+          <table class="simple">
+            <thead>
+              <tr>
+                <th>
+                  status
+                </th>
+                <th>
+                  isPlugged
+                </th>
+                <th>
+                  level
+                </th>
+                <th>
+                  Corresponding event
+                </th>
+              </tr>
+            </thead>
+            <tbody>
+              <tr>
+                <td>
+                  <code>critical</code>
+                </td>
+                <td>
+                  <code>false</code>
+                </td>
+                <td>
+                  <code>level</code> &lt; <em>critical_threshold</em>
+                </td>
+                <td>
+                  <a>batterycritical</a>
+                </td>
+              </tr>
+              <tr>
+                <td>
+                  <code>low</code>
+                </td>
+                <td>
+                  <code>false</code>
+                </td>
+                <td>
+                  <em>critical_threshold</em> &lt; <code>level</code> &lt;
+                  <em>low_threshold</em>
+                </td>
+                <td>
+                  <a>batterylow</a>
+                </td>
+              </tr>
+              <tr>
+                <td>
+                  <code>ok</code>
+                </td>
+                <td>
+                  <code>true</code>
+                </td>
+                <td>
+                  <code>level</code> &gt; <em>low_threshold</em>
+                </td>
+                <td>
+                  <a>batteryok</a>
+                </td>
+              </tr>
+              <tr>
+                <td>
+                  <code>null</code>
+                </td>
+                <td>
+                  <code>true</code> or <code>false</code>
+                </td>
+                <td>
+                  <code>null</code>
+                </td>
+                <td>
+                </td>
+              </tr>
+            </tbody>
+          </table>
         </dd>
       </dl>
       <dl title='dictionary BatteryStatusEventInit : EventInit'
@@ -436,6 +516,7 @@
         <p>
           The definition of a low battery condition is left to the
           implementation.
+        </p>
         <p>
           The condition corresponds to the value of <code>low</code> of
           the <code>status</code> attribute on the <a>BatteryStatusEvent</a>
Received on Monday, 12 September 2011 11:51:58 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 12 September 2011 11:51:59 GMT