diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2011-10-28 21:00:40 +0800 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2011-11-23 20:14:31 +0800 |
commit | e981a1084ec54ecff03ab234a666ce3742f163ae (patch) | |
tree | 54a5816abd85465ccc2b31c91af42576ecdbc45f /libempathy | |
parent | e2df01bf85d384986dce8102c3b6bd704ea6d318 (diff) | |
download | gsoc2013-empathy-e981a1084ec54ecff03ab234a666ce3742f163ae.tar gsoc2013-empathy-e981a1084ec54ecff03ab234a666ce3742f163ae.tar.gz gsoc2013-empathy-e981a1084ec54ecff03ab234a666ce3742f163ae.tar.bz2 gsoc2013-empathy-e981a1084ec54ecff03ab234a666ce3742f163ae.tar.lz gsoc2013-empathy-e981a1084ec54ecff03ab234a666ce3742f163ae.tar.xz gsoc2013-empathy-e981a1084ec54ecff03ab234a666ce3742f163ae.tar.zst gsoc2013-empathy-e981a1084ec54ecff03ab234a666ce3742f163ae.zip |
auth-factory: relay the auth-password-failed signal
https://bugzilla.gnome.org/show_bug.cgi?id=661640
Diffstat (limited to 'libempathy')
-rw-r--r-- | 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 d88e9bfd8..0aaea1c4a 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 * |