summaryrefslogtreecommitdiff
path: root/src/up-device.c
AgeCommit message (Collapse)AuthorFilesLines
2014-11-26daemon: release resources at shutdownPeter Wu1-0/+16
This makes it easier to find real memory leaks with valgrind. After calling the up_backend_unplug functions, you cannot restart it with up_backend_coldplug since the lists are cleared. Tested with Linux only (not on *BSD; dummy compiles). https://bugs.freedesktop.org/show_bug.cgi?id=82659
2014-11-26daemon: fix memleaks in GetStatistics and GetHistoryPeter Wu1-6/+14
dbus_g_method_return[_error] does not claim the passed parameters, the caller must free it theirselves. complex is filled with an GValueArray pointer (see UP_DBUS_STRUCT_DOUBLE_DOUBLE) but its contents are not freed (memleak!). This patch introduces a deprecation warning due to the use g_value_array_free, but since UP_DBUS_STRUCT_DOUBLE_DOUBLE is a GValueArray, this is unavoidable. https://bugs.freedesktop.org/show_bug.cgi?id=82659
2013-10-18daemon: Don't get in a bad state when refresh failsBastien Nocera1-5/+3
Failure to refresh was supposed to be non-fatal, but since we started putting objects on the bus *after* refresh, we were skipping the registration if refresh failed, as is the case in the UPS test case.
2013-10-18daemon: Fix typos in commentsBastien Nocera1-1/+1
2013-10-18daemon: Add small doc update_warning_levelBastien Nocera1-0/+2
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-17all: Remove *changed signalsBastien Nocera1-20/+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.
2013-10-17daemon: Make warning-level UpDevice property writableBastien Nocera1-1/+4
So we can update the display device warning level.
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: Add GetDisplayDevice methodBastien Nocera1-0/+16
And export a DisplayDevice object which can be used by desktop shells to show/hide the status icon.
2013-10-16daemon: Use constant for the devices object pathsBastien Nocera1-1/+3
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: Fix possible crasher in UpDevice self-testBastien Nocera1-0/+4
2013-10-15daemon: Remove unused internal D-Bus proxyBastien Nocera1-10/+1
In UpDevice.
2013-10-15daemon: Register on the Bus after coldplugBastien Nocera1-21/+10
Both for the daemon and devices, so as to avoid D-Bus changes storms on startup.
2013-10-14daemon: Move all computations of warning level to daemonBastien Nocera1-8/+6
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: Add IconName propertyBastien Nocera1-0/+79
Sends out icon names as defined by the Icon Naming specification. Will save quite a bit of client side code.
2013-10-14daemon: Add small hack for keyboards and miceBastien Nocera1-0/+1
Imported from gnome-settings-daemon, itself from gnome-power-manager.
2013-10-14daemon: Replace "on-low-battery" propertyBastien Nocera1-19/+0
With "warning-level" property.
2013-10-14daemon: Add WarningLevel device propertyBastien Nocera1-0/+47
2013-10-14daemon: Remove unneeded reset of priv struct membersBastien Nocera1-7/+0
It's already done by GObject.
2013-10-14Remove obsolete battery recall propertiesBastien Nocera1-55/+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.
2013-10-14daemon: Simplify _new() functionsBastien Nocera1-3/+1
2013-08-23Add temperature property for batteriesSeth Forshee1-0/+16
Linux's power_supply class supports a temperature attribute, which is supported by many battery drivers. Add a new property to export this information and support this property in Linux. https://bugs.freedesktop.org/show_bug.cgi?id=68338 Signed-off-by: Seth Forshee <seth.forshee@canonical.com> Signed-off-by: Martin Pitt <martinpitt@gnome.org>
2013-02-20Revert "Add option to run daemon on the session bus for testing"Martin Pitt1-1/+1
This reverts commit eddcf0ef3d0b8445618e368328d7e110a83b69b3. We don't need the --test option any more now that we always run tests on a (fake) system D-BUS.
2012-10-30Add luminosity propertyJulien Danjou1-0/+16
This adds the luminosity property for devices able to recharge using light. Signed-off-by: Julien Danjou <julien@danjou.info> Signed-off-by: Richard Hughes <richard@hughsie.com>
2011-04-26Add option to run daemon on the session bus for testingMartin Pitt1-1/+1
Add a daemon option --test which will run upowerd on the session bus. This allows us to run tests without interfering with the system instance. This also avoids any root privileges entirely, which permits running integration tests as part of a package build.
2010-11-01Port from EggDebug to the GLib built-in logging frameworkRichard Hughes1-11/+9
2010-06-05Port to GTestRichard Hughes1-27/+0
2010-05-28trivial: Get rid of some over-verbose debuggingRichard Hughes1-2/+0
2010-03-26Convert the daemon to using objects from libupower-glib, not ↵Richard Hughes1-10/+14
devkit-power-gobject
2010-02-06devkit-power-gobject/up-enum.h be goneMichael Biebl1-1/+1
Port from devkit-power-gobject/up-enum.h to libupower-glib/up-types.h
2010-01-26trivial: rename the new libupower 'type' to 'kind' to avoid clashing with ↵Richard Hughes1-7/+7
GObject generated names
2010-01-18Rename the DBus service from org.freedesktop.DeviceKit.Power to ↵Richard Hughes1-1/+1
org.freedesktop.UPower
2010-01-18trivial: rename some internal defines for the upower moveRichard Hughes1-6/+6
2010-01-18trivial: DkpStatsObj -> UpStatsObj (no ABI or API break)Richard Hughes1-2/+2
2010-01-18trivial: DkpHistory -> UpHistory (no ABI or API break)Richard Hughes1-19/+19
2010-01-18trivial: DkpNative -> UpNative (no ABI or API break)Richard Hughes1-1/+1
2010-01-18trivial: switch to using the new enum names internally (no ABI or API break)Richard Hughes1-11/+11
2010-01-18trivial: DkpDevice -> UpDevice (no ABI or API break)Richard Hughes1-125/+125
2010-01-18trivial: DkpDaemon -> UpDaemon (no ABI or API break)Richard Hughes1-9/+9
2010-01-18trivial: Rename a lot of the source files from dkp-foo to up-foo, no API or ↵Richard Hughes1-0/+1224
ABI changes