[Kde-hardware-devel] Solid API additions for power management
Dario Freddi
drf54321 at gmail.com
Fri Mar 19 15:45:24 CET 2010
Hello people,
After looking into upower, there are surely some API additions I would like to
make taking advantage of the new features. Here they come:
qreal energyWhenFull() const; // Energy capacity of the battery in Wh
qreal energyWhenFullByDesign() const; // Energy capacity of the battery in Wh
as shipped by the vendor
qreal currentDrain() const; // Current battery drain in W
qreal voltage() const; // Current battery voltage in V
int timeToFullCharge() const; // Time remaining for the battery to be fully
charged
Technology technology() const;
in pair with
enum Technology {
Lithium,
NickelCadmium,
etc.... };
An addition to Battery::BatteryType enum of
PhoneBattery, MonitorBattery
More than this, upower is also able to show if the battery has been recalled
by the vendor. To do this, I thought about doing the following:
bool isRecalled() const;
RecallDetails *recallDetails();
and provide a new RecallDetails class carrying the details.
--
upower features some additional features that I really don't see useful at the
moment (for example, the current amount of energy in Wh), but I'd like to
throw those in.
The problem is where. I see some of them a good candidate for Solid::Battery,
whereas some others might well go into Solid::Control or whatever it will be
in the future. What do you think makes sense where?
--
-------------------
Dario Freddi
KDE Developer
GPG Key Signature: 511A9A3B
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/kde-hardware-devel/attachments/20100319/fdae2c70/attachment.sig
More information about the Kde-hardware-devel
mailing list