[next] telepathy-glib: tp_dbus_properties_mixin_dup_all: make public

Simon McVittie smcv at kemper.freedesktop.org
Fri Sep 13 08:43:47 PDT 2013


Module: telepathy-glib
Branch: next
Commit: a3911d1f57449d3b1d5d7eec5a663b7a99cc5755
URL:    http://cgit.freedesktop.org/telepathy/telepathy-glib/commit/?id=a3911d1f57449d3b1d5d7eec5a663b7a99cc5755

Author: Simon McVittie <simon.mcvittie at collabora.co.uk>
Date:   Thu Sep 12 18:49:28 2013 +0100

tp_dbus_properties_mixin_dup_all: make public

There's no real reason not to - anything that implements D-Bus
properties is clearly going to have this method in some form.
Also, my next commit needs it.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=69283

---

 docs/reference/telepathy-glib-sections.txt      |    1 +
 telepathy-glib/dbus-properties-mixin-internal.h |    3 ---
 telepathy-glib/dbus-properties-mixin.c          |    9 +++++----
 telepathy-glib/dbus-properties-mixin.h          |    4 ++++
 tests/dbus/Makefile.am                          |    7 -------
 tests/lib/simple-conn.c                         |   13 ++-----------
 6 files changed, 12 insertions(+), 25 deletions(-)

diff --git a/docs/reference/telepathy-glib-sections.txt b/docs/reference/telepathy-glib-sections.txt
index 1bce978..293d113 100644
--- a/docs/reference/telepathy-glib-sections.txt
+++ b/docs/reference/telepathy-glib-sections.txt
@@ -1962,6 +1962,7 @@ tp_dbus_properties_mixin_class_init
 tp_dbus_properties_mixin_implement_interface
 tp_dbus_properties_mixin_iface_init
 tp_dbus_properties_mixin_get
+tp_dbus_properties_mixin_dup_all
 tp_dbus_properties_mixin_set
 tp_dbus_properties_mixin_fill_properties_hash
 tp_dbus_properties_mixin_make_properties_hash
diff --git a/telepathy-glib/dbus-properties-mixin-internal.h b/telepathy-glib/dbus-properties-mixin-internal.h
index da512aa..2c9fab1 100644
--- a/telepathy-glib/dbus-properties-mixin-internal.h
+++ b/telepathy-glib/dbus-properties-mixin-internal.h
@@ -26,9 +26,6 @@
 
 G_BEGIN_DECLS
 
-GHashTable *_tp_dbus_properties_mixin_get_all (GObject *self,
-    const gchar *interface_name);
-
 #define TP_SVC_INTERFACE_DBUS_PROPERTIES_MIXIN_QUARK_NAME \
   "tp_svc_interface_get_dbus_properties_info"
 
diff --git a/telepathy-glib/dbus-properties-mixin.c b/telepathy-glib/dbus-properties-mixin.c
index dee1940..d36a392 100644
--- a/telepathy-glib/dbus-properties-mixin.c
+++ b/telepathy-glib/dbus-properties-mixin.c
@@ -1095,8 +1095,8 @@ _tp_dbus_properties_mixin_get (TpSvcDBusProperties *iface,
     }
 }
 
-/*
- * _tp_dbus_properties_mixin_get_all:
+/**
+ * tp_dbus_properties_mixin_dup_all:
  * @self: an object with this mixin
  * @interface_name: a D-Bus interface name
  *
@@ -1106,9 +1106,10 @@ _tp_dbus_properties_mixin_get (TpSvcDBusProperties *iface,
  *
  * Returns: (transfer container) (element-type utf8 GObject.Value): a map
  *  from property name (without the interface name) to value
+ * Since: 0.UNRELEASED
  */
 GHashTable *
-_tp_dbus_properties_mixin_get_all (GObject *self,
+tp_dbus_properties_mixin_dup_all (GObject *self,
     const gchar *interface_name)
 {
   TpDBusPropertiesMixinIfaceImpl *iface_impl;
@@ -1150,7 +1151,7 @@ _tp_dbus_properties_mixin_get_all_dbus (TpSvcDBusProperties *iface,
     const gchar *interface_name,
     DBusGMethodInvocation *context)
 {
-  GHashTable *values = _tp_dbus_properties_mixin_get_all (G_OBJECT (iface),
+  GHashTable *values = tp_dbus_properties_mixin_dup_all (G_OBJECT (iface),
       interface_name);
 
   tp_svc_dbus_properties_return_from_get_all (context, values);
diff --git a/telepathy-glib/dbus-properties-mixin.h b/telepathy-glib/dbus-properties-mixin.h
index 72460e6..eee986d 100644
--- a/telepathy-glib/dbus-properties-mixin.h
+++ b/telepathy-glib/dbus-properties-mixin.h
@@ -138,6 +138,10 @@ gboolean tp_dbus_properties_mixin_set (
     const GValue *value,
     GError **error);
 
+_TP_AVAILABLE_IN_UNRELEASED
+GHashTable *tp_dbus_properties_mixin_dup_all (GObject *self,
+    const gchar *interface_name);
+
 GHashTable *tp_dbus_properties_mixin_make_properties_hash (
     GObject *object, const gchar *first_interface,
     const gchar *first_property, ...)
diff --git a/tests/dbus/Makefile.am b/tests/dbus/Makefile.am
index 677d6bb..9bcbc9f 100644
--- a/tests/dbus/Makefile.am
+++ b/tests/dbus/Makefile.am
@@ -218,13 +218,6 @@ test_protocol_objects_LDADD = \
 test_protocol_objects_SOURCES = protocol-objects.c
 
 test_self_handle_SOURCES = self-handle.c
-test_self_handle_LDADD = \
-    $(top_builddir)/tests/lib/libtp-glib-tests-internal.la \
-    $(top_builddir)/telepathy-glib/libtelepathy-glib-main-internal.la \
-    $(top_builddir)/telepathy-glib/libtelepathy-glib-1-dbus.la \
-    $(top_builddir)/telepathy-glib/libtelepathy-glib-1-core.la \
-    $(GLIB_LIBS) \
-    $(NULL)
 
 test_self_presence_SOURCES = self-presence.c
 
diff --git a/tests/lib/simple-conn.c b/tests/lib/simple-conn.c
index 3d0d87c..6b172b1 100644
--- a/tests/lib/simple-conn.c
+++ b/tests/lib/simple-conn.c
@@ -18,6 +18,7 @@
 #include <dbus/dbus-glib.h>
 
 #include <telepathy-glib/dbus.h>
+#include <telepathy-glib/dbus-properties-mixin.h>
 #include <telepathy-glib/errors.h>
 #include <telepathy-glib/gtypes.h>
 #include <telepathy-glib/handle-repo-dynamic.h>
@@ -26,10 +27,6 @@
 #include <telepathy-glib/svc-generic.h>
 #include <telepathy-glib/util.h>
 
-#ifdef TP_GLIB_TESTS_INTERNAL
-# include "telepathy-glib/dbus-properties-mixin-internal.h"
-#endif
-
 #include "echo-chan.h"
 #include "room-list-chan.h"
 #include "util.h"
@@ -442,13 +439,12 @@ tp_tests_simple_connection_ensure_room_list_chan (TpTestsSimpleConnection *self,
   return chan_path;
 }
 
-#ifdef TP_GLIB_TESTS_INTERNAL
 static void
 get_all (TpSvcDBusProperties *iface,
     const gchar *interface_name,
     DBusGMethodInvocation *context)
 {
-  GHashTable *values = _tp_dbus_properties_mixin_get_all (G_OBJECT (iface),
+  GHashTable *values = tp_dbus_properties_mixin_dup_all (G_OBJECT (iface),
       interface_name);
 
   tp_svc_dbus_properties_return_from_get_all (context, values);
@@ -456,17 +452,12 @@ get_all (TpSvcDBusProperties *iface,
   g_signal_emit (iface, signals[SIGNAL_GOT_ALL],
       g_quark_from_string (interface_name));
 }
-#endif /* TP_GLIB_TESTS_INTERNAL */
 
 static void
 props_iface_init (TpSvcDBusPropertiesClass *iface)
 {
-#ifdef TP_GLIB_TESTS_INTERNAL
-
 #define IMPLEMENT(x) \
   tp_svc_dbus_properties_implement_##x (iface, x)
   IMPLEMENT (get_all);
 #undef IMPLEMENT
-
-#endif /* TP_GLIB_TESTS_INTERNAL */
 }



More information about the telepathy-commits mailing list