[next] telepathy-glib: simple-account: use the 'invisible' TpDBusPropertiesMixin API

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


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

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

simple-account: use the 'invisible' TpDBusPropertiesMixin API

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

---

 tests/lib/simple-account.c |   42 +++++++++++++-----------------------------
 tests/lib/simple-account.h |    1 -
 2 files changed, 13 insertions(+), 30 deletions(-)

diff --git a/tests/lib/simple-account.c b/tests/lib/simple-account.c
index c56cec6..25f5a00 100644
--- a/tests/lib/simple-account.c
+++ b/tests/lib/simple-account.c
@@ -386,32 +386,6 @@ tp_tests_simple_account_class_init (TpTestsSimpleAccountClass *klass)
         { NULL },
   };
 
-  static TpDBusPropertiesMixinIfaceImpl prop_interfaces[] = {
-        { TP_IFACE_ACCOUNT,
-          tp_dbus_properties_mixin_getter_gobject_properties,
-          NULL,
-          a_props
-        },
-        {
-          TP_IFACE_ACCOUNT_INTERFACE_STORAGE1,
-          tp_dbus_properties_mixin_getter_gobject_properties,
-          NULL,
-          ais_props
-        },
-        {
-          TP_IFACE_ACCOUNT_INTERFACE_ADDRESSING1,
-          tp_dbus_properties_mixin_getter_gobject_properties,
-          NULL,
-          aia_props
-        },
-        { TP_IFACE_ACCOUNT_INTERFACE_AVATAR1,
-          tp_dbus_properties_mixin_getter_gobject_properties,
-          NULL,
-          avatar_props
-        },
-        { NULL },
-  };
-
   g_type_class_add_private (klass, sizeof (TpTestsSimpleAccountPrivate));
   object_class->get_property = tp_tests_simple_account_get_property;
   object_class->set_property = tp_tests_simple_account_set_property;
@@ -583,9 +557,19 @@ tp_tests_simple_account_class_init (TpTestsSimpleAccountClass *klass)
   g_object_class_install_property (object_class,
       PROP_SUPERSEDES, param_spec);
 
-  klass->dbus_props_class.interfaces = prop_interfaces;
-  tp_dbus_properties_mixin_class_init (object_class,
-      G_STRUCT_OFFSET (TpTestsSimpleAccountClass, dbus_props_class));
+  tp_dbus_properties_mixin_class_init (object_class, 0);
+  tp_dbus_properties_mixin_implement_interface (object_class,
+        TP_IFACE_QUARK_ACCOUNT,
+        tp_dbus_properties_mixin_getter_gobject_properties, NULL, a_props);
+  tp_dbus_properties_mixin_implement_interface (object_class,
+        TP_IFACE_QUARK_ACCOUNT_INTERFACE_STORAGE1,
+        tp_dbus_properties_mixin_getter_gobject_properties, NULL, ais_props);
+  tp_dbus_properties_mixin_implement_interface (object_class,
+        TP_IFACE_QUARK_ACCOUNT_INTERFACE_ADDRESSING1,
+        tp_dbus_properties_mixin_getter_gobject_properties, NULL, aia_props);
+  tp_dbus_properties_mixin_implement_interface (object_class,
+        TP_IFACE_QUARK_ACCOUNT_INTERFACE_AVATAR1,
+        tp_dbus_properties_mixin_getter_gobject_properties, NULL, avatar_props);
 }
 
 void
diff --git a/tests/lib/simple-account.h b/tests/lib/simple-account.h
index a7fdcf2..557a110 100644
--- a/tests/lib/simple-account.h
+++ b/tests/lib/simple-account.h
@@ -24,7 +24,6 @@ typedef struct _TpTestsSimpleAccountPrivate TpTestsSimpleAccountPrivate;
 
 struct _TpTestsSimpleAccountClass {
     GObjectClass parent_class;
-    TpDBusPropertiesMixinClass dbus_props_class;
 };
 
 struct _TpTestsSimpleAccount {



More information about the telepathy-commits mailing list