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

2009/dap/system-info Overview.html,1.48,1.49

From: Max Froumentin via cvs-syncmail <cvsmail@w3.org>
Date: Wed, 30 Dec 2009 10:12:58 +0000
To: public-dap-commits@w3.org
Message-Id: <E1NPvY2-0001U0-Qh@lionel-hutz.w3.org>
Update of /sources/public/2009/dap/system-info
In directory hutz:/tmp/cvs-serv5642

Modified Files:
	Overview.html 
Log Message:
Define a SystemDevice interface that contains all attributes shared by device interfaces (Battery, CPU, etc.)


Index: Overview.html
===================================================================
RCS file: /sources/public/2009/dap/system-info/Overview.html,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -d -r1.48 -r1.49
--- Overview.html	23 Dec 2009 16:36:38 -0000	1.48
+++ Overview.html	30 Dec 2009 10:12:56 -0000	1.49
@@ -388,6 +388,20 @@
         </section>
       </section>
 
+      <!--******************Device ************************************************-->
+      <section>
+        <h2>The <a>SystemDevice</a> interface</h2>
+          <p>This interface gathers attributes shared by all properties describing system devices (i.e. all the <a>enumerable</a> properties). Examples: single battery units, CPU, or network connections.</p>
+          <dl title='[NoInterfaceObject] interface SystemDevice' class='idl'>
+            <dt>readonly attribute DOMString? info</dt>
+            <dd>A free-form string describing this device, e.g. the name of its manufacturer.</dd>
+            
+            <dt>readonly attribute DOMString id</dt>
+            <dd>A free-form string identifying this device. The value of this element MUST be unique within the list reported in the object enumerating this device, e.g. the PowerState object.</dd>
+          </dl>
+      </section>
+
+          
       <!--****************** Power ************************************************-->
       <section id="power">
         <h2>Power</h2>
@@ -449,7 +463,11 @@
           <h4>The <a>PowerSource</a> Property</h4>
           <p>This property describes the state of a single power source connected to the system. It is <a>enumerable</a>.</p>
 
-          <dl title="[NoInterfaceObject] interface PowerSource" class="idl">
+          <p class="issue">Many interfaces below uses inheritance (even multiple). Should we use <a href="http://dev.w3.org/2006/webapi/WebIDL/#PrototypeRoot">PrototypeRoot</a> and/or <a href="http://dev.w3.org/2006/webapi/WebIDL/#idl-implements-statements">implements</a> instead?</p>
+              
+
+
+          <dl title="[NoInterfaceObject] interface PowerSource : SystemDevice" class="idl">
             <dt>const unsigned short TYPE_UNKNOWN=0</dt>
             <dd>In <code>type</code> has this value, then this power source is undetermined</dd>
             
@@ -459,15 +477,6 @@
             <dt>const unsigned short TYPE_EXTERNAL=2</dt>
             <dd>In <code>type</code> has this value, then this power source is external</dd>
             
-            <dt>readonly attribute unsigned int type</dt>
-            <dd>One of the constants defined in this interface, reflecting the state of this source</dd>
-            
-            <dt>readonly attribute DOMString? info</dt>
-            <dd>A free-form string describing this device</dd>
-            
-            <dt>readonly attribute DOMString id</dt>
-            <dd>A free-form string identifying this device. The value of this element MUST be unique within the list reported in a <a>CpuState</a> object.</dd>
-            
             <dt>readonly attribute boolean? charging</dt>
             <dd>If this source has <code>type</code> set to <code>EXTERNAL</code> then this value MUST be <code>null</code>. Otherwise if this source is charging, this value MUST be <code>true</code>, otherwise <code>false</code>.</dd>
             
@@ -526,16 +535,7 @@
 
           <p>This property contains the data pertaining to a single CPU on the system. It is <a>enumerable</a>.</p>
 
-          <dl title="[NoInterfaceObject] interface Cpu" class="idl">
-            <dt>readonly attribute DOMString? info</dt>
-            <dd>A free-form string describing this CPU</dd>
-
-            <dt>readonly attribute DOMString id</dt>
-            <dd>A free-form string identifying this device. The value
-            of this element MUST be unique within the list reported by
-            the <a>units</a> attribute of a <a>CpuState</a>
-            object.</dd>
-
+          <dl title="[NoInterfaceObject] interface Cpu : SystemDevice" class="idl">
             <dt>attribute float currentFrequency</dt>
             <dd>
               This attribute indicates the current frequency of this
@@ -600,11 +600,7 @@
           <h4>The <a>Thermometer</a> property</h4>
           <p>This property exposes the state of a single internal thermometer available to the system. It is <a>enumerable</a></p>
 
-          <dl title="[NoInterfaceObject] interface Thermometer" class="idl">
-            <dt>readonly attribute DOMString? info</dt>
-            <dd>A free-form string describing this Thermometer</dd>
-            <dt>readonly attribute DOMString id</dt>
-            <dd>A free-form string identifying this device. The value of this element MUST be unique within the list reported by the <a>thermometers</a> attribute of a <a>ThermalState</a> object.</dd>
+          <dl title="[NoInterfaceObject] interface Thermometer : SystemDevice" class="idl">
             <dt>readonly attribute float currentTemperature</dt>
             <dd>This thermometer's current temperature, in degrees Celcius (°C)</dd>
             <dt>readonly attribute float maxTemperature</dt>
@@ -638,7 +634,7 @@
 
           <p>This property provides information on a single cooling device in the system. It is <a>enumerable</a></p>
 
-          <dl title="[NoInterfaceObject] interface CoolingDevice" class="idl">
+          <dl title="[NoInterfaceObject] interface CoolingDevice : SystemDevice" class="idl">
             <dt>const unsigned short TYPE_UNKNOWN=0</dt>
             <dd>A device of undetermined type.</dd>
             <dt>const unsigned short TYPE_FAN=1</dt>
@@ -647,10 +643,6 @@
             <dd>A liquid submersion cooling device</dd>
             <dt>readonly attribute unsigned short type</dt>
             <dd>This attributes takes a value among the constants defined in this interface, indicating the type of cooling device that this object reflects.</dd>
-            <dt>readonly attribute DOMString? info</dt>
-            <dd>A free-form string describing this cooling device</dd>
-            <dt>readonly attribute DOMString id</dt>
-            <dd>A free-form string identifying this device. The value of this element MUST be unique within the list reported by the <a>devices</a> of a <a>CoolingSystem</a> object.</dd>
             <dt>attribute float? speed</dt>
             <dd>
               If the type of this device is <a>TYPE_FAN</a>, the fan's
@@ -737,7 +729,7 @@
           connection available to the system. It is
           <a>enumerable</a>.</p>
 
-          <dl title="[NoInterfaceObject] interface Connection" class="idl">
+          <dl title="[NoInterfaceObject] interface Connection : SystemDevice" class="idl">
             <dt>const unsigned short TYPE_UNKNOWN = 0</dt>
             <dd>The API is unable to determine the network technology.</dd>
 
@@ -794,14 +786,6 @@
             <dt>readonly attribute unsigned short type</dt>
             <dd>This attribute indicates the network technology in use on a network.</dd>
 
-            <dt>readonly attribute DOMString? info</dt>
-            <dd>A free-form string describing this connection</dd>
-            
-            <dt>readonly attribute DOMString id</dt>
-            <dd>A free-form string identifying this connection. The
-            value of this element MUST be unique within the list
-            reported in a <a>Connection</a> object.</dd>
-
             <dt>readonly attribute unsigned int minDownloadBandwidth</dt>
             <dd>This property represents the min download bandwidth
             offered by a network bearer measured in Kbits/s.</dd>
@@ -873,11 +857,7 @@
 
             <p>This property provides information about a single external light sensor available to the system. It is <a>enumerable</a>.</p>
 
-            <dl title="[NoInterfaceObject] interface AmbientLightSensor" class="idl">
-              <dt>readonly attribute DOMString? info</dt>
-              <dd>A free-form string describing this device.</dd>
-              <dt>readonly attribute DOMString id</dt>
-              <dd>A free-form string identifying this sensor. The value of this element MUST be unique within the list reported in the <a>sensors</a> attribute of an <a>AmbientLight</a> object.</dd>
+            <dl title="[NoInterfaceObject] interface AmbientLightSensor : SystemDevice" class="idl">
               <dt>readonly attribute float luminance</dt>
               <dd>The luminance measured by this device, in candelas per square metre (cd/m<sup>2</sup>)</dd>.
               <dt>readonly attribute float maxLuminance</dt>
@@ -909,11 +889,7 @@
 
             <p>This property provides information about a single ambient noise sensor available to the system. It is <a>enumerable.</a></p>
 
-            <dl title="[NoInterfaceObject] interface AmbientNoiseSensor" class="idl">
-              <dt>readonly attribute DOMString? info</dt>
-              <dd>A free-form string describing this device.</dd>
-              <dt>readonly attribute DOMString id</dt>
-              <dd>A free-form string identifying this sensor. The value of this element MUST be unique within the list reported in the <a>sensors</a> attribute of an <a>AmbientLight</a> object.</dd>
+            <dl title="[NoInterfaceObject] interface AmbientNoiseSensor : SystemDevice" class="idl">
               <dt>readonly attribute float level</dt>
               <dd>The noise level measured by this device, in decibels (dB)</dd>.
               <dt>readonly attribute float maxLevel</dt>
@@ -966,11 +942,7 @@
             barometer available to the system. It is
             <a>enumerable.</a></p>
 
-            <dl title="[NoInterfaceObject] interface Barometer" class="idl">
-              <dt>readonly attribute DOMString id</dt>
-              <dd>A free-form string identifying this barometer. The value of this element MUST be unique within the list reported in the <a>barometers</a> attribute of the related <a>AmbientAtmosphericPressure</a> object.</dd>
-              <dt>readonly attribute DOMString? info</dt>
-              <dd>A free-form string describing this device.</dd>
+            <dl title="[NoInterfaceObject] interface Barometer : SystemDevice" class="idl">
               <dt>readonly attribute float currentPressure</dt>
               <dd>The current atmospheric pressure measured by this device, in kiloPascal (kPa)</dd>.
               <dt>readonly attribute float maxLevel</dt>
@@ -1005,15 +977,7 @@
             proximity sensor available to the system. It is
             <a>enumerable</a>.</p>
 
-            <dl title="[NoInterfaceObject] interface ProximitySensor" class="idl">
-              <dt>readonly attribute DOMString id</dt>
-              <dd>A free-form string identifying this sensor. The
-              value of this element MUST be unique within the list
-              reported in a <a>Proximity</a> object.</dd>
-
-              <dt>readonly attribute DOMString? info</dt>
-              <dd>A free-form string describing this device.</dd>
-
+            <dl title="[NoInterfaceObject] interface ProximitySensor : SystemDevice" class="idl">
               <dt>readonly attribute float distance</dt>
               <dd>The distance between this sensor and the nearest object, in meters</dd>.
 
@@ -1056,12 +1020,7 @@
 
           <p>This property exposes information on a single audio codec available to this system. Is it <a>enumerable</a>.</p>
 
-          <dl title='[NoInterfaceObject] interface AudioCodec' class='idl'>
-            <dt>readonly attribute DOMString? info</dt>
-            <dd>Free-form string containing information on this
-            codec's implementation. Examples: "Microsoft G.711",
-            "LAME".</dd>
-
+          <dl title='[NoInterfaceObject] interface AudioCodec : SystemDevice' class='idl'>
             <dt>readonly attribute DOMString compFormat</dt>
 
             <dd>Free-form information on the compression
@@ -1078,12 +1037,8 @@
         </section>
           <section>            
             <h3>The <a>VideoCodec</a> Property</h3>                
-            <dl title='[NoInterfaceObject] interface VideoCodec' class='idl'>
+            <dl title='[NoInterfaceObject] interface VideoCodec : SystemDevice' class='idl'>
               
-              <dt>readonly attribute DOMString? info</dt>
-              <dd>Freeform string describing this video codec. Example : "Indeo Video" or "libtheora"</dd>
-              <dt>readonly attribute DOMString id</dt>
-              <dd>A free-form string identifying this codec. The value of this element MUST be unique within the list reported by the <a>codecs</a> attribute of a <a>Video</a> object.</dd>
               <dt>readonly attribute sequence DOMString compFormats</dt>
               <dd>Supported compression format names. Example : "AVI", "ogg"</dd>
 
@@ -1148,7 +1103,7 @@
           <section>
             <h4>The <a>StorageUnit</a> Property</h4>
             <p>This property exposes a single storage device connected to this system. It is <a>enumerable</a>.</p>
-            <dl title="interface StorageUnit" class="idl">
+            <dl title="interface StorageUnit : SystemDevice" class="idl">
               <dt>const unsigned short TYPE_UNKNOWN=0</dt>
               <dd><code>type</code> is set to this value when the type of this device is unknown to this API.</dd>
               <dt>const unsigned short TYPE_HARDDISK=1</dt>
@@ -1161,21 +1116,12 @@
               <dd>When type has this value, then this device uses solid-state RAM technology (chip, memory card)</dd>
               <dt>readonly attribute unsigned short type</dt>
               <dd>The type of pointing device. The value is one of the constants defined for this type.</dd>
-              
-              <dt>readonly attribute DOMString? info</dt>
-              <dd>A free-form string describing this device</dd>
-              <dt>readonly attribute DOMString id</dt>
-              <dd>A free-form string identifying this device. The value of this element MUST be unique within the list reported in the <a>units</a> attribute of an <a>Storage</a> object.</dd>
-              
               <dt>readonly attribute boolean isReadWrite</dt>
               <dd><code>true</code> when this device suports software modification, <code>else</code> otherwise.</dd>
-              
               <dt>readonly attribute unsigned int capacity</dt>
               <dd>The amount of data that this device can hold, in bytes. A <a>watch</a> operation operating on an object of type <a>StorageUnit</a> must invoke the success callback only when this attribute has changed</dd>
-              
               <dt>readonly attribute int availableCapacity</dt>
               <dd>The amount of available data that this device can hold, in bytes</dd>
-
               <dt>readonly attribute boolean isRemoveable</dt>
               <dd><code>true</code> if this unit can be removed from the system (e.g. a memory card unplugged, or a disk ejected), <code>false</code> otherwise</dd>
             </dl>
@@ -1248,14 +1194,8 @@
               <p>This property exposes information on a single display device available to the system. Is it <a>enumerable.</a></p>
               
               <p>The <a>DisplayDevice</a> interface defined below inherits from the <a>Screen</a> interface as defined in [[!CSSOM-VIEW]]</p>
-              
-              <dl title="[NoInterfaceObject] interface DisplayDevice : Screen" class="idl">
-                <dt>readonly attribute DOMString? info</dt>
-                <dd>A free-form string describing this device</dd>
-                
-                <dt>readonly attribute DOMString id</dt>
-                <dd>A free-form string identifying this device. The value of this element MUST be unique within the list reported in a <a>Display</a> object.</dd>
-                
+
+              <dl title="[NoInterfaceObject] interface DisplayDevice : Screen, SystemDevice" class="idl">
                 <dt>readonly attribute unsigned int dotsPerInchW</dt>
                 <dd>Resolution of this device, along its width, in dots per inch.</dd>
                 
@@ -1314,7 +1254,7 @@
               output device available to this system. It is
               <a>enumerable</a>.</p>
               
-              <dl title='[NoInterfaceObject] interface AudioOutputDevice' class='idl'>
+              <dl title='[NoInterfaceObject] interface AudioOutputDevice : SystemDevice' class='idl'>
                 <dt>const unsigned short TYPE_UNKNOWN=0</dt>
                 <dd><code>type</code> is set to this value when the type of this device is unknown</dd>
                 <dt>const unsigned short TYPE_SPEAKER=1</dt>
@@ -1323,15 +1263,6 @@
                 <dd><code>type</code> is set to this value when this device is a set of headphones</dd>
                 <dt>readonly attribute unsigned short type</dt>
                 <dd>The type of audio output device. The value is one of the constants defined for this type.</dd>
-                
-                <dt>readonly attribute DOMString? info</dt>
-                <dd>Free-form text describing this device.</dd>
-                
-                <dt>readonly attribute DOMString id</dt>
-                <dd>A free-form string identifying this device. The value
-                of this element MUST be unique within the list reported in
-                an <a>Audio</a> object.</dd>
-                
                 <dt>attribute boolean active</dt>
                 <dd>Indicates if the device is currently active, i.e. if
                 any sound recording will be made using this device</dd>
@@ -1375,7 +1306,7 @@
           <section>
             <h4>The <a>PointingDevice</a> Property</h4>
             <p>This property exposes the pointing devices (mouse, touch screen, gesture sensor). It is <a>enumerable</a>.</p>
-            <dl title="interface PointingDevice" class="idl">
+            <dl title="interface PointingDevice : SystemDevice" class="idl">
               <dt>const unsigned short TYPE_UNKNOWN=0</dt>
               <dd>When the <a>type</a> attribute has this value, then the type of this pointing device is unknown.</dd>
               <dt>const unsigned short TYPE_MOUSE=1</dt>
@@ -1390,10 +1321,6 @@
               <dd>When the <a>type</a> attribute has this value, then this device is a graphics tablet</dd>
               <dt>readonly attribute unsigned short type</dt>
               <dd>The type of pointing device. The value is one of the constants defined for this type.</dd>
-              <dt>readonly attribute DOMString? info</dt>
-              <dd>A free-form string describing this device</dd>
-              <dt>readonly attribute DOMString id</dt>
-              <dd>A free-form string identifying this device. The value of this element MUST be unique within the list reported in the <a>pointingDevices</a> attribute of an <a>InputDevice</a> object.</dd>
               <dt>readonly attribute boolean supportsMultiTouch</dt>
               <dd><code>true</code> when this device suports the multi-touch method of interaction, <code>else</code> otherwise.</dd>
             </dl>
@@ -1401,7 +1328,7 @@
           <section>
             <h4>The <a>Keyboard</a> Property</h4>
             <p>This property exposes the keyboards and keypads connected to this system. It is <a>enumerable</a>.</p>
-            <dl title="interface Keyboard" class="idl">
+            <dl title="interface Keyboard : SystemDevice" class="idl">
               <dt>const unsigned short TYPE_UNKNOWN=0</dt>
               <dd>When the <a>type</a> attribute has this value, then this device is of a type unknown to this API.</dd>
               <dt>const unsigned short TYPE_KEYBOARD=1</dt>
@@ -1410,12 +1337,6 @@
               <dd>When the <a>type</a> attribute has this value, then this device is a keypad</dd>
               <dt>readonly attribute unsigned short type</dt>
               <dd>The type of pointing device. The value is one of the constants defined for this type.</dd>
-
-              <dt>readonly attribute DOMString? info</dt>
-              <dd>A free-form string describing this device</dd>
-              <dt>readonly attribute DOMString id</dt>
-              <dd>A free-form string identifying this device. The value of this element MUST be unique within the list reported in the <a>keyboards</a> attribute of an <a>InputDevice</a> object.</dd>
-
               <dt>readonly attribute boolean isHardware</dt>
               <dd><code>true</code> when this device is a physical keyboard, <code>else</code> if it is a software keyboard.</dd>
             </dl>
@@ -1424,12 +1345,7 @@
           <section>
             <h4>The <a>Camera</a> Property</h4>
             <p>This property exposes the cameras connected to this system. It is <a>enumerable</a>.</p>
-            <dl title="interface Camera" class="idl">
-              <dt>readonly attribute DOMString? info</dt>
-              <dd>A free-form string describing this device</dd>
-              <dt>readonly attribute DOMString id</dt>
-              <dd>A free-form string identifying this device. The value of this element MUST be unique within the list reported in the <a>cameras</a> attribute of an <a>InputDevice</a> object.</dd>
-
+            <dl title="interface Camera : SystemDevice" class="idl">
               <dt>readonly attribute boolean supportsVideo</dt>
               <dd><code>true</code> when this device suports recording video, <code>else</code> otherwise.</dd>
 
@@ -1448,26 +1364,16 @@
           <section>
             <h4>The <a>Microphone</a> Property</h4>
             <p>This property exposes the microphones connected to this system. It is <a>enumerable</a>.</p>
-            <dl title="interface Microphone" class="idl">
+            <dl title="interface Microphone : SystemDevice" class="idl">
               <dt>const unsigned short TYPE_UNKNOWN=0</dt>
               <dd><code>type</code> is set to this value when the type of this device is unknown to this API.</dd>
               <dt>const unsigned short TYPE_MICROPHONE=1</dt>
               <dd><code>type</code> is set to this value when this device is a microphone</dd>
               <dt>const unsigned short TYPE_LINEIN=2</dt>
               <dd><code>type</code> is set to this value when this device is a line-in connector</dd>
-
               <dt>readonly attribute unsigned short type</dt>
               <dd>The type of audio input device. The value is one of
               the constants defined for this type.</dd>
-
-              <dt>readonly attribute DOMString? info</dt>
-              <dd>Free-form text describing this device.</dd>
-
-              <dt>readonly attribute DOMString id</dt>
-              <dd>A free-form string identifying this device. The value
-              of this element MUST be unique within the list reported in
-              an <a>Audio</a> object.</dd>
-
               <dt>attribute boolean active</dt>
               <dd>Indicates if the device is currently active, i.e. if
               any sound recording will be made using this device</dd>
Received on Wednesday, 30 December 2009 10:13:00 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 30 December 2009 10:13:02 GMT