summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorRichard Hughes <richard@hughsie.com>2013-02-12 11:00:21 +0000
committerRichard Hughes <richard@hughsie.com>2013-02-12 11:08:35 +0000
commit372c2f8d2922add987683a24b5d69902e05e2f97 (patch)
treee96cfcf7144e9226daa6eb259fb9a072d56ad1b3 /tools
parent9843589d2d80e6dc2b3f51338e64bd1da1c53860 (diff)
downloadupower-372c2f8d2922add987683a24b5d69902e05e2f97.tar.gz
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.
Diffstat (limited to 'tools')
-rw-r--r--tools/up-tool.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/up-tool.c b/tools/up-tool.c
index fcdc28b..87051e3 100644
--- a/tools/up-tool.c
+++ b/tools/up-tool.c
@@ -118,8 +118,10 @@ static void
up_client_print (UpClient *client)
{
gchar *daemon_version;
+#ifdef ENABLE_DEPRECATED
gboolean can_suspend;
gboolean can_hibernate;
+#endif
gboolean on_battery;
gboolean on_low_battery;
gboolean lid_is_closed;
@@ -128,8 +130,10 @@ up_client_print (UpClient *client)
g_object_get (client,
"daemon-version", &daemon_version,
+#ifdef ENABLE_DEPRECATED
"can-suspend", &can_suspend,
"can-hibernate", &can_hibernate,
+#endif
"on-battery", &on_battery,
"on-low_battery", &on_low_battery,
"lid-is-closed", &lid_is_closed,
@@ -138,8 +142,10 @@ up_client_print (UpClient *client)
NULL);
g_print (" daemon-version: %s\n", daemon_version);
+#ifdef ENABLE_DEPRECATED
g_print (" can-suspend: %s\n", can_suspend ? "yes" : "no");
g_print (" can-hibernate: %s\n", can_hibernate ? "yes" : "no");
+#endif
g_print (" on-battery: %s\n", on_battery ? "yes" : "no");
g_print (" on-low-battery: %s\n", on_low_battery ? "yes" : "no");
g_print (" lid-is-closed: %s\n", lid_is_closed ? "yes" : "no");