- From: Max Froumentin via cvs-syncmail <cvsmail@w3.org>
- Date: Wed, 30 Dec 2009 15:39:16 +0000
- To: public-dap-commits@w3.org
Update of /sources/public/2009/dap/system-info
In directory hutz:/tmp/cvs-serv20047
Modified Files:
Overview.html
Log Message:
- move definition of enumerable in general property description
- make structure of output more like that of input
- figure that shows all properties
Index: Overview.html
===================================================================
RCS file: /sources/public/2009/dap/system-info/Overview.html,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -d -r1.50 -r1.51
--- Overview.html 30 Dec 2009 10:23:41 -0000 1.50
+++ Overview.html 30 Dec 2009 15:39:13 -0000 1.51
@@ -50,6 +50,7 @@
issue. Specifically, the API defined in this specification
provides access to hardware devices, either internal (CPU,
Thermometers) or ambient (light, noise or temperature).</p>
+
</section>
<section id="conformance"></section>
@@ -175,6 +176,23 @@
identify the property accessed. When a success callback
resulting from calling one of those functions is invoked, the
API MUST pass an instance of the property's interface.</p>
+
+ <p>Some of the properties below are defined as
+ <dfn>enumerable</dfn>, meaning that more than one instance of
+ the property's value type exist on the system. For instance, a
+ multi-processor system would report as many instances of
+ <a>Cpu</a> as the number of processors. When requesting the
+ value of an enumerable property, the <a>id</a> attribute of
+ the <a>Options</a> interface is used to differentiate between
+ multiple instances.</p>
+
+ <p>The non-normative figure below illustrates the contents and
+ relationship of all the properties defined in the following
+ sections.</p>
+
+ <p><a href="sysinfo.png"><img src="properties.png" alt="graphical representation of the property structure" width="1000"/></a></p>
+
+
</section>
<section>
@@ -368,11 +386,7 @@
number.</dd>
<dt>attribute DOMString id</dt>
- <dd>Some of the properties below are labeled as
- <dfn>enumerable</dfn>, meaning that more than one instance of
- the property's value type exist on the system. For instance, a
- multi-processor system would report as many instances of
- <a>Cpu</a> as the number of processors. In order to
+ <dd>In order to
differentiate between instances, this attribute is used to
indicate the request's target instance. The list of available
identifiers would normally be retrieved first through querying
@@ -1138,149 +1152,97 @@
<p>This section gathers system properties related to this device's output devices: screens, sound systems, etc.</p>
<section>
- <h2>Display</h2>
- <p>This set of properties expose information about the visual display devices available to this system.</p>
-
- <section>
- <h4>ECMAScript Example</h4>
- <pre class="sh_javascript example">// adjust the display brightness if it is too low
-navigator.device.system.get("Display", success, null);
-
-function success(display) {
- if (display.brightness <= 0.2)
- navigator.device.system.set("Display", {brightness: 0.8}, adjustCallback);
-}</pre>
- </section>
-
- <section>
- <h4>The <a>Display</a> Property</h4>
-
- <p>This property provides information on the display available on this system</p>
+ <h4>The <a>OutputDevices</a> Property</h4>
- <dl title='[NoInterfaceObject] interface Display' class='idl'>
- <dt>const unsigned short ORIENTATION_UNKNOWN = 0</dt>
- <dd>The device is not able to determine its orientation.</dd>
- <dt>const unsigned short ORIENTATION_LANDSCAPE = 1</dt>
- <dd>The display orientation is landscape.</dd>
- <dt>const unsigned short ORIENTATION_PORTRAIT = 2</dt>
- <dd>The display orientation is portrait.</dd>
- <dt>const unsigned short ORIENTATION_INVERTED_LANDSCAPE = 3</dt>
- <dd>The display orientation is inverted landscape.</dd>
- <dt>const unsigned short ORIENTATION_INVERTED_PORTRAIT = 4</dt>
- <dd>The display orientation is inverted portrait.</dd>
- <dt>attribute unsigned short orientation</dt>
- <dd>The display orientation from the constants listed in this object.</dd>
- <dt>attribute float brightness</dt>
- <dd>The current brightness, from 0 to 1</dd>
- <dt>attribute float contrast</dt>
- <dd>The current contrast, from 0 to 1</dd>
- <dt>attribute boolean blanked</dt>
- <dd><code>true</code> if this display is currently blanked, <code>false</code> otherwise</dd>
-
- <dt>readonly attribute DisplayDevice activeDevice</dt>
- <dd>The display currently in use</dd>
-
- <dt>readonly attribute DisplayDevice devices[]</dt>
- <dd>The sequence of all the available display devices</dd>
- </dl>
+ <p>This property provides information on the output devices (displays, sound) available on this system</p>
- <p class="issue">Are we being short-sighted in only listing
- four? Would it make sense to have it be an angle, except
- that in most cases it would only change in 90°
- increments?</p>
+ <dl title='[NoInterfaceObject] interface OutputDevices' class='idl'>
+ <dt>readonly attribute Display displays[]</dt>
+ <dd>An array of all the display devices connected to this system</dd>
+
+ <dt>readonly attribute Audio audioDevices[]</dt>
+ <dd>An array of all the output audio devices connected to this system</dd>
+ </dl>
- </section>
+ </section>
- <section>
- <h4>The <a>DisplayDevice</a> property</h4>
-
- <p>This property exposes information on a single display device available to the system. Is it <a>enumerable.</a></p>
+ <section>
+ <h4>The <a>Display</a> property</h4>
- <p>The <a>DisplayDevice</a> interface defined below inherits from the <a>Screen</a> interface as defined in [[!CSSOM-VIEW]]</p>
+ <p>This property exposes information on a single display device available to the system. Is it <a>enumerable.</a></p>
+
+ <p>The <a>Display</a> interface defined below inherits from the <a>Screen</a> interface as defined in [[!CSSOM-VIEW]]</p>
+
+ <dl title="[NoInterfaceObject] interface Display : Screen, SystemDevice" class="idl">
+ <dt>const unsigned short ORIENTATION_UNKNOWN = 0</dt>
+ <dd>The device is not able to determine its orientation.</dd>
+ <dt>const unsigned short ORIENTATION_LANDSCAPE = 1</dt>
+ <dd>The display orientation is landscape.</dd>
+ <dt>const unsigned short ORIENTATION_PORTRAIT = 2</dt>
+ <dd>The display orientation is portrait.</dd>
+ <dt>const unsigned short ORIENTATION_INVERTED_LANDSCAPE = 3</dt>
+ <dd>The display orientation is inverted landscape.</dd>
+ <dt>const unsigned short ORIENTATION_INVERTED_PORTRAIT = 4</dt>
+ <dd>The display orientation is inverted portrait.</dd>
+ <dt>attribute unsigned short orientation</dt>
+ <dd>The display orientation from the constants listed in this object.</dd>
+ <dt>attribute float brightness</dt>
+ <dd>The current brightness, from 0 to 1</dd>
+ <dt>attribute float contrast</dt>
+ <dd>The current contrast, from 0 to 1</dd>
+ <dt>attribute boolean blanked</dt>
+ <dd><code>true</code> if this display is currently blanked, <code>false</code> otherwise</dd>
+ <dt>readonly attribute unsigned int dotsPerInchW</dt>
+ <dd>Resolution of this device, along its width, in dots per inch.</dd>
+ <dt>readonly attribute unsigned int dotsPerInchH</dt>
+ <dd>Resolution of this device, along its height, in dots per inch.</dd>
+ <dt>readonly attribute float physicalWidth</dt>
+ <dd>The display's physical width in centimeters</dd>
+ <dt>readonly attribute float physicalHeight</dt>
+ <dd>The display's physical height in centimeters</dd>
+ </dl>
- <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>
-
- <dt>readonly attribute unsigned int dotsPerInchH</dt>
- <dd>Resolution of this device, along its height, in dots per inch.</dd>
-
- <dt>readonly attribute float physicalWidth</dt>
- <dd>The display's physical width in centimeters</dd>
-
- <dt>readonly attribute float physicalHeight</dt>
- <dd>The display's physical height in centimeters</dd>
- </dl>
+ <p class="issue">Are we being short-sighted in only listing
+ four orientations? Would it make sense to have it be an angle, except
+ that in most cases it would only change in 90°
+ increments?</p>
- </section>
+
</section>
- <!-- ********* /display ************************************************************* -->
+
+ <!-- ********* /display ************************************************************* -->
+
+ <!-- ********* Sound ************************************************************** -->
+ <section>
+ <h4>The <a>AudioDevice</a> Property</h4>
- <!-- ********* Sound ************************************************************** -->
- <section>
- <h2>Sound</h2>
- <p>The properties below expose the device's audio system.</p>
+ <p>This property exposes information on a single audio
+ output device available to this system. It is
+ <a>enumerable</a>.</p>
+
+ <dl title='[NoInterfaceObject] interface AudioDevice : 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>
+ <dd><code>type</code> is set to this value when this device is a loud speaker</dd>
+ <dt>const unsigned short TYPE_HEADPHONES=2</dt>
+ <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>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>
- <section>
- <h4>ECMAScript Example</h4>
- <pre class="sh_javascript example">//Enumerate the active speakers on the system
- system.audio.get("Audio", success);
-
- function isSpeaker(device, index, array) {
- return device.type===device.TYPE_SPEAKER;
- }
-
- function success(audio) {
- var activeSpeakers = audio.outputDevices.filter(isSpeaker);
- }</pre>
- </section>
- <section>
- <h4>The <a>Sound</a> property</h4>
- <p>This property exposes information on the audio capabilities of this system</p>
-
- <p class="note">These properties do not provide volume
- controls. An application should use HTML5's audio object
- attributes.</p>
-
- <dl title='[NoInterfaceObject] interface Sound' class='idl'>
- <dt>readonly attribute DOMString? info</dt>
- <dd>A free-form string describing this system's sound architecture</dd>
-
- <dt>readonly attribute AudioOutputDevice outputDevices[]</dt>
- <dd>Audio output devices attached to this device</dd>
- </dl>
- </section>
- <section>
- <h4>The <a>AudioOutputDevice</a> Property</h4>
-
- <p>This property exposes information on a single audio
- output device available to this system. It is
- <a>enumerable</a>.</p>
-
- <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>
- <dd><code>type</code> is set to this value when this device is a loud speaker</dd>
- <dt>const unsigned short TYPE_HEADPHONES=2</dt>
- <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>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>
-
- <dt>readonly attribute unsigned int freqRangeLow</dt>
- <dd>Frequency range, low value, in Hz</dd>
-
- <dt>readonly attribute unsigned int freqRangeHigh</dt>
- <dd>Frequency range, high value, in Hz</dd>
- </dl>
-
- </section>
- </section>
+ <dt>readonly attribute unsigned int freqRangeLow</dt>
+ <dd>Frequency range, low value, in Hz</dd>
+
+ <dt>readonly attribute unsigned int freqRangeHigh</dt>
+ <dd>Frequency range, high value, in Hz</dd>
+ </dl>
+
</section>
- <!-- ********* /Output *************************************************************** -->
+ </section>
+ <!-- ********* /Output *************************************************************** -->
<!-- ********* Input ***************************************************************** -->
<section>
Received on Wednesday, 30 December 2009 15:39:17 UTC