summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* daemon: Make warning-level UpDevice property writableBastien Nocera2013-10-171-1/+4
| | | | So we can update the display device warning level.
* all: Remove WarningLevel from the daemon propertiesBastien Nocera2013-10-172-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.
* daemon: Indentation in UpDaemon structBastien Nocera2013-10-171-9/+9
|
* daemon: Add documentation for computed propertiesBastien Nocera2013-10-161-0/+6
| | | | | Those are also part of the display device properties that we will update.
* daemon: Mention hard-coded display device object pathBastien Nocera2013-10-161-1/+3
| | | | | /org/freedesktop/UPower/devices/DisplayDevice is a stable object path.
* daemon: Minimise WarningLevel signalsBastien Nocera2013-10-161-0/+4
| | | | When it doesn't actually change, don't send out signals.
* daemon: Fix sending device's PropertiesChanged signalBastien Nocera2013-10-161-1/+1
| | | | | The interface name was missing ".Device" at the end, so wasn't getting registered by clients.
* daemon: Emit PropertiesChanged for computed properties tooBastien Nocera2013-10-161-2/+10
| | | | | The IconName and WarningLevel properties were not sent out through PropertiesChanged when they changed for devices.
* daemon: Only modify display device when it changesBastien Nocera2013-10-161-1/+11
| | | | | When none of the properties of the display device change, do not modify it.
* daemon: Add GetDisplayDevice methodBastien Nocera2013-10-165-0/+99
| | | | | And export a DisplayDevice object which can be used by desktop shells to show/hide the status icon.
* daemon: Set the display device type when on batteryBastien Nocera2013-10-161-0/+1
| | | | | When on battery only, we weren't setting the display device type properly.
* daemon: Use constant for the devices object pathsBastien Nocera2013-10-161-1/+3
|
* daemon: Remove spurious linefeedBastien Nocera2013-10-161-1/+0
|
* daemon: Remove 2 undefined functions from headersBastien Nocera2013-10-161-4/+0
| | | | | up_daemon_get_on_battery() and up_daemon_get_warning_level() weren't defined or used anywhere.
* daemon: Remove left-over debugBastien Nocera2013-10-151-2/+0
|
* daemon: Make UpDevice emit PropertiesChanged signalsBastien Nocera2013-10-151-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.
* daemon: Add support for more types for PropertiesChangedBastien Nocera2013-10-151-0/+16
| | | | Add code to transform strings, doubles, uint64s, and int64s.
* daemon: Coalesce PropertiesChanged signals togetherBastien Nocera2013-10-152-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.
* daemon: Calculate global WarningLevel correctlyBastien Nocera2013-10-151-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.
* daemon: Fix possible crasher in UpDevice self-testBastien Nocera2013-10-151-0/+4
|
* daemon: Remove unimplemented up_device_test()Bastien Nocera2013-10-151-1/+0
|
* daemon: Remove unused internal D-Bus proxyBastien Nocera2013-10-151-10/+1
| | | | In UpDevice.
* daemon: Register on the Bus after coldplugBastien Nocera2013-10-152-66/+44
| | | | | Both for the daemon and devices, so as to avoid D-Bus changes storms on startup.
* daemon: Don't emit changed signal in coldplugBastien Nocera2013-10-141-5/+7
| | | | | We weren't emitting GObject signals in coldplug, no need to send out D-Bus signals either.
* daemon: Sort the UpDaemon struct memberBastien Nocera2013-10-141-4/+7
|
* daemon: Add new WarningLevel "Discharging"Bastien Nocera2013-10-142-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).
* daemon: Move all computations of warning level to daemonBastien Nocera2013-10-143-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.
* daemon: Require newer GLibBastien Nocera2013-10-1411-57/+3
| | | | And remove ifdef's.
* daemon: Add IconName propertyBastien Nocera2013-10-142-0/+89
| | | | | | Sends out icon names as defined by the Icon Naming specification. Will save quite a bit of client side code.
* daemon: Add CriticalPowerActionBastien Nocera2013-10-147-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.
* daemon: Emit the PropertiesChanged signalBastien Nocera2013-10-141-7/+52
| | | | | | Use raw D-Bus. https://bugs.freedesktop.org/show_bug.cgi?id=43001
* daemon: Emit the "Changed" signal without going through notifyBastien Nocera2013-10-141-25/+25
| | | | | | There's no need to use the "notify" signal to capture when the properties are changed, we're the ones sending the notify signals in the first place.
* daemon: Device* signals send out object pathsBastien Nocera2013-10-141-6/+6
| | | | | Not strings, so correct the signal definitions to match the XML service definition.
* daemon: Add small hack for keyboards and miceBastien Nocera2013-10-143-4/+20
| | | | | Imported from gnome-settings-daemon, itself from gnome-power-manager.
* daemon: Replace "on-low-battery" propertyBastien Nocera2013-10-1410-184/+56
| | | | With "warning-level" property.
* daemon: Add WarningLevel device propertyBastien Nocera2013-10-144-0/+109
|
* daemon: Load level policy configurationBastien Nocera2013-10-141-0/+55
|
* daemon: Add helper to get uint from configBastien Nocera2013-10-142-0/+18
|
* daemon: Remove unused config file loadingBastien Nocera2013-10-141-25/+0
| | | | We already have UpConfig to handle that.
* daemon: Remove unneeded reset of priv struct membersBastien Nocera2013-10-1412-46/+0
| | | | It's already done by GObject.
* Remove QoS interfaceBastien Nocera2013-10-147-1091/+0
| | | | | | | It was added for some workloads, but ill-suited and never really got traction. Using cgroups to manage the resources of particular services (using systemd), or something separate like rtkit is a better bet.
* Remove obsolete battery recall propertiesBastien Nocera2013-10-143-107/+0
| | | | | | | | The recalls for that broken batch of Sony batteries dates back from 2006. All the batteries that could have been recalled have now been recalled, and somebody particularly interested in supporting them can match the batteries using the old rules file, in a user session or a separate daemon.
* daemon: Remove obsolete featuresBastien Nocera2013-10-1412-1465/+1
|
* daemon: Simplify _new() functionsBastien Nocera2013-10-1410-30/+10
|
* freebsd: Remove useless finalizeBastien Nocera2013-10-141-17/+0
| | | | It was just chaining up.
* linux: Don't print a warning if the status sysfs attr is missingBastien Nocera2013-10-141-1/+2
| | | | | This is the case for some devices like the Wacom wireless (Bluetooth) tablets, and shouldn't produce a warning.
* daemon: Remove unused _set_propertyBastien Nocera2013-10-141-14/+0
|
* daemon: Avoid trying to close fd that wasn't openedBastien Nocera2013-10-141-1/+2
| | | | | If we fail to open the fd for the sysfs keyboard backlight control file, don't try to close it.
* daemon: Fix options parsingBastien Nocera2013-10-141-1/+5
| | | | | | | | If an unknown option was passed to the daemon, it might fail to parse some of the passed options, and not take them into account. For example: "upower -d --timed-exit" would fail to exit Error out when an unknown option is passed.
* linux: Opt-out of checking Watts Up devices earlierBastien Nocera2013-10-141-12/+12
| | | | | Don't wait for tty events from udev if we're not going to use the Watts Up device anyway. Cuts down on the possible wakeups.