Commit graph

81 commits

Author SHA1 Message Date
Martin Pitt
4e83fabac1 up-tool: Exit early when connecting to upower fails
This avoids spewing dozens of assertions like

   libupower-glib-CRITICAL **: up_client_get_devices: assertion 'UP_IS_CLIENT (client)' failed
   libupower-glib-CRITICAL **: up_device_get_object_path: assertion 'UP_IS_DEVICE (device)' failed

and useless default values and then exiting successfully (which might confuse
users or scripts trying to parse the output).

Use the new up_client_new_full() constructor so that we get a proper GError.

Side issue in https://bugs.freedesktop.org/show_bug.cgi?id=95350
2016-05-18 14:58:53 +02:00
Arnaud Quette
7371415beb Fix build regression
The removal of dbus-glib and libdbus build dependencies has introduced
a build regression on upower, which fails to link with gobject

Signed-off-by: Richard Hughes <richard@hughsie.com>
2015-08-10 11:06:30 +01:00
Cosimo Cecchi
b549d8928b build: remove dependency on dbus-glib and libdbus
Nothing depends on it any more.
2015-07-29 13:37:11 +01:00
Cosimo Cecchi
a037cffdee up-tool: remove unused variables 2015-07-29 13:37:11 +01:00
Bastien Nocera
5ed25a7e5f all: Remove IsDocked property
Removes the deprecated (for not very long) property, before we do a 1.0
release.

https://bugs.freedesktop.org/show_bug.cgi?id=78380
2014-05-07 11:01:27 +02:00
Bastien Nocera
e8beb269df tools: Remove is-docked from up-tool 2014-05-07 09:48:44 +02:00
Bastien Nocera
c91abb77ed tools: Update for lib API changes 2013-10-17 14:39:16 +02:00
Bastien Nocera
8453da5014 tools: Use notify signals instead of *changed ones 2013-10-17 12:40:05 +02:00
Bastien Nocera
db31456921 all: Add GetCriticalAction daemon method
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-17 09:04:03 +02:00
Bastien Nocera
b2f72dd69a all: Remove WarningLevel from the daemon properties
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-17 00:57:27 +02:00
Bastien Nocera
c00eda8ca0 tools: Print the display device when using -d 2013-10-17 00:46:01 +02:00
Bastien Nocera
0da46209f3 tools: Update for API changes 2013-10-14 10:42:56 +02:00
Bastien Nocera
bd7af247f0 tools: Remove use of deprecated features 2013-10-14 10:42:55 +02:00
Shih-Yuan Lee (FourDollars)
fdc62ad245 Set locale in daemon and tool
This is necessary to properly show non-UTF8 strings in debug mode (for the
daemon) and upower --dump etc. (for the tool).
2013-09-04 07:19:24 +02:00
Martin Pitt
7933b0e552 trivial: Stop calling deprecated g_type_init()
When building with a recent enough glib (>= 2.36), don't call g_type_init() any
more. This is deprecated and causes ugly compile warnings.
2013-08-29 11:10:15 +02:00
Richard Hughes
efa97d515f Use PIE to better secure installed tools and also use full RELRO in the daemon 2013-05-07 14:07:31 +01:00
Richard Hughes
372c2f8d29 Add a --enable-deprecated configure argument
This is turned off by default. If this is not set, then any calls to Suspend(),
SuspendAllowed(), Hibernate() or HibernateAllowed() will fail with an error.
The error mesage tells the user what new method to port to in logind.

I'm expecting to set --enable-deprecated for Fedora 17 and 18, but turn it off
for Fedora 19, so other distributions probably want to follow suit to find out
what other stuff needs to be ported to the new APIs early. GNOME should already
be fine, but KDE will need some solid porting as I understand it.

See http://lists.freedesktop.org/archives/devkit-devel/2013-January/001339.html
for more information on future plans and for rationale.
2013-02-12 11:08:35 +00:00
Richard Hughes
5be743c910 Don't use the deprecated INCLUDES in Makefile.am 2013-01-14 09:21:30 +00:00
Martin Pitt
99768c18eb Fix "can-hibernate" formatting in upower --dump
All other field names end with a colon, so that one should, too.
2012-11-08 09:53:49 +01:00
Richard Hughes
b19fca9637 Use git.mk and remove the manual .gitignore files 2011-07-19 12:40:21 +01:00
Landry Breuil
2527d0170d upower needs -pthread
Signed-off-by: Richard Hughes <richard@hughsie.com>
2011-03-21 18:38:48 +00:00
Michael Biebl
11301ae3d6 Drop devkit and devkit-power-daemon symlinks
Signed-off-by: Richard Hughes <richard@hughsie.com>
2011-02-23 16:18:53 +00:00
Richard Hughes
17b7aef701 linux: use the number of active DRM devices to determine the system docked status
Not ideal, but better than relying on ACPI.
2011-01-04 18:05:09 +00:00
Richard Hughes
59893663fb Port from EggDebug to the GLib built-in logging framework 2010-11-01 11:28:31 +00:00
Richard Hughes
bcc0c2ced0 Ensure we enumerate devices before we start monitoring them 2010-03-26 11:29:38 +00:00
Michael Biebl
3ea96602e6 Update help and g_option_context_new to upower 2010-02-06 13:42:57 +00:00
Richard Hughes
41917bfc73 trivial: fix a compile warning 2010-02-05 10:37:32 +00:00
Richard Hughes
29d4de79e1 Use GCancellable in libupower-glib so we can eventually get to GIO async methods without breaking future API 2010-02-05 09:41:06 +00:00
Richard Hughes
4c02c6310d Make the upower client tool use libupwer-glib, rather than devit-power-gobject 2010-02-05 09:26:10 +00:00
Michael Biebl
83c0574466 Remove EGG_* log define.
The EGG_* log defines don't seem to be used and still reference the old
DeviceKit-power name. So just remove it.
2010-02-05 08:35:11 +00:00
Richard Hughes
faeb7ffabc Rename the man pages and rename the main daemon binary name 2010-01-21 14:47:21 +00:00
Richard Hughes
adcb737767 Make the client tool be called upower, but maintain a symlink to devkit-power 2010-01-21 14:30:28 +00:00
Richard Hughes
d27c836e97 Rename the DBus service from org.freedesktop.DeviceKit.Power to org.freedesktop.UPower 2010-01-18 16:53:12 +00:00
Richard Hughes
8362088d12 trivial: rename some internal defines for the upower move 2010-01-18 14:04:24 +00:00
Richard Hughes
15ac5102c8 trivial: Rename a lot of the source files from dkp-foo to up-foo, no API or ABI changes 2010-01-18 12:26:55 +00:00
Richard Hughes
a0cac7f1ca Update some common egg code for better debugging support 2009-11-23 14:24:00 +00:00
Richard Hughes
6199e901ea When using devkit-power --monitor, print a timestamp before each message for debugging. Fixes fd#24666 2009-10-22 10:30:53 +01:00
Richard Hughes
1587fc5758 Convert the property names to be FirstLetterCaps rather than dash-dash so KDE people can use the DBus interface 2009-09-18 18:28:53 +01:00
Richard Hughes
97a7824844 Fix up a few problems spotted by clang 2009-09-11 14:39:48 +01:00
Richard Hughes
db41483230 I must learn to spell deprecated... 2009-07-03 11:05:00 +01:00
Richard Hughes
0a5149ea6a Protect the non-GObject accessors with DKP_DISABLE_DEPRECIATED and fix up the client tool 2009-07-03 10:52:24 +01:00
Richard Hughes
7bd2dfefcb Add a property lid-is-closed so that we can finally drop the HAL dep in g-p-m and x-p-m 2009-05-05 12:51:26 +01:00
Richard Hughes
67c36ceff0 Add a has-capability to the org.freedesktop.DeviceKit.Power.Wakeups interface so clients can tell if the wakeups functionality can be supported 2009-04-22 16:55:24 +01:00
Richard Hughes
90bc938bc4 trivial: print the error message from dkp-tool 2009-04-01 09:15:04 +01:00
Richard Hughes
4fb78bb9f5 trivial: add lots of GErrors to the gobject library, and avoid using egg_warning 2009-02-27 13:18:57 +00:00
Richard Hughes
d2c0ee6412 move the library directory from libdevkit-power to devkit-power-gobject 2009-02-27 12:22:06 +00:00
Richard Hughes
6f0dc6a530 trivial: fix make distcheck 2009-02-26 13:31:57 +00:00
Richard Hughes
55db60ef82 bugfix: remove use of EggObjList, which was pretty hacky, and try to make the library more sane 2009-02-26 12:15:20 +00:00
Richard Hughes
3decd60825 feature: allow showing the wakeup data in the devkit-power command line tool 2009-01-30 13:55:42 +00:00
Richard Hughes
39df99ae20 trivial: add a fixme 2009-01-23 17:14:02 +00:00