[empathy] auth-factory: relay the auth-password-failed signal
- From: Guillaume Desmottes <gdesmott src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [empathy] auth-factory: relay the auth-password-failed signal
- Date: Thu, 24 Nov 2011 11:20:02 +0000 (UTC)
commit e981a1084ec54ecff03ab234a666ce3742f163ae
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date: Fri Oct 28 15:00:40 2011 +0200
auth-factory: relay the auth-password-failed signal
https://bugzilla.gnome.org/show_bug.cgi?id=661640
libempathy/empathy-auth-factory.c | 25 +++++++++++++++++++++++++
1 files changed, 25 insertions(+), 0 deletions(-)
---
diff --git a/libempathy/empathy-auth-factory.c b/libempathy/empathy-auth-factory.c
index d88e9bf..0aaea1c 100644
--- a/libempathy/empathy-auth-factory.c
+++ b/libempathy/empathy-auth-factory.c
@@ -59,6 +59,7 @@ struct _EmpathyAuthFactoryPriv {
enum {
NEW_SERVER_TLS_HANDLER,
NEW_SERVER_SASL_HANDLER,
+ AUTH_PASSWORD_FAILED,
LAST_SIGNAL,
};
@@ -146,6 +147,18 @@ sasl_handler_invalidated_cb (EmpathyServerSASLHandler *handler,
}
static void
+sasl_handler_auth_password_failed_cb (EmpathyServerSASLHandler *handler,
+ const gchar *password,
+ EmpathyAuthFactory *self)
+{
+ TpAccount *account;
+
+ account = empathy_server_sasl_handler_get_account (handler);
+
+ g_signal_emit (self, signals[AUTH_PASSWORD_FAILED], 0, account, password);
+}
+
+static void
server_sasl_handler_ready_cb (GObject *source,
GAsyncResult *res,
gpointer user_data)
@@ -185,6 +198,9 @@ server_sasl_handler_ready_cb (GObject *source,
tp_g_signal_connect_object (handler, "invalidated",
G_CALLBACK (sasl_handler_invalidated_cb), data->self, 0);
+ tp_g_signal_connect_object (handler, "auth-password-failed",
+ G_CALLBACK (sasl_handler_auth_password_failed_cb), data->self, 0);
+
g_signal_emit (data->self, signals[NEW_SERVER_SASL_HANDLER], 0,
handler);
}
@@ -626,6 +642,15 @@ empathy_auth_factory_class_init (EmpathyAuthFactoryClass *klass)
g_cclosure_marshal_generic,
G_TYPE_NONE,
1, EMPATHY_TYPE_SERVER_SASL_HANDLER);
+
+ signals[AUTH_PASSWORD_FAILED] =
+ g_signal_new ("auth-password-failed",
+ G_TYPE_FROM_CLASS (klass),
+ G_SIGNAL_RUN_LAST, 0,
+ NULL, NULL,
+ g_cclosure_marshal_generic,
+ G_TYPE_NONE,
+ 2, TP_TYPE_ACCOUNT, G_TYPE_STRING);
}
EmpathyAuthFactory *
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]