[evolution-data-server] Correct introspection code build without libgdata



commit 6ff32b8696f0d2fdda4fe88da6b12c574bc7a5e9
Author: Milan Crha <mcrha redhat com>
Date:   Thu Nov 23 13:07:35 2017 +0100

    Correct introspection code build without libgdata

 src/libedataserver/e-gdata-oauth2-authorizer.c |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)
---
diff --git a/src/libedataserver/e-gdata-oauth2-authorizer.c b/src/libedataserver/e-gdata-oauth2-authorizer.c
index 79ef743..6c40e8d 100644
--- a/src/libedataserver/e-gdata-oauth2-authorizer.c
+++ b/src/libedataserver/e-gdata-oauth2-authorizer.c
@@ -339,6 +339,22 @@ e_gdata_oauth2_authorizer_init (EGDataOAuth2Authorizer *oauth2_authorizer)
        g_weak_ref_init (&oauth2_authorizer->priv->source, NULL);
 }
 
+#else /* HAVE_LIBGDATA */
+
+/* Define a fake object, thus GObject introspection code is happy even when
+   libgdata support was disabled. */
+G_DEFINE_TYPE (EGDataOAuth2Authorizer, e_gdata_oauth2_authorizer, G_TYPE_OBJECT)
+
+static void
+e_gdata_oauth2_authorizer_class_init (EGDataOAuth2AuthorizerClass *class)
+{
+}
+
+static void
+e_gdata_oauth2_authorizer_init (EGDataOAuth2Authorizer *oauth2_authorizer)
+{
+}
+
 #endif /* HAVE_LIBGDATA */
 
 /**


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]