- From: Max Froumentin via cvs-syncmail <cvsmail@w3.org>
- Date: Wed, 02 Dec 2009 09:39:04 +0000
- To: public-dap-commits@w3.org
Update of /sources/public/2009/dap/system-info
In directory hutz:/tmp/cvs-serv21982
Modified Files:
Overview.html
Log Message:
reformatted markup for power section
Index: Overview.html
===================================================================
RCS file: /sources/public/2009/dap/system-info/Overview.html,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- Overview.html 2 Dec 2009 09:26:42 -0000 1.13
+++ Overview.html 2 Dec 2009 09:39:02 -0000 1.14
@@ -33,42 +33,56 @@
<section class="API">
<h2>API Description</h2>
- <!--*******************Power*************************************************-->
+ <!--****************** Power ************************************************-->
<section>
<h3>Power</h3>
- <p>This power specification is a set of APIs that exposes available power sources such as: batteries,
- wall outlet, etc. It also expose if the device is on battery power and its charge level.</p>
+
+ <p>This API exposes available power sources such as: batteries,
+ wall outlet, etc. It also expose if the device is on battery power
+ and its charge level.</p>
+
<dl title='[NoInterfaceObject] interface Power' class='idl'>
<dt>readonly attribute boolean usingExternalPowerSource</dt>
- <dd>The <code>usingExternalPowerSource</code> attribute must be <code>true</code> if
- the device is plugged
- into an external power source. Otherwise, it must be <code>false</code>. If the correct value
- cannot be obtained, or if the device does not have an internal power source,
- an implementation MUST return <code>true</code>.</dd>
+ <dd>The <code>usingExternalPowerSource</code> attribute must be
+ <code>true</code> if the device is plugged into an external
+ power source. Otherwise, it must be <code>false</code>. If the
+ correct value cannot be obtained, or if the device does not have
+ an internal power source, an implementation MUST return
+ <code>true</code>.</dd>
+
<dt>readonly attribute unsigned short powerLevel</dt>
- <dd>The <code>powerLevel</code> attribute MUST indicate what percent of the internal
- power source
- remains. The maximum value is 100, the minimum value is 0. If the value cannot be
- obtained, or if the device does not have an internal power source, the attribute
- value must be 0. </dd>
+ <dd>The <code>powerLevel</code> attribute MUST indicate what
+ percent of the internal power source remains. The maximum value
+ is 100, the minimum value is 0. If the value cannot be obtained,
+ or if the device does not have an internal power source, the
+ attribute value must be 0. </dd>
+
<!--dt>readonly attribute int rate</dt>
- <dd>The <code>rate</code> attribute denotes the current rate (mW) of power change
- for the internal power sources. Discharge rate is a negative value. Charge rate is a positive value.
+ <dd>The <code>rate</code> attribute denotes the current rate
+ (mW) of power change for the internal power sources. Discharge
+ rate is a negative value. Charge rate is a positive value.
</dd-->
+
<dt>readonly attribute unsigned int timeRemaining</dt>
- <dd>The <code>timeRemaining </code>attribute should indicate the estimated time
- remaining (seconds) at the current rate 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. If <code>usingExternalPowerSource</code> is true and <code>rate
- </code> is less than 0 (indicating that even though the system is plugged into an
- external power source, the battery is still being drained), <code>timeRemainging
- </code>should be greater than 0. </dd>
- <dt>long watchPowerSource(in PowerSourceCallback successCallback, [Optional] in PowerErrorCallback errorCallback)
- </dt>
- <dd>The <code>watchPowerSource()</code> method takes one, two or three arguments.
- When called, it MUST immediately return and then asynchronously start a watch
- process defined as the following set of steps:
+ <dd>The <code>timeRemaining </code>attribute should indicate the
+ estimated time remaining (seconds) at the current rate 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. If <code>usingExternalPowerSource</code> is true and
+ <code>rate </code> is less than 0 (indicating that even though
+ the system is plugged into an external power source, the battery
+ is still being drained), <code>timeRemainging </code>should be
+ greater than 0. </dd>
+
+ <dt>long watchPowerSource(in PowerSourceCallback
+ successCallback, [Optional] in PowerErrorCallback
+ errorCallback)</dt>
+ <dd>The <code>watchPowerSource()</code> method takes one, two or
+ three arguments. When called, it MUST immediately return and
+ then asynchronously start a watch process defined as the
+ following set of steps:
<ol>
<li>Acquire a new <code>PowerSource</code> object that reflects the delivery
context's current power source. If successful, invoke the associated
@@ -79,8 +93,10 @@
argument. </li>
</ol>
</dd>
- <dt>long watchPowerLevel(in PowerLevelCallback successCallback, [Optional] in PowerErrorCallback errorCallback, [Optional] in PowerLevelOptions options)
- </dt>
+
+ <dt>long watchPowerLevel(in PowerLevelCallback successCallback,
+ [Optional] in PowerErrorCallback errorCallback, [Optional] in
+ PowerLevelOptions options)</dt>
<dd>The <code>watchPowerLevel()</code> method takes one, two or three arguments.
When called, it MUST immediately return and then asynchronously start a watch
process defined as the following set of steps:
@@ -96,183 +112,242 @@
hosting device has changed.</li>
</ol>
</dd>
+
<dt>void clearWatch(in int watchId)</dt>
- <dd>Both <code>watchPowerLevel()</code> and <code>watchPowerSource()</code> methods
- return an integer value that uniquely identifies the watch process. When the
- <code>clearWatch()</code> method is called with this identifier, the watch process
- MUST cease invoking any callbacks.
+ <dd>Both <code>watchPowerLevel()</code> and
+ <code>watchPowerSource()</code> methods return an integer value
+ that uniquely identifies the watch process. When the
+ <code>clearWatch()</code> method is called with this identifier,
+ the watch process MUST cease invoking any callbacks.
</dd>
</dl>
+
<section>
<h4>PowerLevelCallback</h4>
<dl title='[Callback=FunctionOnly, NoInterfaceObject] interface PowerLevelCallback' class='idl'>
<dt>void handleEvent(in PowerLevel level)</dt>
- <dd>This function is supplied by a call to <code>watchPowerLevel()</code>. Use the
- parameter to retrieve information about system power level.</dd>
+ <dd>This function is supplied by a call to
+ <code>watchPowerLevel()</code>. Use the parameter to retrieve
+ information about system power level.</dd>
</dl>
</section>
+
<section>
<h4>PowerSourceCallback</h4>
<dl title='[Callback=FunctionOnly, NoInterfaceObject] interface PowerSourceCallback' class='idl'>
<dt>void handleEvent(in boolean usingExternalPowerSource)</dt>
- <dd>This function is supplied by a call to <code>watchPowerSource()</code>. Use the
- parameter to retrieve information about system power source.</dd>
+ <dd>This function is supplied by a call to
+ <code>watchPowerSource()</code>. Use the parameter to retrieve
+ information about system power source.</dd>
</dl>
</section>
+
<section>
<h4>PowerLevelOptions</h4>
<dl title='interface PowerLevelOptions' class='idl'>
<dt>attribute unsigned int sampleInterval</dt>
- <dd>The <code>sampleInterval</code> attribute specifies in milliseconds how often
- the implementation SHOULD check to see if the power level has changed. While the
- specification allows the caller to sample at very small intervals, on many
- implementations, this may be wasteful because the battery device may update its
- level information at a frequency significantly below the <code>sampleInterval</code>.
- On implementations that are event driven, this value MAY be ignored. The caller
- should be aware that setting a value too small can adversely affect the battery life.
- The default value SHOULD be 10,000, or once every 10 seconds. </dd>
+ <dd>The <code>sampleInterval</code> attribute specifies in
+ milliseconds how often the implementation SHOULD check to see
+ if the power level has changed. While the specification allows
+ the caller to sample at very small intervals, on many
+ implementations, this may be wasteful because the battery
+ device may update its level information at a frequency
+ significantly below the <code>sampleInterval</code>. On
+ implementations that are event driven, this value MAY be
+ ignored. The caller should be aware that setting a value too
+ small can adversely affect the battery life. The default
+ value SHOULD be 10,000, or once every 10 seconds.</dd>
+
<dt>attribute unsigned int highThreshold</dt>
- <dd>If the <code>highThreshold</code> is greater than zero, when system power level
- rises above the specified value, the <code>PowerLevelCallback</code> MUST be invoked
- with the <code>crossedHighThreshold</code> value of the <code>PowerLevel</code>
- parameter set to <code>true</code>. If the <code>PowerLevelOptions</code> object is
- not null, and the <code>highThreshold</code> value is 100 (default), the
- <code>PowerLevelCallback</code> MUST not be invoked with the <code>crossedHighThreshold</code>
- value set to <code>true</code>. The value must be greater or equal to 0, and no
- greater than 100. </dd>
+ <dd>If the <code>highThreshold</code> is greater than zero,
+ when system power level rises above the specified value, the
+ <code>PowerLevelCallback</code> MUST be invoked with the
+ <code>crossedHighThreshold</code> value of the
+ <code>PowerLevel</code> parameter set to <code>true</code>.
+ If the <code>PowerLevelOptions</code> object is not null, and
+ the <code>highThreshold</code> value is 100 (default), the
+ <code>PowerLevelCallback</code> MUST not be invoked with the
+ <code>crossedHighThreshold</code> value set to
+ <code>true</code>. The value must be greater or equal to 0,
+ and no greater than 100. </dd>
+
<dt>attribute unsigned int lowThreshold</dt>
- <dd>If the <code>lowThreshold</code> is less than 100, when the system power level
- falls below the specified value, the <code>PowerLevelCallback</code> MUST be invoked
- with the <code>crossedLowThreshold</code> value of the <code>PowerLevel</code>
- parameter set to <code>true</code>. If the <code>PowerLevelOptions</code> object is
- not null, and the <code>lowThreshold</code> value is 0 (default), the
- <code>PowerLevelCallback</code> MUST not be invoked with the <code>
- crossedLowThreshold</code> value set to <code>true</code>. The value MUST be greater
- than
- or equal to 0, and no greater than 100. </dd>
+ <dd>If the <code>lowThreshold</code> is less than 100, when
+ the system power level falls below the specified value, the
+ <code>PowerLevelCallback</code> MUST be invoked with the
+ <code>crossedLowThreshold</code> value of the
+ <code>PowerLevel</code> parameter set to <code>true</code>. If
+ the <code>PowerLevelOptions</code> object is not null, and the
+ <code>lowThreshold</code> value is 0 (default), the
+ <code>PowerLevelCallback</code> MUST not be invoked with the
+ <code> crossedLowThreshold</code> value set to
+ <code>true</code>. The value MUST be greater than or equal to
+ 0, and no greater than 100.</dd>
</dl>
</section>
+
<section>
<h4>PowerLevel</h4>
<dl title='interface PowerLevel' class='idl'>
<dt>readonly attribute unsigned short percentRemaining</dt>
- <dd>
- The <code>percentRemaining</code> attribute should specify what percent of the
- device internal power remains. For implementations where the internal power source
- differentiates between the Design Maximum Capacity and the Current Maximum Capacity,
- the Current Maximum Capacity SHOULD be used. The maximum value MUST be 100; the
- minimum value MUST be 0, although that value MAY never be reported.
+ <dd>The <code>percentRemaining</code> attribute should specify
+ what percent of the device internal power remains. For
+ implementations where the internal power source differentiates
+ between the Design Maximum Capacity and the Current Maximum
+ Capacity, the Current Maximum Capacity SHOULD be used. The
+ maximum value MUST be 100; the minimum value MUST be 0,
+ although that value MAY never be reported.
</dd>
+
<dt>readonly attribute boolean crossedHighThreshold</dt>
<dd>
- When a <code>PowerLevelCallback</code> is invoked with a <code>PowerLevel</code>
- object whose <code>crossedHighThreshold</code> attribute set to <code>true</code>,
- the power level high threshold has been crossed. This threshold value is set in
- the <code>PowerOptions</code> parameter of a call to <code>watchPowerLevel()
- </code>. The <code>crossedHighThreshold</code> value MUST be false if any one
- of the following is true:
+ When a <code>PowerLevelCallback</code> is invoked with a
+ <code>PowerLevel</code> object whose
+ <code>crossedHighThreshold</code> attribute set to
+ <code>true</code>, the power level high threshold has been
+ crossed. This threshold value is set in the
+ <code>PowerOptions</code> parameter of a call to
+ <code>watchPowerLevel() </code>. The
+ <code>crossedHighThreshold</code> value MUST be false if any
+ one of the following is true:
<ul>
- <li>The <code>PowerLevel</code> object is obtained by directly accessing the
- <code>Power.PowerLevel</code> attribute;</li>
- <li>The <code>PowerLevelOption</code> <code>highThreshold</code> value was
- either not set or set to 100 in a prior call to <code>watchPowerLevel()</code>;</li>
- <li>The current power level is not greater than the value specified by the
- <code>PowerLevelOption highThreshold</code> value specified in a prior call
- to <code>watchPowerLevel()</code>; </li>
- <li>The current power level is greater than the value specified by the
- <code>PowerLevelOption highThreshold</code> value specified in a prior call
- to <code>watchPowerLevel()</code> but the <code>highThresholdHysteresis</code>
- attribute in the <code>PowerLevelOption</code> was either not set or set to
+ <li>The <code>PowerLevel</code> object is obtained by
+ directly accessing the <code>Power.PowerLevel</code>
+ attribute;</li>
+
+ <li>The <code>PowerLevelOption</code>
+ <code>highThreshold</code> value was either not set or set
+ to 100 in a prior call to
+ <code>watchPowerLevel()</code>;</li>
+
+ <li>The current power level is not greater than the value
+ specified by the <code>PowerLevelOption
+ highThreshold</code> value specified in a prior call to
+ <code>watchPowerLevel()</code>; </li>
+
+ <li>The current power level is greater than the value
+ specified by the <code>PowerLevelOption
+ highThreshold</code> value specified in a prior call to
+ <code>watchPowerLevel()</code> but the
+ <code>highThresholdHysteresis</code> attribute in the
+ <code>PowerLevelOption</code> was either not set or set to
a value greater than the <code>highThreshold</code>;</li>
- <li>The current power level is greater than the value specified by the
- <code>PowerLevelOption highThreshold</code> value in a prior call to
- <code>watchPowerLevel()</code>, but the high threshold event has already
- been called once, and the system power level has not yet dropped below the
- value specified by the <code>highThresholdHysteresis</code> attribute in the
+
+ <li>The current power level is greater than the value
+ specified by the <code>PowerLevelOption
+ highThreshold</code> value in a prior call to
+ <code>watchPowerLevel()</code>, but the high threshold
+ event has already been called once, and the system power
+ level has not yet dropped below the value specified by the
+ <code>highThresholdHysteresis</code> attribute in the
<code>PowerLevelOption</code>. </li>
</ul>
</dd>
<dt>readonly attribute boolean crossedLowThreshold</dt>
- <dd>
- When a <code>PowerLevelCallback</code> is invoked with a <code>PowerLevel</code>
- object whose <code>crossedLowThreshold</code> attribute set to <code>true</code>,
- the power level low threshold has been crossed. This threshold value MUST be set
- in the <code>PowerOptions</code> parameter of a prior call to <code>watchPowerLevel()</code>.
- The <code>crossedLowThreshold</code> value will be <code>false</code> if any one
- of the following is true:
+ <dd>When a <code>PowerLevelCallback</code> is invoked with a
+ <code>PowerLevel</code> object whose
+ <code>crossedLowThreshold</code> attribute set to
+ <code>true</code>, the power level low threshold has been
+ crossed. This threshold value MUST be set in the
+ <code>PowerOptions</code> parameter of a prior call to
+ <code>watchPowerLevel()</code>. The
+ <code>crossedLowThreshold</code> value will be
+ <code>false</code> if any one of the following is true:
<ul>
- <li>The <code>PowerLevel</code> object is obtained by directly accessing the
- <code>Power.PowerLevel</code> attribute; </li>
- <li>The <code>PowerLevelOption lowThreshold</code> value was either not set
- or set 0 in a prior call to <code>watchPowerLevel()</code>;</li>
- <li>The current power level is not less than the value specified by the
- <code>PowerLevelOption lowThreshold</code> value in a prior call to <code>watchPowerLevel()</code>; </li>
- <li>The current power level is less than the value specified by the
- <code>PowerLevelOption lowThreshold</code> value in a prior call to <code>watchPowerLevel()</code>
- but the <code>lowThresholdHysteresis</code> attribute in the <code>
- PowerLevelOption</code> was either not set or set to a value less than the <code>lowThreshold</code>;</li>
- <li>The current power level is less than the value specified by the
- <code>PowerLevelOption lowThreshold</code> value in a prior call to <code>
- watchPowerLevel()</code>, but the low threshold event has already been called
- once, and the system power level has not yet risen above the value specified
- by the <code>lowThresholdHysteresis</code> attribute in the <code>PowerLevelOption</code>.</li>
+ <li>The <code>PowerLevel</code> object is obtained by
+ directly accessing the <code>Power.PowerLevel</code>
+ attribute; </li>
+
+ <li>The <code>PowerLevelOption lowThreshold</code> value
+ was either not set or set 0 in a prior call to
+ <code>watchPowerLevel()</code>;</li>
+
+ <li>The current power level is not less than the value
+ specified by the <code>PowerLevelOption
+ lowThreshold</code> value in a prior call to
+ <code>watchPowerLevel()</code>;</li>
+
+ <li>The current power level is less than the value
+ specified by the <code>PowerLevelOption
+ lowThreshold</code> value in a prior call to
+ <code>watchPowerLevel()</code> but the
+ <code>lowThresholdHysteresis</code> attribute in the
+ <code> PowerLevelOption</code> was either not set or set
+ to a value less than the <code>lowThreshold</code>;</li>
+
+ <li>The current power level is less than the value
+ specified by the <code>PowerLevelOption
+ lowThreshold</code> value in a prior call to <code>
+ watchPowerLevel()</code>, but the low threshold event has
+ already been called once, and the system power level has
+ not yet risen above the value specified by the
+ <code>lowThresholdHysteresis</code> attribute in the
+ <code>PowerLevelOption</code>.</li>
</ul>
</dd>
</dl>
</section>
+
<section>
<h4>PowerError</h4>
<dl title='interface PowerError' class='idl'>
<dt>readonly attribute unsigned short UNKNOWN_ERROR</dt>
- <dd>
- <code>UNKNOWN_ERROR</code> (numeric value 0): The implementation failed to retrieve
- either power source or power level information for an unknown reason.
- </dd>
+ <dd><code>UNKNOWN_ERROR</code> (numeric value 0): The
+ implementation failed to retrieve either power source or power
+ level information for an unknown reason.</dd>
+
<dt>readonly attribute unsigned short PERMISSION_DENIED</dt>
- <dd>
- <code>PERMISSION_DENIED</code> (numerice value 1): The implementation failed to
- retrieve either power source or power level information because the application
- context does not have permission to use the Platform <abbr
- title="Application Programming Interface">API</abbr>.
- </dd>
+ <dd><code>PERMISSION_DENIED</code> (numerice value 1): The
+ implementation failed to retrieve either power source or power
+ level information because the application context does not
+ have permission to use the Platform <abbr title="Application
+ Programming Interface">API</abbr>.</dd>
+
<dt>readonly attribute unsigned short INFORMATION_UNAVAILABLE</dt>
- <dd>
- <code>INFORMATION_UNAVAILABLE</code> (numeric value 2): The implementation failed to
- retrieve power information because the information was unavailable. For example,
- this error would be raised if the system currently does not have an internal power
- source, or if the system does provide this information.
- </dd>
+ <dd><code>INFORMATION_UNAVAILABLE</code> (numeric value 2):
+ The implementation failed to retrieve power information
+ because the information was unavailable. For example, this
+ error would be raised if the system currently does not have an
+ internal power source, or if the system does provide this
+ information.</dd>
+
<dt>readonly attribute unsigned short TIMEOUT</dt>
- <dd>
- <code>TIMEOUT</code> (numeric value 3): The specified maximum length of time has
- elapsed before the implementation could successfully acquire power information.
- </dd>
+ <dd><code>TIMEOUT</code> (numeric value 3): The specified
+ maximum length of time has elapsed before the implementation
+ could successfully acquire power information.</dd>
+
<dt>readonly attribute unsigned short INVALID_VALUE</dt>
- <dd>
- <code>INVALID_VALUE</code> (numeric value 4): The implementation failed to retrieve
- power source or power level information because one or more of the values in the
- <code>PowerLevelOptions</code> or <code>PowerSourceOptions</code> parameters of the
- <code>watchPowerLevel()</code> or <code>watchPowerSource()</code> calls was invalid.
- For example, if the <code>PowerLevelOptions highThreshold</code> attribute is set
- to a value greater than 100, the <code>PowerErrorCallback</code> MUST be invoked
- with the <code>PowerError</code> <code>code</code> attribute set with a value of
- <code>INVALID_VALUE</code> (4).
- </dd>
+ <dd><code>INVALID_VALUE</code> (numeric value 4): The
+ implementation failed to retrieve power source or power level
+ information because one or more of the values in the
+ <code>PowerLevelOptions</code> or
+ <code>PowerSourceOptions</code> parameters of the
+ <code>watchPowerLevel()</code> or
+ <code>watchPowerSource()</code> calls was invalid. For
+ example, if the <code>PowerLevelOptions highThreshold</code>
+ attribute is set to a value greater than 100, the
+ <code>PowerErrorCallback</code> MUST be invoked with the
+ <code>PowerError</code> <code>code</code> attribute set with a
+ value of <code>INVALID_VALUE</code> (4).</dd>
+
<dt>readonly attribute unsigned short code</dt>
- <dd>
- The <code>code</code> attribute SHOULD contain one of the errors defined in this
- specification. An implementation MAY define additional error codes, but MUST NOT
- use the numeric values defined here.
- </dd>
+ <dd>The <code>code</code> attribute SHOULD contain one of the
+ errors defined in this specification. An implementation MAY
+ define additional error codes, but MUST NOT use the numeric
+ values defined here.</dd>
+
<dt>readonly attribute DOMString message</dt>
- <dd>
- The <code>message</code> attribute MAY return an error message describing the
- details of the error encountered. This attribute is primarily intended for
- debugging and developers SHOULD NOT use it directly in their application user interface.
+ <dd>The <code>message</code> attribute MAY return an error
+ message describing the details of the error encountered. This
+ attribute is primarily intended for debugging and developers
+ SHOULD NOT use it directly in their application user
+ interface.
</dd>
</dl>
</section>
</section>
+
+ <!--******************* CPU *************************************************-->
<section>
<h3>CPU</h3>
<p>This section defines a set of APIs that expose CPU information such as: utilization, frequency, brand, etc.</p>
Received on Wednesday, 2 December 2009 09:39:14 UTC