[next] telepathy-gabble: ft-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: 8633a8f52ab74c61358e93df3eb4b126405fe282
URL:    http://cgit.freedesktop.org/telepathy/telepathy-gabble/commit/?id=8633a8f52ab74c61358e93df3eb4b126405fe282

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

ft-channel: use the 'invisible' TpDBusPropertiesMixin API

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

---

 src/ft-channel.c |   28 ++++++++++------------------
 src/ft-channel.h |    1 -
 2 files changed, 10 insertions(+), 19 deletions(-)

diff --git a/src/ft-channel.c b/src/ft-channel.c
index bf3b268..d03a7b6 100644
--- a/src/ft-channel.c
+++ b/src/ft-channel.c
@@ -583,20 +583,6 @@ gabble_file_transfer_channel_class_init (
     { NULL }
   };
 
-  static TpDBusPropertiesMixinIfaceImpl prop_interfaces[] = {
-    { TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER1,
-      tp_dbus_properties_mixin_getter_gobject_properties,
-      file_transfer_channel_properties_setter,
-      file_props
-    },
-    { TP_IFACE_CHANNEL_INTERFACE_FILE_TRANSFER_METADATA1,
-      tp_dbus_properties_mixin_getter_gobject_properties,
-      NULL,
-      file_metadata_props
-    },
-    { NULL }
-  };
-
   g_type_class_add_private (gabble_file_transfer_channel_class,
       sizeof (GabbleFileTransferChannelPrivate));
 
@@ -795,10 +781,16 @@ gabble_file_transfer_channel_class_init (
   g_object_class_install_property (object_class, PROP_METADATA,
       param_spec);
 
-  gabble_file_transfer_channel_class->dbus_props_class.interfaces =
-      prop_interfaces;
-  tp_dbus_properties_mixin_class_init (object_class,
-      G_STRUCT_OFFSET (GabbleFileTransferChannelClass, 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_FILE_TRANSFER1,
+      tp_dbus_properties_mixin_getter_gobject_properties,
+      file_transfer_channel_properties_setter, file_props);
+  tp_dbus_properties_mixin_implement_interface (object_class,
+      TP_IFACE_QUARK_CHANNEL_INTERFACE_FILE_TRANSFER_METADATA1,
+      tp_dbus_properties_mixin_getter_gobject_properties,
+      NULL, file_metadata_props);
 }
 
 void
diff --git a/src/ft-channel.h b/src/ft-channel.h
index 8794364..fb7434a 100644
--- a/src/ft-channel.h
+++ b/src/ft-channel.h
@@ -43,7 +43,6 @@ typedef struct _GabbleFileTransferChannelPrivate GabbleFileTransferChannelPrivat
 
 struct _GabbleFileTransferChannelClass {
     TpBaseChannelClass parent_class;
-    TpDBusPropertiesMixinClass dbus_props_class;
 };
 
 struct _GabbleFileTransferChannel {



More information about the telepathy-commits mailing list