summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
2013-10-18linux: Add new definitionsBastien Nocera1-0/+8
Proxy paths, and enumeration from the current API.
2013-10-18linux: Fix UMockdev typelib not being foundBastien Nocera1-1/+1
The Makefile rule was using GI_REPOSITORY_PATH instead of GI_TYPELIB_PATH meaning that if a custom typelib path was needed (jhbuild for example) it wouldn't be found.
2013-10-18linux: Mark devices with 100% battery as fullBastien Nocera1-0/+5
2013-10-18linux: Fix Bluetooth devices appearing with 0% batteryBastien Nocera1-1/+7
When switching off Bluetooth devices, and before they timeout, we won't be able to read the battery percentage, so don't overwrite the previous value with "0%", but set the state to unknown instead. https://bugs.freedesktop.org/show_bug.cgi?id=70325
2013-10-18linux: Add a way to check when sysfs_get_double failsBastien Nocera2-0/+20
2013-10-18linux: Use up_device_supply_get_string()Bastien Nocera1-5/+6
In up_device_supply_get_state()
2013-10-18linux: Add a simpler, quicker path for devicesBastien Nocera1-1/+66
When refreshing the state of device batteries, no need to get data that won't be there anyway, such as voltage, temperature, or consumption rate. This avoids warnings about voltage being unknown for devices, and cuts down on the properties churn.
2013-10-18linux: Split off device state retrievalBastien Nocera1-20/+31
We're going to be reusing this elsewhere.
2013-10-18linux: Ignore ACs coming from devicesBastien Nocera1-0/+7
We already have enough information on the device battery. This avoids having a device for the wacom AC which we won't use.
2013-10-18linux: Remove incorrect statementBastien Nocera1-1/+0
Not all "UpDeviceSupply" actually supply power to the computer.
2013-10-17daemon: Fix crash when device is removedBastien Nocera1-0/+2
When the device was removed, we forgot to cancel sending out changed properties, causing illegal memory accesses.
2013-10-17daemon: Remove dead code from up_daemon_device_changed_cb()Bastien Nocera1-11/+0
2013-10-17linux: Use boolean values in sysfs_get_bool, not intBastien Nocera1-4/+3
2013-10-17linux: Remove unused sysfs utils functionsBastien Nocera2-110/+0
2013-10-17linux: Remove debugBastien Nocera1-1/+0
2013-10-17all: Remove *changed signalsBastien Nocera4-84/+2
Now that we send out PropertiesChanged signals (on the daemon side) and "notify" signals (on the client side), there's no need for the all encompassing DeviceChanged and Changed signals. They would have woken up any client, even if they were not interested in receiving the signals.
2013-10-17power: Work-around batteries that are slow to notice chargeBastien Nocera1-0/+5
This is a hack that was in gnome-settings-daemon's power plugin. We would check whether we were on AC before saying for certain that batteries had a low-level, and raising the warning-level.
2013-10-17all: Add GetCriticalAction daemon methodBastien Nocera8-20/+115
This allows desktop front-ends to get which action will actually be taken when we hit critical battery. This is not a property as availability of actions might change over the course of the run of the system, and we didn't want to make unnecessary D-Bus calls on startup.
2013-10-17linux: Fix incorrect check for logind sleep methodsBastien Nocera1-1/+1
A simple reversed check...
2013-10-17daemon: Make warning-level UpDevice property writableBastien Nocera1-1/+4
So we can update the display device warning level.
2013-10-17all: Remove WarningLevel from the daemon propertiesBastien Nocera2-22/+1
The WarningLevel property just replicated the warning level on the display device, or at least should have. So we fix the latter to remove the former.
2013-10-17daemon: Indentation in UpDaemon structBastien Nocera1-9/+9
2013-10-16daemon: Add documentation for computed propertiesBastien Nocera1-0/+6
Those are also part of the display device properties that we will update.
2013-10-16daemon: Mention hard-coded display device object pathBastien Nocera1-1/+3
/org/freedesktop/UPower/devices/DisplayDevice is a stable object path.
2013-10-16daemon: Minimise WarningLevel signalsBastien Nocera1-0/+4
When it doesn't actually change, don't send out signals.
2013-10-16daemon: Fix sending device's PropertiesChanged signalBastien Nocera1-1/+1
The interface name was missing ".Device" at the end, so wasn't getting registered by clients.
2013-10-16daemon: Emit PropertiesChanged for computed properties tooBastien Nocera1-2/+10
The IconName and WarningLevel properties were not sent out through PropertiesChanged when they changed for devices.
2013-10-16daemon: Only modify display device when it changesBastien Nocera1-1/+11
When none of the properties of the display device change, do not modify it.
2013-10-16daemon: Add GetDisplayDevice methodBastien Nocera5-0/+99
And export a DisplayDevice object which can be used by desktop shells to show/hide the status icon.
2013-10-16daemon: Set the display device type when on batteryBastien Nocera1-0/+1
When on battery only, we weren't setting the display device type properly.
2013-10-16daemon: Use constant for the devices object pathsBastien Nocera1-1/+3
2013-10-16daemon: Remove spurious linefeedBastien Nocera1-1/+0
2013-10-16daemon: Remove 2 undefined functions from headersBastien Nocera1-4/+0
up_daemon_get_on_battery() and up_daemon_get_warning_level() weren't defined or used anywhere.
2013-10-15daemon: Remove left-over debugBastien Nocera1-2/+0
2013-10-15daemon: Make UpDevice emit PropertiesChanged signalsBastien Nocera1-1/+64
That will make libupower-glib UpDevice work again, as the proxy was not receiving property changes, and we kept reading old cached values.
2013-10-15daemon: Add support for more types for PropertiesChangedBastien Nocera1-0/+16
Add code to transform strings, doubles, uint64s, and int64s.
2013-10-15daemon: Coalesce PropertiesChanged signals togetherBastien Nocera2-41/+102
Instead of sending one changed signal at a time, coalesce them together to reduce wakeups. We also export up_daemon_emit_properties_changed() for UpDevice to use.
2013-10-15daemon: Calculate global WarningLevel correctlyBastien Nocera1-17/+137
By using the state of all the combined batteries, rather than each one (eg. 2 batteries of the same type at 15% shouldn't trigger the "low" warning level). This introduces code to calculate the state of a "display" device, which is either a UPS, or a combination of all batteries.
2013-10-15daemon: Fix possible crasher in UpDevice self-testBastien Nocera1-0/+4
2013-10-15daemon: Remove unimplemented up_device_test()Bastien Nocera1-1/+0
2013-10-15daemon: Remove unused internal D-Bus proxyBastien Nocera1-10/+1
In UpDevice.
2013-10-15daemon: Register on the Bus after coldplugBastien Nocera2-66/+44
Both for the daemon and devices, so as to avoid D-Bus changes storms on startup.
2013-10-14daemon: Don't emit changed signal in coldplugBastien Nocera1-5/+7
We weren't emitting GObject signals in coldplug, no need to send out D-Bus signals either.
2013-10-14daemon: Sort the UpDaemon struct memberBastien Nocera1-4/+7
2013-10-14daemon: Add new WarningLevel "Discharging"Bastien Nocera2-5/+11
When UPSes are discharging, we should have a warning already, as it means that mains power has been lost to the UPS (though not to the computer).
2013-10-14daemon: Move all computations of warning level to daemonBastien Nocera3-13/+16
There's no reason why the state check should be done in the UpDevice implementation, and the state will be needed to add a new warning level for UPSes.
2013-10-14daemon: Require newer GLibBastien Nocera11-57/+3
And remove ifdef's.
2013-10-14daemon: Add IconName propertyBastien Nocera2-0/+89
Sends out icon names as defined by the Icon Naming specification. Will save quite a bit of client side code.
2013-10-14daemon: Add CriticalPowerActionBastien Nocera7-0/+151
Paraphrasing from the configuration option: The action to take when "TimeAction" or "PercentageAction" above has been reached for the batteries (UPS or laptop batteries) supplying the computer. This is done 20 seconds after the warning-level variable got set to UP_DEVICE_LEVEL_ACTION has been set, to give the opportunity to front-ends to display a (short) warning. This is only implemented for the Linux backend, using logind.
2013-10-14daemon: Emit the PropertiesChanged signalBastien Nocera1-7/+52
Use raw D-Bus. https://bugs.freedesktop.org/show_bug.cgi?id=43001