W3C home > Mailing lists > Public > public-device-apis@w3.org > August 2011

Re: [battery] status attribute, battery{low|critical|ok} event types ACTION-426 (was: ISSUE-114)

From: Anssi Kostiainen <anssi.kostiainen@nokia.com>
Date: Wed, 24 Aug 2011 12:41:41 +0300
Message-ID: <568BA479-B3FC-4912-9324-3A6B0CDD60DC@nokia.com>
To: "public-device-apis@w3.org WG" <public-device-apis@w3.org>
Hi,

On 23.8.2011, at 14.06, ext Anssi Kostiainen wrote:

> I thought about this a bit more and came up with the following design:
> 
> http://dev.w3.org/2009/dap/system-info/battery-status.html
> 
> Changes:
> 
> http://dev.w3.org/cvsweb/2009/dap/system-info/battery-status.html.diff?r1=1.34;r2=1.35;f=h
> 
> * Added the status attribute to the BatteryStatusEvent interface as proposed by Francois.
> 
> * Added a new event type batteryok. The values of the status attribute (low, critical, ok) now have corresponding battery{low|critical|ok} event types.

And also:

* Added prose on event order:

http://dev.w3.org/cvsweb/2009/dap/system-info/battery-status.html.diff?r1=1.35;r2=1.36;f=h

> With these changes, developers are able to:
> 
> i) listen to the batterystatus events to get isPlugged, level and status if they're not worried about getting too many events, or
> 
> ii) listen to the battery{low|critical|ok} events if they are concerned of performance and wish to only get the minimal number of events.
> 
> I believe this addresses all the high-value use cases we've discussed so far, while not adding much in terms of complexity. Let me know what you think.

-Anssi
Received on Wednesday, 24 August 2011 10:50:10 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 9 May 2012 00:14:22 GMT