[telepathy-glib/master] Add TP_ARRAY_TYPE_OBJECT_PATH_LIST

Will Thompson will.thompson at collabora.co.uk
Wed Jul 22 09:55:49 PDT 2009


Reviewed-by: Simon McVittie <simon.mcvittie at collabora.co.uk>
---
 docs/reference/telepathy-glib-sections.txt |    2 ++
 telepathy-glib/gtypes.c                    |   21 +++++++++++++++++++++
 telepathy-glib/gtypes.h                    |    4 ++++
 3 files changed, 27 insertions(+), 0 deletions(-)

diff --git a/docs/reference/telepathy-glib-sections.txt b/docs/reference/telepathy-glib-sections.txt
index 6d7926c..86606a5 100644
--- a/docs/reference/telepathy-glib-sections.txt
+++ b/docs/reference/telepathy-glib-sections.txt
@@ -1057,6 +1057,7 @@ tp_g_key_file_get_uint64
 <SUBSECTION>
 # Generic
 tp_dbus_specialized_value_slice_new
+TP_ARRAY_TYPE_OBJECT_PATH_LIST
 TP_HASH_TYPE_STRING_STRING_MAP
 TP_ARRAY_TYPE_STRING_STRING_MAP_LIST
 TP_HASH_TYPE_STRING_VARIANT_MAP
@@ -1179,6 +1180,7 @@ tp_type_dbus_array_a_7bsv_7das
 tp_type_dbus_array_oa_7bsv_7d
 tp_type_dbus_array_of_a_7bsv_7d
 tp_type_dbus_array_of_a_7bss_7d
+tp_type_dbus_array_of_o
 tp_type_dbus_array_os
 tp_type_dbus_array_osuu
 tp_type_dbus_array_sa_28usuussduss_29
diff --git a/telepathy-glib/gtypes.c b/telepathy-glib/gtypes.c
index d2b87a5..d72c90a 100644
--- a/telepathy-glib/gtypes.c
+++ b/telepathy-glib/gtypes.c
@@ -39,6 +39,27 @@
  */
 
 /**
+ * TP_ARRAY_TYPE_OBJECT_PATH_LIST:
+ *
+ * Expands to a call to a function
+ * that returns the #GType of a #GPtrArray
+ * of DBUS_TYPE_G_OBJECT_PATH.
+ *
+ * Since: 0.7.UNRELEASED
+ */
+
+GType
+tp_type_dbus_array_of_o (void)
+{
+  static GType t = 0;
+
+  if (G_UNLIKELY (t == 0))
+    t = dbus_g_type_get_collection ("GPtrArray", DBUS_TYPE_G_OBJECT_PATH);
+
+  return t;
+}
+
+/**
  * tp_dbus_specialized_value_slice_new:
  * @type: A D-Bus specialized type (i.e. probably a specialized GValueArray
  * representing a D-Bus struct)
diff --git a/telepathy-glib/gtypes.h b/telepathy-glib/gtypes.h
index 9976208..a505937 100644
--- a/telepathy-glib/gtypes.h
+++ b/telepathy-glib/gtypes.h
@@ -27,6 +27,10 @@ G_BEGIN_DECLS
 
 #include <telepathy-glib/_gen/gtypes.h>
 
+#define TP_ARRAY_TYPE_OBJECT_PATH_LIST() (tp_type_dbus_array_of_o ())
+
+GType tp_type_dbus_array_of_o (void);
+
 GValue *tp_dbus_specialized_value_slice_new (GType type);
 
 G_END_DECLS
-- 
1.5.6.5



More information about the telepathy-commits mailing list