[next] telepathy-gabble: tube-stream: use the 'invisible' TpDBusPropertiesMixin API

Guillaume Desmottes gdesmott at kemper.freedesktop.org
Fri May 16 06:29:08 PDT 2014


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

Author: Guillaume Desmottes <guillaume.desmottes at collabora.co.uk>
Date:   Fri May 16 14:41:54 2014 +0200

tube-stream: use the 'invisible' TpDBusPropertiesMixin API

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

---

 src/tube-stream.c |   26 ++++++++++----------------
 src/tube-stream.h |    2 --
 2 files changed, 10 insertions(+), 18 deletions(-)

diff --git a/src/tube-stream.c b/src/tube-stream.c
index 590eb03..176f554 100644
--- a/src/tube-stream.c
+++ b/src/tube-stream.c
@@ -1425,19 +1425,6 @@ gabble_tube_stream_class_init (GabbleTubeStreamClass *gabble_tube_stream_class)
       { "State", "state", NULL },
       { NULL }
   };
-  static TpDBusPropertiesMixinIfaceImpl prop_interfaces[] = {
-      { TP_IFACE_CHANNEL_TYPE_STREAM_TUBE1,
-        tp_dbus_properties_mixin_getter_gobject_properties,
-        NULL,
-        stream_tube_props,
-      },
-      { TP_IFACE_CHANNEL_INTERFACE_TUBE1,
-        tp_dbus_properties_mixin_getter_gobject_properties,
-        NULL,
-        tube_iface_props,
-      },
-      { NULL }
-  };
   GObjectClass *object_class = G_OBJECT_CLASS (gabble_tube_stream_class);
   TpBaseChannelClass *base_class = TP_BASE_CHANNEL_CLASS (gabble_tube_stream_class);
   GParamSpec *param_spec;
@@ -1566,9 +1553,16 @@ gabble_tube_stream_class_init (GabbleTubeStreamClass *gabble_tube_stream_class)
                   g_cclosure_marshal_VOID__VOID,
                   G_TYPE_NONE, 0);
 
-  gabble_tube_stream_class->dbus_props_class.interfaces = prop_interfaces;
-  tp_dbus_properties_mixin_class_init (object_class,
-      G_STRUCT_OFFSET (GabbleTubeStreamClass, dbus_props_class));
+  tp_dbus_properties_mixin_class_init (object_class, 0);
+
+  tp_dbus_properties_mixin_implement_interface (object_class,
+      TP_IFACE_QUARK_CHANNEL_TYPE_STREAM_TUBE1,
+      tp_dbus_properties_mixin_getter_gobject_properties, NULL,
+      stream_tube_props);
+  tp_dbus_properties_mixin_implement_interface (object_class,
+      TP_IFACE_QUARK_CHANNEL_INTERFACE_TUBE1,
+      tp_dbus_properties_mixin_getter_gobject_properties, NULL,
+      tube_iface_props);
 
   tp_external_group_mixin_init_dbus_properties (object_class);
 }
diff --git a/src/tube-stream.h b/src/tube-stream.h
index 7ccb35c..ac36e3c 100644
--- a/src/tube-stream.h
+++ b/src/tube-stream.h
@@ -37,8 +37,6 @@ typedef struct _GabbleTubeStreamClass GabbleTubeStreamClass;
 
 struct _GabbleTubeStreamClass {
   TpBaseChannelClass parent_class;
-
-  TpDBusPropertiesMixinClass dbus_props_class;
 };
 
 struct _GabbleTubeStream {



More information about the telepathy-commits mailing list