summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2014-04-17 14:46:02 +0100
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2014-04-17 14:46:02 +0100
commit2a30222d9683db4cd45e617e87f6eb6dfb5eb122 (patch)
tree0f3ca9d491b29489cc99b3b22dafa5536db4e233
parent19817f5ad3220d7c9dc584c10c405e5a39ef6273 (diff)
Stop putting TpDBusPropertiesMixinClass in class structsgdbus-object
We could have included <telepathy-glib/telepathy-glib-dbus.h> instead, but this seems nicer.
-rw-r--r--src/mcd-dispatcher.c24
-rw-r--r--src/mcd-dispatcher.h1
-rw-r--r--src/request.c16
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 *