[next] telepathy-gabble: muc-channel: 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: 3b2200c034cf4817e6de789fb80dda5228ebf7e8
URL:    http://cgit.freedesktop.org/telepathy/telepathy-gabble/commit/?id=3b2200c034cf4817e6de789fb80dda5228ebf7e8

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

muc-channel: use the 'invisible' TpDBusPropertiesMixin API

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

---

 src/muc-channel.c |   36 ++++++++++++++----------------------
 src/muc-channel.h |    1 -
 2 files changed, 14 insertions(+), 23 deletions(-)

diff --git a/src/muc-channel.c b/src/muc-channel.c
index d3b961d..a252a69 100644
--- a/src/muc-channel.c
+++ b/src/muc-channel.c
@@ -1069,25 +1069,6 @@ gabble_muc_channel_class_init (GabbleMucChannelClass *gabble_muc_channel_class)
       { NULL }
   };
 
-  static TpDBusPropertiesMixinIfaceImpl prop_interfaces[] = {
-    { TP_IFACE_CHANNEL_INTERFACE_CONFERENCE1,
-      tp_dbus_properties_mixin_getter_gobject_properties,
-      NULL,
-      conference_props,
-    },
-    { TP_IFACE_CHANNEL_INTERFACE_ROOM1,
-      tp_dbus_properties_mixin_getter_gobject_properties,
-      NULL,
-      room_props,
-    },
-    { TP_IFACE_CHANNEL_INTERFACE_SUBJECT1,
-      tp_dbus_properties_mixin_getter_gobject_properties,
-      NULL,
-      subject_props,
-    },
-    { NULL }
-  };
-
   GObjectClass *object_class = G_OBJECT_CLASS (gabble_muc_channel_class);
   TpBaseChannelClass *base_class = TP_BASE_CHANNEL_CLASS (object_class);
   GParamSpec *param_spec;
@@ -1286,9 +1267,20 @@ gabble_muc_channel_class_init (GabbleMucChannelClass *gabble_muc_channel_class)
                   G_TYPE_POINTER);
 #endif
 
-  gabble_muc_channel_class->dbus_props_class.interfaces = prop_interfaces;
-  tp_dbus_properties_mixin_class_init (object_class,
-      G_STRUCT_OFFSET (GabbleMucChannelClass, dbus_props_class));
+  tp_dbus_properties_mixin_class_init (object_class, 0);
+
+  tp_dbus_properties_mixin_implement_interface (object_class,
+      TP_IFACE_QUARK_CHANNEL_INTERFACE_CONFERENCE1,
+      tp_dbus_properties_mixin_getter_gobject_properties, NULL,
+      conference_props);
+  tp_dbus_properties_mixin_implement_interface (object_class,
+      TP_IFACE_QUARK_CHANNEL_INTERFACE_ROOM1,
+      tp_dbus_properties_mixin_getter_gobject_properties, NULL,
+      room_props);
+  tp_dbus_properties_mixin_implement_interface (object_class,
+      TP_IFACE_QUARK_CHANNEL_INTERFACE_SUBJECT1,
+      tp_dbus_properties_mixin_getter_gobject_properties, NULL,
+      subject_props);
 
   tp_message_mixin_init_dbus_properties (object_class);
   tp_base_room_config_register_class (base_class);
diff --git a/src/muc-channel.h b/src/muc-channel.h
index 0661b8e..d367b00 100644
--- a/src/muc-channel.h
+++ b/src/muc-channel.h
@@ -52,7 +52,6 @@ struct _GabbleMucChannelClass {
     TpBaseChannelClass parent_class;
 
     TpGroupMixinClass group_class;
-    TpDBusPropertiesMixinClass dbus_props_class;
 };
 
 struct _GabbleMucChannel {



More information about the telepathy-commits mailing list