W3C home > Mailing lists > Public > public-dap-commits@w3.org > December 2009

2009/dap/system-info Overview.html,1.25,1.26

From: Max Froumentin via cvs-syncmail <cvsmail@w3.org>
Date: Tue, 08 Dec 2009 10:08:56 +0000
To: public-dap-commits@w3.org
Message-Id: <E1NHx04-0002Vc-7F@lionel-hutz.w3.org>
Update of /sources/public/2009/dap/system-info
In directory hutz:/tmp/cvs-serv9629

Modified Files:
	Overview.html 
Log Message:
chenges following Robin's comments at http://www.w3.org/mid/9F5B5F53-7A1F-40C6-84DB-D4A1970F45BD@robineko.com


Index: Overview.html
===================================================================
RCS file: /sources/public/2009/dap/system-info/Overview.html,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- Overview.html	8 Dec 2009 08:54:19 -0000	1.25
+++ Overview.html	8 Dec 2009 10:08:54 -0000	1.26
@@ -23,12 +23,25 @@
   </head>
   <body>
     <section id='abstract'>
-      A proposal for the Device <abbr title="Application Programming
+      @@ TO COMPLETE<br/>A proposal for the Device <abbr title="Application Programming
       Interface">API</abbr> and Policy Working Group System
       Information and Events API.
     </section>
+
+    <section id="sotd">
+      <p>
+        @@ TO COMPLETE
+      </p>
+    </section>
+
     <section class='introduction'>
       <h2>Introduction</h2>
+      @@ TO COMPLETE
+    </section>
+
+    <section class='conformance'>
+      <h2>Conformance</h2>
+      @@ TO COMPLETE
     </section>
 
     <section class='privacy'>
@@ -41,9 +54,9 @@
       <section>
         <h3>The <a>System</a> interface</h3>
 
-        <p>Objects implementing the <code>NavigatorDevice</code>
-        interface (e.g. the <code>window.navigator.device</code>
-        object in Web browsers [NAVIGATOR]) provide access to the
+        <p>Objects implementing the <a>NavigatorDevice</a>
+        interface (e.g. the <a>window.navigator.device</a>
+        object in Web browsers [[!NAVIGATOR]]) provide access to the
         interfaces defined below through the
         <code>System</code> interface. An instance of
         <code>System</code> would be then obtained by using
@@ -51,19 +64,19 @@
         NavigatorDevice.</p>
 
         <dl title='[NoInterfaceObject] interface System' class='idl'>
-          <dt>PendingOp get(DOMString propertyId, SuccessCB successCallback, optional ErrorCB? errorCallback, optional Options? options)</dt>
+          <dt>PendingOp get(DOMString propertyId, SuccessCB successCallback, optional ErrorCB? errorCallback, optional options)</dt>
 
           <dd>
             The <code>get</code> function retrieves the current state
             of any combination of system properties. When called, the
-            function MUST immediately return and asynchronously
+            function immediately returns and asynchronously
             acquires the current state of the values passed to the
             filter. If it is successful the success callback is
             invoked and is passed a <code>SystemState</code> object
             containing the requested information. If an error occurs,
             and an <code>errorCallback</code> function is passed, that
-            function is invoked and is passed a
-            <code>PowerError</code> object indicating the cause of
+            function is invoked and is passed an
+            <code>Error</code> object indicating the cause of
             error.
           
             <dl class="parameters">
@@ -73,22 +86,22 @@
               <dd>function called when the properties have been successfully retrieved</dd>
               <dt>optional ErrorCB? errorCallback</dt>
               <dd>function called when an error occurred while retrieving the properties</dd>
-              <dt>optional Options? options</dt>
+              <dt>optional options</dt>
               <dd>An object containing the various options for fetching the properties requested</dd>
             </dl>
           </dd>
 
-          <dt>PendingOp watch(DOMString propertyId, SuccessCB successCallback, optional ErrorCB? errorCallback, optional Options? options)</dt>
+          <dt>PendingOp watch(DOMString propertyId, SuccessCB successCallback, optional ErrorCB? errorCallback, optional Options options)</dt>
           <dd>The <code>watch</code> function allows tracking the change
-          of one or several system properties.  When called, it MUST
-          immediately return and then asynchronously start a watch process
+          of one or several system properties.  When called, it 
+          immediately returns and then asynchronously starts a watch process
           defined as the following set of steps:
             <ol>
               <li>Acquire a new <code>SystemState</code> object that reflects the system's
               current state. If successful, invoke the associated 
               <code>successCallback</code> with a <code>SystemState</code> object as an 
               argument. If the attempt fails, and the method was invoked with a non-null 
-              <code>errorCallback</code> argument, this method MUST invoke the 
+              <code>errorCallback</code> argument, this method invokes the 
               <code>errorCallback</code> with an <code>ErrorCB</code> object as an 
               argument.</li>
               <li>Register to receive system events that indicate that the status of the requested properties may have changed</li>
@@ -97,7 +110,7 @@
               <code>SystemState</code> object as an argument. If an
               error occurs, and the method was invoked with a
               non-null <code>errorCallback</code> argument, this
-              method MUST invoke the <code>errorCallback</code> with
+              method invokes the <code>errorCallback</code> with
               an <code>ErrorCB</code> object as an argument.</li>
               <li>Repeat the previous step until the
               <code>cancel</code> method of the <code>PendingOp</code>
@@ -111,22 +124,22 @@
               <dd>function called when the properties have been successfully retrieved</dd>
               <dt>optional ErrorCB? errorCallback</dt>
               <dd>function called when an error occurred while retrieving the properties</dd>
-              <dt>optional Options? options</dt>
+              <dt>optional Options options</dt>
               <dd>An object containing the various options for fetching the properties requested</dd>
             </dl>
           </dd>
-          <dt>PendingOp set(DOMString propertyId, SuccessCB successCallback, optional ErrorCB? errorCallback, optional Options? options)</dt>
+          <dt>PendingOp set(DOMString propertyId, SuccessCB successCallback, optional ErrorCB? errorCallback, optional Options options)</dt>
           <dd>
             The <code>set</code> function modifies the current value
-            of of a system property. When called, the function MUST
-            immediately return and asynchronously attempt to set the
+            of of a system property. When called, the function
+            immediately returns and asynchronously attempts to set the
             requested state of the values passed to the filter. If it
             is successful the success callback is invoked and is
             passed a <code>SystemState</code> object containing the
             requested information. If an error occurs, or if the
             system does not allow the value to be modified, then the
             <code>errorCallback</code> function is invoked and is
-            passed a <code>PowerError</code> object indicating the
+            passed an <code>Error</code> object indicating the
             cause of error.
           
             <dl class="parameters">
@@ -136,6 +149,8 @@
               <dd>function called when the property have been successfully modified</dd>
               <dt>optional ErrorCB? errorCallback</dt>
               <dd>function called when an error occurred while modifying the property</dd>
+              <dt>optional Options options</dt>
+              <dd>An object containing the various options for fetching the properties requested</dd>
             </dl>
           </dd>
         </dl>
@@ -151,14 +166,14 @@
           <dt>attribute double highThreshold</dt>
           <dd>This attribute has no effect on the <code>get</code>
           method. On the <code>watch</code> method, it indicates that
-          the successCallback MUST only be triggered if the property
+          the successCallback is only be triggered if the property
           is a number and its value is greater than or equal this
           number.</dd>
           
           <dt>attribute double lowThreshold</dt>
           <dd>This attribute has no effect on the <code>get</code>
           method. On the <code>watch</code> method, it indicates that
-          the successCallback MUST only be triggered if the property
+          the successCallback is only be triggered if the property
           is a number and its value is lower than or equal this
           number.</dd>
         </dl>
@@ -175,7 +190,7 @@
 
         <section>
           <h4>ECMAScript Example</h4>
-          <pre class="example">
+          <pre class="sh_javascript example">
 var success = function(power.level) {
   alert("Low battery level: "+power.level);
 }
@@ -192,7 +207,7 @@
             <ul>
               <li>URI: <code>http://www.w3.org/2009/dap/SysInfo/Power#batteryLevel</code></li>
               <li>Curie: <code>power:batteryLevel</code></li>
-              <li>Type of returned value: <code>PowerState</code></li>
+              <li>Value type: <code>PowerState</code></li>
               <li>Corresponding DCO property: <a href="">@@</a></li>
             </ul>
 
@@ -208,14 +223,12 @@
 
                 <dt>attribute unsigned int timeRemaining</dt>
                 <dd>
-                  Specifies that the success callback parameter MUST be an
-                  <code>unsigned int</code> value representing the
-                  estimated time remaining (in milliseconds) before the
-                  system enters shutdown mode.  If
-                  <code>usingExternalPowerSource</code> is true and
-                  <code>rate</code> is greater than or equal to 0, this
-                  value MUST be 0, meaning that there is essentially
-                  infinite time remaining.
+                  Represents the estimated time remaining (in
+                  milliseconds) before the system enters shutdown
+                  mode.  If <code>usingExternalPowerSource</code> is
+                  true and <code>rate</code> is greater than or equal
+                  to 0, this value MUST be 0, meaning that there is
+                  essentially infinite time remaining.
                 </dd>
 
                 <dt>attribute boolean externalSource</dt>
@@ -246,7 +259,7 @@
         
         <section>
           <h4>ECMAScript Example</h4>
-          <pre class="example">
+          <pre class="sh_javascript example">
 var success = function(cpu) {
   document.getElementById("cpuIndicator").innerHTML=("CPU: "+cpu.load);
 }
@@ -262,10 +275,10 @@
               <li>URI: <code>http://www.w3.org/2009/dap/sysinfo/internal#CPULoad</code></li>
               <li>Curie: <code>internal:CPULoad</code></li>
               <li>Corresponding DCO property: <a href="">@@</a></li>
-              <li>Type of returned value: <code>CpuLoad</code></li>
+              <li>Value type: <code>CpuLoad</code></li>
             </ul>
 
-            <dl title="[NoInterfaceObject] interface PowerState" class="idl">
+            <dl title="[NoInterfaceObject] interface CpuState" class="idl">
               <dt>attribute float load</dt>
               <dd>
                 This attribute indicates the current CPU load, as a
@@ -282,7 +295,7 @@
             <ul>
               <li>URI: <code>http://www.w3.org/2009/dap/sysinfo/internal#temperature</code></li>
               <li>Curie: <code>internal:temperature</code></li>
-              <li>Type of returned value: <code>Temperature</code></li>
+              <li>Value type: <code>Temperature</code></li>
               <li>Corresponding DCO property: <a href="">@@</a></li>
             </ul>
 
@@ -295,8 +308,8 @@
                 system is running at the lowest safe temperature, and a
                 value of 1.0 means that the system is running at the
                 highest safe temparature. On devices that have multiple
-                thermometers, this value should reflect the average
-                temperature of all the thermometers.
+                thermometers, this value should reflect the global
+                internal temperature of the device.
               </dd>
             </dl>
           </section>
@@ -307,7 +320,7 @@
               <li>URI: <code>http://www.w3.org/2009/dap/sysinfo/internal#fanThrottle</code></li>
               <li>Curie: <code>internal:fanThrottle</code></li>
               <li>Corresponding DCO property: <a href="">@@</a></li>
-              <li>Type of returned value: <code>FanThrottle</code></li>
+              <li>Value type: <code>FanThrottle</code></li>
             </ul>
 
             <dl title="[NoInterfaceObject] interface Fanthrottle" class="idl">
@@ -327,21 +340,29 @@
       </section>
       <!--******************** /Internal **********************************-->
 
+      <!--******************** Network **********************************-->
+
       <section>
         <h3>Network</h3>
         <p>Properties relating to the type or capabilities of the device's internet connections</p>
         <section>
           <h4>Example</h4>
-          <pre>
+          <pre class="sh_javascript example">
 function success(net) {
   if(net.type==NetState.WI_FI) 
     document.getElementById("Wireless adaptor connected to "+net.wifi.essid+
                             " at "+(net.wifi.signalStrength*100)+"%");
 }
 
-navigator.device.system.watch("net:type",success,null);
+navigator.device.system.watch("net:type",success,null);</pre>
+
+      <!--******************** /Network **********************************-->
+
+      <hr/>
+      <h1>Stop Reading Here!</h1>
+      <p>Below this point the draft is set to be completely reedited in order to adapt to the design above</p>
+
 
-      <!--******************** /Internal **********************************-->
   <section>
     <h3>Display</h3>
       <p>The <code>window.screen</code> object already exposes width, height, availWidth, availHeight,
Received on Tuesday, 8 December 2009 10:09:00 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 December 2009 10:09:01 GMT