aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy/empathy-auth-factory.c
diff options
context:
space:
mode:
authorDanielle Madeley <danielle.madeley@collabora.co.uk>2011-11-07 09:03:50 +0800
committerDanielle Madeley <danielle.madeley@collabora.co.uk>2011-11-07 09:03:50 +0800
commit7c0dff773920a0796e079d5c79165a12fc7e8ddd (patch)
tree61c3c535adb7b034373cc3f7af53909d6e396044 /libempathy/empathy-auth-factory.c
parentd12639558defd8be43dc0c5c43a80f6397900bd5 (diff)
downloadgsoc2013-empathy-7c0dff773920a0796e079d5c79165a12fc7e8ddd.tar
gsoc2013-empathy-7c0dff773920a0796e079d5c79165a12fc7e8ddd.tar.gz
gsoc2013-empathy-7c0dff773920a0796e079d5c79165a12fc7e8ddd.tar.bz2
gsoc2013-empathy-7c0dff773920a0796e079d5c79165a12fc7e8ddd.tar.lz
gsoc2013-empathy-7c0dff773920a0796e079d5c79165a12fc7e8ddd.tar.xz
gsoc2013-empathy-7c0dff773920a0796e079d5c79165a12fc7e8ddd.tar.zst
gsoc2013-empathy-7c0dff773920a0796e079d5c79165a12fc7e8ddd.zip
Make GOA optional again
There is an --disable-goa flag in Empathy's configure, which should be able to disable GOA, except it had been included as a required dependency. This patch makes it completely optional again. Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=663442
Diffstat (limited to 'libempathy/empathy-auth-factory.c')
-rw-r--r--libempathy/empathy-auth-factory.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/libempathy/empathy-auth-factory.c b/libempathy/empathy-auth-factory.c
index 03f2cd16d..d88e9bfd8 100644
--- a/libempathy/empathy-auth-factory.c
+++ b/libempathy/empathy-auth-factory.c
@@ -18,6 +18,8 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include <config.h>
+
#include "empathy-auth-factory.h"
#include <telepathy-glib/telepathy-glib.h>
@@ -27,9 +29,12 @@
#include "empathy-keyring.h"
#include "empathy-server-sasl-handler.h"
#include "empathy-server-tls-handler.h"
-#include "empathy-goa-auth-handler.h"
#include "empathy-utils.h"
+#ifdef HAVE_GOA
+#include "empathy-goa-auth-handler.h"
+#endif /* HAVE_GOA */
+
#include "extensions/extensions.h"
G_DEFINE_TYPE (EmpathyAuthFactory, empathy_auth_factory, TP_TYPE_BASE_CLIENT);
@@ -43,7 +48,10 @@ struct _EmpathyAuthFactoryPriv {
* reffed (EmpathyServerSASLHandler *)
* */
GHashTable *sasl_handlers;
+
+#ifdef HAVE_GOA
EmpathyGoaAuthHandler *goa_handler;
+#endif /* HAVE_GOA */
gboolean dispose_run;
};
@@ -391,6 +399,7 @@ get_password_cb (GObject *source,
}
}
+#ifdef HAVE_GOA
static void
goa_claim_cb (GObject *source,
GAsyncResult *result,
@@ -414,6 +423,7 @@ goa_claim_cb (GObject *source,
observe_channels_data_free (data);
}
+#endif /* HAVE_GOA */
static void
observe_channels (TpBaseClient *client,
@@ -449,6 +459,7 @@ observe_channels (TpBaseClient *client,
data->account = g_object_ref (account);
data->channel = g_object_ref (channel);
+#ifdef HAVE_GOA
/* GOA auth? */
if (empathy_goa_auth_handler_supports (self->priv->goa_handler, channel, account))
{
@@ -460,6 +471,7 @@ observe_channels (TpBaseClient *client,
tp_observe_channels_context_accept (context);
return;
}
+#endif /* HAVE_GOA */
/* Password auth? */
if (empathy_sasl_channel_supports_mechanism (data->channel,
@@ -511,7 +523,9 @@ empathy_auth_factory_init (EmpathyAuthFactory *self)
self->priv->sasl_handlers = g_hash_table_new_full (g_str_hash, g_str_equal,
NULL, g_object_unref);
+#ifdef HAVE_GOA
self->priv->goa_handler = empathy_goa_auth_handler_new ();
+#endif /* HAVE_GOA */
}
static void
@@ -573,7 +587,9 @@ empathy_auth_factory_dispose (GObject *object)
priv->dispose_run = TRUE;
g_hash_table_unref (priv->sasl_handlers);
+#ifdef HAVE_GOA
g_object_unref (priv->goa_handler);
+#endif /* HAVE_GOA */
G_OBJECT_CLASS (empathy_auth_factory_parent_class)->dispose (object);
}