[next] telepathy-glib: contactlist/conn: use the 'invisible' TpDBusPropertiesMixin API

Guillaume Desmottes gdesmott at kemper.freedesktop.org
Fri May 16 06:28:33 PDT 2014


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

Author: Guillaume Desmottes <guillaume.desmottes at collabora.co.uk>
Date:   Fri May 16 13:59:43 2014 +0200

contactlist/conn: use the 'invisible' TpDBusPropertiesMixin API

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

---

 examples/cm/contactlist/conn.c |   15 ++++-----------
 examples/cm/contactlist/conn.h |    1 -
 2 files changed, 4 insertions(+), 12 deletions(-)

diff --git a/examples/cm/contactlist/conn.c b/examples/cm/contactlist/conn.c
index 20db31f..d651c12 100644
--- a/examples/cm/contactlist/conn.c
+++ b/examples/cm/contactlist/conn.c
@@ -413,14 +413,6 @@ example_contact_list_connection_class_init (
     { "AliasFlags", GUINT_TO_POINTER (ALIASING_DP_ALIAS_FLAGS), NULL },
     { NULL }
   };
-  static TpDBusPropertiesMixinIfaceImpl prop_interfaces[] = {
-        { TP_IFACE_CONNECTION_INTERFACE_ALIASING1,
-          aliasing_get_dbus_property,
-          NULL,
-          aliasing_props,
-        },
-        { NULL }
-  };
 
   object_class->get_property = get_property;
   object_class->set_property = set_property;
@@ -449,9 +441,10 @@ example_contact_list_connection_class_init (
   g_object_class_install_property (object_class, PROP_SIMULATION_DELAY,
       param_spec);
 
-  klass->properties_mixin.interfaces = prop_interfaces;
-  tp_dbus_properties_mixin_class_init (object_class,
-      G_STRUCT_OFFSET (ExampleContactListConnectionClass, properties_mixin));
+  tp_dbus_properties_mixin_class_init (object_class, 0);
+  tp_dbus_properties_mixin_implement_interface (object_class,
+        TP_IFACE_QUARK_CONNECTION_INTERFACE_ALIASING1,
+        aliasing_get_dbus_property, NULL, aliasing_props);
 }
 
 static void
diff --git a/examples/cm/contactlist/conn.h b/examples/cm/contactlist/conn.h
index 69c2bba..c540c3c 100644
--- a/examples/cm/contactlist/conn.h
+++ b/examples/cm/contactlist/conn.h
@@ -26,7 +26,6 @@ typedef struct _ExampleContactListConnectionPrivate
 
 struct _ExampleContactListConnectionClass {
     TpBaseConnectionClass parent_class;
-    TpDBusPropertiesMixinClass properties_mixin;
 };
 
 struct _ExampleContactListConnection {



More information about the telepathy-commits mailing list