[Telepathy-commits] [telepathy-glib/master] Move tp_dbus_properties_mixin_make_properties_hash to the correct file

Will Thompson will.thompson at collabora.co.uk
Thu Sep 4 04:08:06 PDT 2008


---
 telepathy-glib/dbus-properties-mixin.c |   36 ++++++++++++++++++++++++++++++++
 telepathy-glib/dbus-properties-mixin.h |    4 +++
 telepathy-glib/exportable-channel.c    |   34 ------------------------------
 telepathy-glib/exportable-channel.h    |    4 ---
 4 files changed, 40 insertions(+), 38 deletions(-)

diff --git a/telepathy-glib/dbus-properties-mixin.c b/telepathy-glib/dbus-properties-mixin.c
index df0f3d7..1731260 100644
--- a/telepathy-glib/dbus-properties-mixin.c
+++ b/telepathy-glib/dbus-properties-mixin.c
@@ -752,6 +752,42 @@ tp_dbus_properties_mixin_get (GObject *self,
   return TRUE;
 }
 
+
+GHashTable *
+tp_dbus_properties_mixin_make_properties_hash (
+    GObject *object,
+    const gchar *first_interface,
+    const gchar *first_property,
+    ...)
+{
+  va_list ap;
+  GHashTable *table;
+  const gchar *interface, *property;
+
+  table = g_hash_table_new_full (g_str_hash, g_str_equal, g_free,
+      (GDestroyNotify) tp_g_value_slice_free);
+
+  va_start (ap, first_property);
+
+  for (interface = first_interface, property = first_property;
+       interface != NULL;
+       interface = va_arg (ap, gchar *), property = va_arg (ap, gchar *))
+    {
+      GValue *value = g_slice_new0 (GValue);
+
+      tp_dbus_properties_mixin_get (object, interface, property,
+            value, NULL);
+      /* Fetching our immutable properties had better not fail... */
+      g_assert (G_IS_VALUE (value));
+
+      g_hash_table_insert (table,
+          g_strdup_printf ("%s.%s", interface, property), value);
+    }
+
+  return table;
+}
+
+
 static void
 _tp_dbus_properties_mixin_get (TpSvcDBusProperties *iface,
                                const gchar *interface_name,
diff --git a/telepathy-glib/dbus-properties-mixin.h b/telepathy-glib/dbus-properties-mixin.h
index 5c4817f..fa1d013 100644
--- a/telepathy-glib/dbus-properties-mixin.h
+++ b/telepathy-glib/dbus-properties-mixin.h
@@ -125,6 +125,10 @@ gboolean tp_dbus_properties_mixin_get (GObject *self,
     const gchar *interface_name, const gchar *property_name,
     GValue *value, GError **error);
 
+GHashTable *tp_dbus_properties_mixin_make_properties_hash (
+    GObject *object, const gchar *first_interface,
+    const gchar *first_property, ...) G_GNUC_NULL_TERMINATED;
+
 G_END_DECLS
 
 #endif /* #ifndef __TP_DBUS_PROPERTIES_MIXIN_H__ */
diff --git a/telepathy-glib/exportable-channel.c b/telepathy-glib/exportable-channel.c
index 56e885c..d247091 100644
--- a/telepathy-glib/exportable-channel.c
+++ b/telepathy-glib/exportable-channel.c
@@ -114,37 +114,3 @@ tp_exportable_channel_get_type (void)
 
   return type;
 }
-
-GHashTable *
-tp_dbus_properties_mixin_make_properties_hash (
-    GObject *object,
-    const gchar *first_interface,
-    const gchar *first_property,
-    ...)
-{
-  va_list ap;
-  GHashTable *table;
-  const gchar *interface, *property;
-
-  table = g_hash_table_new_full (g_str_hash, g_str_equal, g_free,
-      (GDestroyNotify) tp_g_value_slice_free);
-
-  va_start (ap, first_property);
-
-  for (interface = first_interface, property = first_property;
-       interface != NULL;
-       interface = va_arg (ap, gchar *), property = va_arg (ap, gchar *))
-    {
-      GValue *value = g_slice_new0 (GValue);
-
-      tp_dbus_properties_mixin_get (object, interface, property,
-            value, NULL);
-      /* Fetching our immutable properties had better not fail... */
-      g_assert (G_IS_VALUE (value));
-
-      g_hash_table_insert (table,
-          g_strdup_printf ("%s.%s", interface, property), value);
-    }
-
-  return table;
-}
diff --git a/telepathy-glib/exportable-channel.h b/telepathy-glib/exportable-channel.h
index b09142e..978813e 100644
--- a/telepathy-glib/exportable-channel.h
+++ b/telepathy-glib/exportable-channel.h
@@ -52,10 +52,6 @@ struct _TpExportableChannelIface {
 
 GType tp_exportable_channel_get_type (void);
 
-GHashTable *tp_dbus_properties_mixin_make_properties_hash (
-    GObject *object, const gchar *first_interface,
-    const gchar *first_property, ...) G_GNUC_NULL_TERMINATED;
-
 G_END_DECLS
 
 #endif
-- 
1.5.6.5




More information about the Telepathy-commits mailing list