Richard Hughes
|
8c4efc79f3
|
use DkpHistoryObj in devkit-power
|
2008-08-04 16:25:25 +01:00 |
|
Richard Hughes
|
3e8ab9514a
|
get the device stats in the helper tool
|
2008-08-04 16:12:49 +01:00 |
|
Richard Hughes
|
fad9b70a7a
|
don't crash if we do GetStatistics on a device without history
|
2008-08-04 16:12:10 +01:00 |
|
Richard Hughes
|
0e617b862c
|
Add a GetStatistics() method on org.freedesktop.DeviceKit.Power.Source so we can print some funky graphs
|
2008-08-04 15:36:47 +01:00 |
|
Richard Hughes
|
dfd1103067
|
the power_supply class gives a very clear status enum, just use it
|
2008-08-04 14:52:33 +01:00 |
|
Richard Hughes
|
a562159bc7
|
add simple history data to be saved and retrieved
|
2008-08-04 14:48:02 +01:00 |
|
Richard Hughes
|
1d7655c14f
|
add some helpers to manipulate DkpHistoryObj objects for the future history and profiling code
|
2008-08-04 14:34:33 +01:00 |
|
Richard Hughes
|
3f606443b5
|
add a function dkp_object_diff() to pretty print the differences between two DkpObject's
|
2008-08-04 14:30:34 +01:00 |
|
Richard Hughes
|
66b6a80722
|
print a better seconds/minutes/hours text -- needs localising properly
|
2008-08-04 13:49:41 +01:00 |
|
Richard Hughes
|
b5b5b6824b
|
handle SIGINT so we can clean up after ourselves
|
2008-08-04 12:20:26 +01:00 |
|
Richard Hughes
|
f1558a27f5
|
remove some trivial whitespace and an invalid comment
|
2008-08-04 12:19:28 +01:00 |
|
Richard Hughes
|
0cd1a18a20
|
add the skeleton --dump option for debugging -- more to come
|
2008-08-04 11:54:15 +01:00 |
|
Richard Hughes
|
117720b03d
|
add a GIO dep so we can read and write files in the future
|
2008-08-04 11:53:20 +01:00 |
|
Richard Hughes
|
ec79fc0229
|
only poll when we have no updates when charging or discharging. if we are empty or full, there's no point
|
2008-08-01 17:39:39 +01:00 |
|
Richard Hughes
|
b626fcd195
|
add some trivial gitignore files
|
2008-08-01 17:33:31 +01:00 |
|
Richard Hughes
|
74683e3fa7
|
of course, the right thing to do is make a static lib to avoid playing with ../src/ type paths
|
2008-08-01 17:27:12 +01:00 |
|
Richard Hughes
|
d06a9707c5
|
trivial line fixes :-)
|
2008-08-01 17:01:45 +01:00 |
|
Richard Hughes
|
d9a0190fe2
|
don't print blank lines in dkp_object_print
|
2008-08-01 16:55:50 +01:00 |
|
Richard Hughes
|
dee758ac78
|
use DkpObject in devkit-power command line tool
|
2008-08-01 16:48:33 +01:00 |
|
Richard Hughes
|
1113df1f43
|
abstract out the meta-device into a seporate struct so we can copy it, check for changes and print it
|
2008-08-01 16:37:11 +01:00 |
|
Richard Hughes
|
8d4f138537
|
remove energy-empty-design from devkit-power tool
|
2008-08-01 16:36:12 +01:00 |
|
Richard Hughes
|
9cc2a944cb
|
add the abilty to turn the text enum forms back into enumerated types
|
2008-08-01 16:35:22 +01:00 |
|
Richard Hughes
|
9db5f0d3dc
|
fix the type and state enums when getting unknown
|
2008-08-01 13:22:52 +01:00 |
|
Richard Hughes
|
27cde0b6e0
|
rework devkit-power tool, more work to come
|
2008-08-01 13:15:40 +01:00 |
|
Richard Hughes
|
81a4c5d824
|
add some debugging infrastructure
|
2008-08-01 12:26:18 +01:00 |
|
Richard Hughes
|
4f934ad2df
|
convert spaces to tabs, and make sure functions have sensible names
|
2008-08-01 12:07:56 +01:00 |
|
Richard Hughes
|
cbaa6851d4
|
change the GObject prefix from DevkitPower to Dkp
|
2008-08-01 11:24:54 +01:00 |
|
Richard Hughes
|
3bb6d08e29
|
rename some source files
|
2008-08-01 11:10:50 +01:00 |
|
Richard Hughes
|
7e4c0100ba
|
add some more GCC warnings
|
2008-08-01 11:10:04 +01:00 |
|
Richard Hughes
|
1023e58133
|
when we haven't got a rate value, try to calculate this
|
2008-07-25 20:14:42 +01:00 |
|
Richard Hughes
|
0e4418ca30
|
don't return an ID if we are not present
|
2008-07-25 19:04:23 +01:00 |
|
Richard Hughes
|
d85c495674
|
add some more logic into the power supply class
|
2008-07-25 17:40:07 +01:00 |
|
Richard Hughes
|
fccd159c73
|
calculate a quick and dirty time remaining value
|
2008-07-25 17:30:58 +01:00 |
|
Richard Hughes
|
d7447437dd
|
only suppy an id for devices supplying the system
|
2008-07-25 17:17:22 +01:00 |
|
Richard Hughes
|
4a15e42c41
|
add a power-supply bool property so we can tell if the device is a supplier or consumer
|
2008-07-25 17:14:14 +01:00 |
|
Richard Hughes
|
36bf97d913
|
provide a function for getting a unique ID for the battery
|
2008-07-25 17:04:05 +01:00 |
|
Richard Hughes
|
2ed6ed8019
|
add a couple of sanity checks for the battery values
|
2008-07-25 16:55:28 +01:00 |
|
Richard Hughes
|
32df1e0cc1
|
add two bits of data that session applications really want -- battery mode and low battery mode
|
2008-07-24 18:30:00 +01:00 |
|
Richard Hughes
|
2bb27aaf1a
|
add the Suspend() and Hibernate() stub methods
|
2008-07-24 18:27:45 +01:00 |
|
Richard Hughes
|
9ce7f3665b
|
if the battery goes away, properly clean up the cached values
|
2008-07-24 18:19:16 +01:00 |
|
Richard Hughes
|
a6f9b0fcb6
|
using the technology as the coldplug indicator is a bad idea, properly flag this
|
2008-07-24 18:18:12 +01:00 |
|
Richard Hughes
|
1f41f03776
|
export battery-is-present as some batteries in laptops and UPSs can be removed
|
2008-07-24 18:15:40 +01:00 |
|
Richard Hughes
|
a1f9c05280
|
export battery-is-rechargeable so we can export if we think it can be recharged
|
2008-07-24 18:12:47 +01:00 |
|
Richard Hughes
|
4433bd3379
|
export battery-capacity as it's a useful property of a battery
|
2008-07-24 18:09:17 +01:00 |
|
Richard Hughes
|
ec658f5d29
|
battery-technology should be an enumerated type
|
2008-07-24 18:03:05 +01:00 |
|
Richard Hughes
|
2da987f9bc
|
add the battery state enumerated type property
|
2008-07-24 17:59:48 +01:00 |
|
Richard Hughes
|
f1c5630274
|
split out the enumerated stuff into devkit-power-enum.[c|h] as they'll be more soon
|
2008-07-24 17:52:51 +01:00 |
|
Richard Hughes
|
8a04a2c3ed
|
remove the battery-energy-empty-design parameter, it's never going to be anything other than zero
|
2008-07-24 17:46:31 +01:00 |
|
Richard Hughes
|
4398839de1
|
add the PolicyKit action org.freedesktop.devicekit.power.hibernate
|
2008-07-24 17:41:14 +01:00 |
|
Richard Hughes
|
058834be91
|
add a new convenience function, sysfs_get_bool()
|
2008-07-24 17:40:22 +01:00 |
|