[Telepathy-commits] [telepathy-mission-control/master] Temporary workaround for telepathy-glib bug #18515: define TP_ARRAY_TYPE_CHANNEL_CLASS_LIST

Alban Crequy alban.crequy at collabora.co.uk
Tue Nov 18 08:13:05 PST 2008


---
 src/mcd-misc.c |    9 +++++++++
 src/mcd-misc.h |   11 +++++++++++
 2 files changed, 20 insertions(+), 0 deletions(-)

diff --git a/src/mcd-misc.c b/src/mcd-misc.c
index 0ab033b..77959ba 100644
--- a/src/mcd-misc.c
+++ b/src/mcd-misc.c
@@ -178,3 +178,12 @@ _mcd_get_error_string (const GError *error)
     return NULL;
 }
 
+GType
+type_dbus_aasv (void)
+{
+  static GType t = 0;
+
+  if (G_UNLIKELY (t == 0))
+    t = dbus_g_type_get_collection ("GPtrArray", tp_type_dbus_hash_sv ());
+  return t;
+}
diff --git a/src/mcd-misc.h b/src/mcd-misc.h
index d4314b1..d879a80 100644
--- a/src/mcd-misc.h
+++ b/src/mcd-misc.h
@@ -28,6 +28,7 @@
 
 #include <glib.h>
 #include <glib-object.h>
+#include <telepathy-glib/gtypes.h>
 
 G_BEGIN_DECLS
 
@@ -42,5 +43,15 @@ GHashTable *_mcd_deepcopy_asv (GHashTable *asv);
 
 const gchar *_mcd_get_error_string (const GError *error);
 
+/* FIXME: we should use the definition from telepathy-glib, but
+ * https://bugs.freedesktop.org/show_bug.cgi?id=18515
+ * TP_ARRAY_TYPE_CHANNEL_CLASS_LIST is not defined at the moment */
+#ifdef TP_ARRAY_TYPE_CHANNEL_CLASS_LIST
+#error "telepathy-glib has been fixed, this should be removed"
+#endif
+#define TP_ARRAY_TYPE_CHANNEL_CLASS_LIST (type_dbus_aasv ())
+GType type_dbus_aasv (void);
+
+
 G_END_DECLS
 #endif /* MCD_MISC_H */
-- 
1.5.6.5




More information about the Telepathy-commits mailing list