[next] telepathy-glib: test-dbus-properties: 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: 550e1ae943bc668c20f20db874a64d4ae32d74b4
URL: http://cgit.freedesktop.org/telepathy/telepathy-glib/commit/?id=550e1ae943bc668c20f20db874a64d4ae32d74b4
Author: Guillaume Desmottes <guillaume.desmottes at collabora.co.uk>
Date: Fri May 16 13:59:43 2014 +0200
test-dbus-properties: use the 'invisible' TpDBusPropertiesMixin API
https://bugs.freedesktop.org/show_bug.cgi?id=78376
---
tests/dbus/properties.c | 15 +++++----------
1 file changed, 5 insertions(+), 10 deletions(-)
diff --git a/tests/dbus/properties.c b/tests/dbus/properties.c
index bd09b5c..02a4ab3 100644
--- a/tests/dbus/properties.c
+++ b/tests/dbus/properties.c
@@ -26,7 +26,6 @@ typedef struct _TestProperties {
} TestProperties;
typedef struct _TestPropertiesClass {
GObjectClass parent;
- TpDBusPropertiesMixinClass props;
} TestPropertiesClass;
GType test_properties_get_type (void);
@@ -90,22 +89,18 @@ prop_setter (GObject *object,
static void
test_properties_class_init (TestPropertiesClass *cls)
{
+ GObjectClass *object_class = G_OBJECT_CLASS (cls);
static TpDBusPropertiesMixinPropImpl with_properties_props[] = {
{ "ReadOnly", "read", "READ" },
{ "ReadWrite", "full-access", "FULL ACCESS" },
{ "WriteOnly", "black-hole", "BLACK HOLE" },
{ NULL }
};
- static TpDBusPropertiesMixinIfaceImpl interfaces[] = {
- { WITH_PROPERTIES_IFACE, prop_getter, prop_setter,
- with_properties_props },
- { NULL }
- };
-
- cls->props.interfaces = interfaces;
- tp_dbus_properties_mixin_class_init (G_OBJECT_CLASS (cls),
- G_STRUCT_OFFSET (TestPropertiesClass, props));
+ tp_dbus_properties_mixin_class_init (object_class, 0);
+ tp_dbus_properties_mixin_implement_interface (object_class,
+ g_quark_from_static_string (WITH_PROPERTIES_IFACE),
+ prop_getter, prop_setter, with_properties_props);
}
static void
More information about the telepathy-commits
mailing list