[gdm/multi-stack: 14/34] Catch service-unavailable from server in client and propagate it
- From: Ray Strode <halfline src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gdm/multi-stack: 14/34] Catch service-unavailable from server in client and propagate it
- Date: Wed, 29 Sep 2010 23:33:45 +0000 (UTC)
commit 3bc57989d1a1ba68f9029202ca18b05f274dc376
Author: Ray Strode <rstrode redhat com>
Date: Wed Oct 28 21:46:39 2009 -0400
Catch service-unavailable from server in client and propagate it
gui/simple-greeter/gdm-greeter-client.c | 20 ++++++++++++++++++++
gui/simple-greeter/gdm-greeter-client.h | 2 ++
2 files changed, 22 insertions(+), 0 deletions(-)
---
diff --git a/gui/simple-greeter/gdm-greeter-client.c b/gui/simple-greeter/gdm-greeter-client.c
index e42ab1e..ad3ec7e 100644
--- a/gui/simple-greeter/gdm-greeter-client.c
+++ b/gui/simple-greeter/gdm-greeter-client.c
@@ -63,6 +63,7 @@ enum {
PROBLEM,
INFO_QUERY,
SECRET_INFO_QUERY,
+ SERVICE_UNAVAILABLE,
READY,
RESET,
AUTHENTICATION_FAILED,
@@ -264,6 +265,13 @@ on_problem (GdmGreeterClient *client,
}
static void
+on_service_unavailable (GdmGreeterClient *client,
+ DBusMessage *message)
+{
+ emit_string_signal_for_message (client, "ServiceUnavailable", message, SERVICE_UNAVAILABLE);
+}
+
+static void
on_ready (GdmGreeterClient *client,
DBusMessage *message)
{
@@ -770,6 +778,8 @@ client_dbus_handle_message (DBusConnection *connection,
on_info (client, message);
} else if (dbus_message_is_signal (message, GREETER_SERVER_DBUS_INTERFACE, "Problem")) {
on_problem (client, message);
+ } else if (dbus_message_is_signal (message, GREETER_SERVER_DBUS_INTERFACE, "ServiceUnavailable")) {
+ on_service_unavailable (client, message);
} else if (dbus_message_is_signal (message, GREETER_SERVER_DBUS_INTERFACE, "Ready")) {
on_ready (client, message);
} else if (dbus_message_is_signal (message, GREETER_SERVER_DBUS_INTERFACE, "Reset")) {
@@ -1003,6 +1013,16 @@ gdm_greeter_client_class_init (GdmGreeterClientClass *klass)
2,
G_TYPE_STRING, G_TYPE_STRING);
+ gdm_greeter_client_signals[SERVICE_UNAVAILABLE] =
+ g_signal_new ("service-unavailable",
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_FIRST,
+ G_STRUCT_OFFSET (GdmGreeterClientClass, service_unavailable),
+ NULL,
+ NULL,
+ g_cclosure_marshal_VOID__STRING,
+ G_TYPE_NONE, 1, G_TYPE_STRING);
+
gdm_greeter_client_signals[READY] =
g_signal_new ("ready",
G_OBJECT_CLASS_TYPE (object_class),
diff --git a/gui/simple-greeter/gdm-greeter-client.h b/gui/simple-greeter/gdm-greeter-client.h
index 2f27503..917ca9c 100644
--- a/gui/simple-greeter/gdm-greeter-client.h
+++ b/gui/simple-greeter/gdm-greeter-client.h
@@ -59,6 +59,8 @@ typedef struct
void (* problem) (GdmGreeterClient *client,
const char *service_name,
const char *problem);
+ void (* service_unavailable) (GdmGreeterClient *client,
+ const char *service_name);
void (* ready) (GdmGreeterClient *client,
const char *service_name);
void (* reset) (GdmGreeterClient *client);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]