[next] telepathy-glib: contacts-conn: 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: 76181e8ad3e8dae1b21f6bab37862fcf202d43b6
URL: http://cgit.freedesktop.org/telepathy/telepathy-glib/commit/?id=76181e8ad3e8dae1b21f6bab37862fcf202d43b6
Author: Guillaume Desmottes <guillaume.desmottes at collabora.co.uk>
Date: Fri May 16 13:59:43 2014 +0200
contacts-conn: use the 'invisible' TpDBusPropertiesMixin API
https://bugs.freedesktop.org/show_bug.cgi?id=78376
---
tests/lib/contacts-conn.c | 32 +++++++++++---------------------
tests/lib/contacts-conn.h | 2 --
2 files changed, 11 insertions(+), 23 deletions(-)
diff --git a/tests/lib/contacts-conn.c b/tests/lib/contacts-conn.c
index a418cb7..a835d37 100644
--- a/tests/lib/contacts-conn.c
+++ b/tests/lib/contacts-conn.c
@@ -532,24 +532,6 @@ tp_tests_contacts_connection_class_init (TpTestsContactsConnectionClass *klass)
{ "AliasFlags", GUINT_TO_POINTER (ALIASING_DP_ALIAS_FLAGS), NULL },
{ NULL }
};
- static TpDBusPropertiesMixinIfaceImpl prop_interfaces[] = {
- { TP_IFACE_CONNECTION_INTERFACE_AVATARS1,
- conn_avatars_properties_getter,
- NULL,
- conn_avatars_properties,
- },
- { TP_IFACE_CONNECTION_INTERFACE_CONTACT_INFO1,
- conn_contact_info_properties_getter,
- NULL,
- conn_contact_info_properties,
- },
- { TP_IFACE_CONNECTION_INTERFACE_ALIASING1,
- aliasing_get_dbus_property,
- NULL,
- aliasing_props,
- },
- { NULL }
- };
object_class->constructed = constructed;
object_class->dispose = dispose;
@@ -560,9 +542,17 @@ tp_tests_contacts_connection_class_init (TpTestsContactsConnectionClass *klass)
base_class->fill_contact_attributes =
tp_tests_contacts_connection_fill_contact_attributes;
- klass->properties_class.interfaces = prop_interfaces;
- tp_dbus_properties_mixin_class_init (object_class,
- G_STRUCT_OFFSET (TpTestsContactsConnectionClass, properties_class));
+ tp_dbus_properties_mixin_class_init (object_class, 0);
+ tp_dbus_properties_mixin_implement_interface (object_class,
+ TP_IFACE_QUARK_CONNECTION_INTERFACE_AVATARS1,
+ conn_avatars_properties_getter, NULL, conn_avatars_properties);
+ tp_dbus_properties_mixin_implement_interface (object_class,
+ TP_IFACE_QUARK_CONNECTION_INTERFACE_CONTACT_INFO1,
+ conn_contact_info_properties_getter, NULL,
+ conn_contact_info_properties);
+ tp_dbus_properties_mixin_implement_interface (object_class,
+ TP_IFACE_QUARK_CONNECTION_INTERFACE_ALIASING1,
+ aliasing_get_dbus_property, NULL, aliasing_props);
}
TpTestsContactListManager *
diff --git a/tests/lib/contacts-conn.h b/tests/lib/contacts-conn.h
index 2814055..7a4a7ca 100644
--- a/tests/lib/contacts-conn.h
+++ b/tests/lib/contacts-conn.h
@@ -27,8 +27,6 @@ typedef struct _TpTestsContactsConnectionPrivate TpTestsContactsConnectionPrivat
struct _TpTestsContactsConnectionClass {
TpTestsSimpleConnectionClass parent_class;
-
- TpDBusPropertiesMixinClass properties_class;
};
struct _TpTestsContactsConnection {
More information about the telepathy-commits
mailing list