[next] telepathy-gabble: tube-dbus: 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: 08e2e111e1315ad94c0dbdc4eeadb8c49752c226
URL:    http://cgit.freedesktop.org/telepathy/telepathy-gabble/commit/?id=08e2e111e1315ad94c0dbdc4eeadb8c49752c226

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

tube-dbus: use the 'invisible' TpDBusPropertiesMixin API

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

---

 src/tube-dbus.c |   26 ++++++++++----------------
 src/tube-dbus.h |    1 -
 2 files changed, 10 insertions(+), 17 deletions(-)

diff --git a/src/tube-dbus.c b/src/tube-dbus.c
index e54cfcd..134d2c1 100644
--- a/src/tube-dbus.c
+++ b/src/tube-dbus.c
@@ -855,19 +855,6 @@ gabble_tube_dbus_class_init (GabbleTubeDBusClass *gabble_tube_dbus_class)
       { "State", "state", NULL },
       { NULL }
   };
-  static TpDBusPropertiesMixinIfaceImpl prop_interfaces[] = {
-      { TP_IFACE_CHANNEL_TYPE_DBUS_TUBE1,
-        tp_dbus_properties_mixin_getter_gobject_properties,
-        NULL,
-        dbus_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_dbus_class);
   TpBaseChannelClass *base_class = TP_BASE_CHANNEL_CLASS (gabble_tube_dbus_class);
   GParamSpec *param_spec;
@@ -991,9 +978,16 @@ gabble_tube_dbus_class_init (GabbleTubeDBusClass *gabble_tube_dbus_class)
                   g_cclosure_marshal_VOID__VOID,
                   G_TYPE_NONE, 0);
 
-  gabble_tube_dbus_class->dbus_props_class.interfaces = prop_interfaces;
-  tp_dbus_properties_mixin_class_init (object_class,
-      G_STRUCT_OFFSET (GabbleTubeDBusClass, 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_DBUS_TUBE1,
+      tp_dbus_properties_mixin_getter_gobject_properties, NULL,
+      dbus_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-dbus.h b/src/tube-dbus.h
index 1a4afb1..3c77a30 100644
--- a/src/tube-dbus.h
+++ b/src/tube-dbus.h
@@ -39,7 +39,6 @@ typedef struct _GabbleTubeDBusPrivate GabbleTubeDBusPrivate;
 struct _GabbleTubeDBusClass {
   TpBaseChannelClass parent_class;
 
-  TpDBusPropertiesMixinClass dbus_props_class;
   TpGroupMixinClass group_class;
 };
 



More information about the telepathy-commits mailing list