summaryrefslogtreecommitdiff
path: root/libupower-glib
Commit message (Collapse)AuthorAgeFilesLines
* Support g_autoptr() for all libupower-glib object typesKalev Lember2015-09-153-0/+43
| | | | | | | | This allows using e.g. g_autoptr(UpDevice) in other programs, but does not make upower itself use g_autoptr, or require a new enough glib to support it. Signed-off-by: Richard Hughes <richard@hughsie.com>
* Share generated code between daemon and libraryCosimo Cecchi2015-07-294-201/+162
| | | | | Since we use the same GDBus code in libupower-glib and the daemon, auto-generate a private library that can be used by both.
* lib: Fix memory leak in up_client_get_devices()Bastien Nocera2015-06-261-2/+2
| | | | | When up_client_get_devices() fails to contact the D-Bus daemon, don't leak the newly created array.
* lib: Fix crash on uninitialized variantVlad Orlov2015-03-131-2/+2
| | | | | | | | | Initialize the GVariant* pointers, so that they aren't uninitialized when jumping to "out:" and unref'ing them. https://bugs.freedesktop.org/show_bug.cgi?id=89476 https://bugs.debian.org/774546 https://bugs.launchpad.net/ubuntu-mate/+bug/1428337
* Do not print a critical warning when misusing up_device_set_object_path_sync()Richard Hughes2014-05-201-2/+11
|
* all: Remove IsDocked propertyBastien Nocera2014-05-072-38/+0
| | | | | | | Removes the deprecated (for not very long) property, before we do a 1.0 release. https://bugs.freedesktop.org/show_bug.cgi?id=78380
* lib: Fix API doc for up_client_get_on_battery()Bastien Nocera2014-05-071-1/+1
|
* lib: Hard-code the IsDocked valueBastien Nocera2014-05-071-5/+6
|
* lib: Fix typo in g-i annotationBastien Nocera2014-04-231-1/+1
| | | | Missing colon.
* lib: Fix segfault on getting property when daemon is not runningMartin Pitt2013-11-081-0/+3
| | | | | This fixes "upower --version" when the daemon is not running, and thus the client proxy is NULL.
* lib: Fix possible warning when type changesBastien Nocera2013-10-171-1/+4
| | | | | UpDevice on the daemon side has a "type" property, but the libupower-glib object has a "kind" type instead. Translate that.
* lib: Fix compile-time warningBastien Nocera2013-10-171-1/+1
|
* lib: Remove up_client_enumerate_devices_sync()Bastien Nocera2013-10-172-95/+41
| | | | | | | | | | | | And make device-removed send an object path, not a UpDevice. This means that we don't keep all the remote devices as local UpDevices object, getting woken up any time any of them have a property changed, without anybody listening. This should greatly cut down on the wakeups on the client side, especially for applications that only use a small portion of the API like the "on-battery" or "warning-level" properties.
* all: Remove *changed signalsBastien Nocera2013-10-174-88/+0
| | | | | | | | | 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.
* lib: Proxy notify changes from UpDevice glueBastien Nocera2013-10-171-2/+3
|
* lib: Simplify proxying glue properties in UpClientBastien Nocera2013-10-171-14/+2
|
* all: Add GetCriticalAction daemon methodBastien Nocera2013-10-172-0/+26
| | | | | | | | | 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.
* all: Remove WarningLevel from the daemon propertiesBastien Nocera2013-10-172-37/+0
| | | | | | 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.
* lib: Trim properties when printing the display deviceBastien Nocera2013-10-171-7/+14
|
* lib: Add up_client_get_display_device()Bastien Nocera2013-10-172-0/+25
| | | | Add a helper to get to the display device.
* lib: Remove unneeded up_client_get_properties_sync()Bastien Nocera2013-10-172-25/+0
| | | | | It doesn't do anything, and we already broke the ABI by removing some functions, so remove this as well.
* lib: Fix compilationBastien Nocera2013-10-151-2/+2
|
* lib: Use slices to allocate cached propertiesBastien Nocera2013-10-151-2/+2
| | | | Saves on memory fragmentation.
* lib: Print property name when cached property doesn't existBastien Nocera2013-10-151-1/+1
|
* lib: Cache property values correctlyBastien Nocera2013-10-151-1/+2
| | | | This is cleaner.
* daemon: Add new WarningLevel "Discharging"Bastien Nocera2013-10-142-0/+5
| | | | | | 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).
* lib: Add support for the IconName propertyBastien Nocera2013-10-141-0/+22
|
* lib: Emit notify:: signalsBastien Nocera2013-10-141-0/+28
| | | | | | In the UpClient object. https://bugs.freedesktop.org/show_bug.cgi?id=43001
* lib: up_device_to_text() won't work for fake devicesBastien Nocera2013-10-141-0/+1
| | | | | For now, up_device_to_text() won't work for devices that aren't backed by a UPower device.
* lib: Make it possible to create local UpDevicesBastien Nocera2013-10-141-0/+41
| | | | | | | | | gnome-settings-daemon creates a composite UpDevice that's not backed by any real D-Bus object in UPower, so we shouldn't try and poke the inexistant proxy in this case. We'll cache the properties that the caller sets in this case, but will not support sending back default/unset values.
* lib: Update for property removal and additionsBastien Nocera2013-10-142-21/+22
| | | | Remove on-low-battery and add warning-level daemon properties.
* lib: Fix alignment of "online" in device dumpBastien Nocera2013-10-141-1/+1
|
* lib: Add warning-level device propertyBastien Nocera2013-10-141-0/+23
|
* lib: Add UpDeviceLevel enumBastien Nocera2013-10-142-1/+72
|
* lib: Remove dbus-glib from the dependenciesBastien Nocera2013-10-141-3/+1
| | | | libupower-glib now uses GDBus.
* lib: Port UpWakeUps to GDBusBastien Nocera2013-10-141-160/+64
| | | | Using the new proxy.
* lib: Port UpDevice to GDBusBastien Nocera2013-10-141-429/+225
| | | | Using the new proxy.
* lib: No need to set private members to NULLBastien Nocera2013-10-146-18/+0
| | | | GObject already makes sure of that for us.
* lib: Port UpClient to GDBusBastien Nocera2013-10-141-205/+46
| | | | Using the new proxy.
* lib: Build the new D-Bus glueBastien Nocera2013-10-141-1/+6
|
* lib: Add autogenerated glue to the daemonBastien Nocera2013-10-141-0/+38
|
* Remove QoS interfaceBastien Nocera2013-10-146-771/+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-141-83/+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.
* lib: Remove deprecated featuresBastien Nocera2013-10-145-453/+0
| | | | All this is now handled by logind.
* lib: Simplify _new() functionsBastien Nocera2013-10-145-15/+5
| | | | No need to use a temporary variable.
* lib: Simplify _to_string() callsBastien Nocera2013-10-141-58/+29
|
* lib: Add missing "element-type" introspection metadataBastien Nocera2013-10-143-4/+4
| | | | https://bugs.freedesktop.org/show_bug.cgi?id=55419
* lib: Fix crasher calling _about_to_sleep_sync()Bastien Nocera2013-10-131-1/+1
| | | | https://bugs.freedesktop.org/show_bug.cgi?id=54976
* lib: Fix a small memory leakBastien Nocera2013-10-101-0/+2
| | | | The bus was never unreferenced in the UpWakeups object.
* up-client: Really don't overwrite retval with prop valuesBastien Nocera2013-10-101-9/+9
| | | | | | | db89e5a32bf2c16c0d3d00f6c8f0ef7e5e7efa8f was incomplete and "ret" was being used instead of prop_val to set some of those properties. It's likely your laptop would have been seen as docked for example.