From 2a30222d9683db4cd45e617e87f6eb6dfb5eb122 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Thu, 17 Apr 2014 14:46:02 +0100 Subject: Stop putting TpDBusPropertiesMixinClass in class structs We could have included instead, but this seems nicer. --- src/mcd-dispatcher.c | 24 ++++++++---------------- src/mcd-dispatcher.h | 1 - src/request.c | 16 ++++------------ 3 files changed, 12 insertions(+), 29 deletions(-) diff --git a/src/mcd-dispatcher.c b/src/mcd-dispatcher.c index 8aa377cd..bd26e0eb 100644 --- a/src/mcd-dispatcher.c +++ b/src/mcd-dispatcher.c @@ -819,19 +819,6 @@ mcd_dispatcher_class_init (McdDispatcherClass * klass) { "DispatchOperations", "dispatch-operations", NULL }, { NULL } }; - static TpDBusPropertiesMixinIfaceImpl prop_interfaces[] = { - { TP_IFACE_CHANNEL_DISPATCHER, - tp_dbus_properties_mixin_getter_gobject_properties, - NULL, - cd_props, - }, - { TP_IFACE_CHANNEL_DISPATCHER_INTERFACE_OPERATION_LIST1, - tp_dbus_properties_mixin_getter_gobject_properties, - NULL, - op_list_props, - }, - { NULL } - }; GObjectClass *object_class = G_OBJECT_CLASS (klass); g_type_class_add_private (object_class, sizeof (McdDispatcherPrivate)); @@ -868,9 +855,14 @@ mcd_dispatcher_class_init (McdDispatcherClass * klass) TP_ARRAY_TYPE_DISPATCH_OPERATION_DETAILS_LIST, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); - klass->dbus_properties_class.interfaces = prop_interfaces, - tp_dbus_properties_mixin_class_init (object_class, - G_STRUCT_OFFSET (McdDispatcherClass, dbus_properties_class)); + tp_dbus_properties_mixin_class_init (object_class, 0); + tp_dbus_properties_mixin_implement_interface (object_class, + TP_IFACE_QUARK_CHANNEL_DISPATCHER, + tp_dbus_properties_mixin_getter_gobject_properties, NULL, cd_props); + tp_dbus_properties_mixin_implement_interface (object_class, + TP_IFACE_QUARK_CHANNEL_DISPATCHER_INTERFACE_OPERATION_LIST1, + tp_dbus_properties_mixin_getter_gobject_properties, NULL, + op_list_props); } static void diff --git a/src/mcd-dispatcher.h b/src/mcd-dispatcher.h index fcb33c92..3f04b0d3 100644 --- a/src/mcd-dispatcher.h +++ b/src/mcd-dispatcher.h @@ -57,7 +57,6 @@ struct _McdDispatcher struct _McdDispatcherClass { GObjectClass parent_class; - TpDBusPropertiesMixinClass dbus_properties_class; }; GType mcd_dispatcher_get_type (void); diff --git a/src/request.c b/src/request.c index 6a10404b..ce91b1f3 100644 --- a/src/request.c +++ b/src/request.c @@ -92,7 +92,6 @@ struct _McdRequest { struct _McdRequestClass { GObjectClass parent; - TpDBusPropertiesMixinClass dbus_properties_class; }; static void request_iface_init (TpSvcChannelRequestClass *); @@ -324,14 +323,6 @@ _mcd_request_class_init ( { "Hints", "hints", NULL }, { NULL } }; - static TpDBusPropertiesMixinIfaceImpl prop_interfaces[] = { - { TP_IFACE_CHANNEL_REQUEST, - tp_dbus_properties_mixin_getter_gobject_properties, - NULL, - request_props, - }, - { NULL } - }; GObjectClass *object_class = (GObjectClass *) cls; object_class->constructed = _mcd_request_constructed; @@ -408,9 +399,10 @@ _mcd_request_class_init ( G_OBJECT_CLASS_TYPE (cls), G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); - cls->dbus_properties_class.interfaces = prop_interfaces, - tp_dbus_properties_mixin_class_init (object_class, - G_STRUCT_OFFSET (McdRequestClass, dbus_properties_class)); + tp_dbus_properties_mixin_class_init (object_class, 0); + tp_dbus_properties_mixin_implement_interface (object_class, + TP_IFACE_QUARK_CHANNEL_REQUEST, + tp_dbus_properties_mixin_getter_gobject_properties, NULL, request_props); } McdRequest * -- cgit v1.2.3