aboutsummaryrefslogtreecommitdiff
path: root/src/session-service.c
diff options
context:
space:
mode:
authorTed Gould <ted@canonical.com>2009-07-24 15:56:36 -0500
committerTed Gould <ted@canonical.com>2009-07-24 15:56:36 -0500
commit030273f33da9c1ac7875d7319ffc6d78561719cf (patch)
tree148d1c919460397afb812bddc8e056c70c9f0614 /src/session-service.c
parent7892498e5af9af135aab6268ec875384ecf47109 (diff)
downloadayatana-indicator-session-030273f33da9c1ac7875d7319ffc6d78561719cf.tar.gz
ayatana-indicator-session-030273f33da9c1ac7875d7319ffc6d78561719cf.tar.bz2
ayatana-indicator-session-030273f33da9c1ac7875d7319ffc6d78561719cf.zip
Checking the suspend and hibernate properties
Diffstat (limited to 'src/session-service.c')
-rw-r--r--src/session-service.c28
1 files changed, 26 insertions, 2 deletions
diff --git a/src/session-service.c b/src/session-service.c
index 50e0f13..240f397 100644
--- a/src/session-service.c
+++ b/src/session-service.c
@@ -45,6 +45,18 @@ suspend_prop_cb (DBusGProxy * proxy, DBusGProxyCall * call, gpointer userdata)
{
suspend_call = NULL;
+ GValue candoit = {0};
+ GError * error = NULL;
+ dbus_g_proxy_end_call(proxy, call, &error, G_TYPE_VALUE, &candoit, G_TYPE_INVALID);
+ if (error != NULL) {
+ g_warning("Unable to check suspend: %s", error->message);
+ g_error_free(error);
+ return;
+ }
+ g_debug("Got Suspend: %s", g_value_get_boolean(&candoit) ? "true" : "false");
+
+
+ return;
}
static void
@@ -52,6 +64,18 @@ hibernate_prop_cb (DBusGProxy * proxy, DBusGProxyCall * call, gpointer userdata)
{
hibernate_call = NULL;
+ GValue candoit = {0};
+ GError * error = NULL;
+ dbus_g_proxy_end_call(proxy, call, &error, G_TYPE_VALUE, &candoit, G_TYPE_INVALID);
+ if (error != NULL) {
+ g_warning("Unable to check hibernate: %s", error->message);
+ g_error_free(error);
+ return;
+ }
+ g_debug("Got Hibernate: %s", g_value_get_boolean(&candoit) ? "true" : "false");
+
+
+ return;
}
/* A signal that we need to recheck to ensure we can still
@@ -71,7 +95,7 @@ dpk_changed_cb (DBusGProxy * proxy, gpointer user_data)
G_TYPE_STRING,
"can-suspend",
G_TYPE_INVALID,
- G_TYPE_BOOLEAN,
+ G_TYPE_VALUE,
G_TYPE_INVALID);
}
@@ -88,7 +112,7 @@ dpk_changed_cb (DBusGProxy * proxy, gpointer user_data)
G_TYPE_STRING,
"can-hibernate",
G_TYPE_INVALID,
- G_TYPE_BOOLEAN,
+ G_TYPE_VALUE,
G_TYPE_INVALID);