diff options
author | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2013-01-04 16:26:04 +0000 |
---|---|---|
committer | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2013-01-04 16:26:04 +0000 |
commit | 58aefe4ef8d5d1194725f340e353de853b21bef6 (patch) | |
tree | 50f6ecba34d68a7cbd0a6ca3f0a729ef7d35b91a /src/tube-dbus.c | |
parent | c9779d896a77f96f8aa582113984ba722ff65eb0 (diff) | |
download | telepathy-salut-58aefe4ef8d5d1194725f340e353de853b21bef6.tar.gz |
Don't use sealed struct members
This exposes a bug in the tests: several tests assumed that tubes'
Interfaces would always come out in the same order, but the new APIs
we're using break that assumption. Fix that too.
Diffstat (limited to 'src/tube-dbus.c')
-rw-r--r-- | src/tube-dbus.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/src/tube-dbus.c b/src/tube-dbus.c index cc1763d5..0c2f0577 100644 --- a/src/tube-dbus.c +++ b/src/tube-dbus.c @@ -63,11 +63,6 @@ G_DEFINE_TYPE_WITH_CODE (SalutTubeDBus, salut_tube_dbus, TP_TYPE_BASE_CHANNEL, G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CHANNEL_INTERFACE_TUBE, NULL)) -static const gchar *salut_tube_dbus_interfaces[] = { - TP_IFACE_CHANNEL_INTERFACE_TUBE, - NULL -}; - static const gchar * const salut_tube_dbus_channel_allowed_properties[] = { TP_IFACE_CHANNEL ".TargetHandle", TP_IFACE_CHANNEL ".TargetID", @@ -875,6 +870,16 @@ salut_tube_dbus_close_dbus (TpBaseChannel *base) do_close ((SalutTubeDBus *) base); } +static GPtrArray * +salut_tube_dbus_get_interfaces (TpBaseChannel *chan) +{ + GPtrArray *interfaces = TP_BASE_CHANNEL_CLASS (salut_tube_dbus_parent_class) + ->get_interfaces (chan); + + g_ptr_array_add (interfaces, TP_IFACE_CHANNEL_INTERFACE_TUBE); + return interfaces; +} + static void salut_tube_dbus_class_init (SalutTubeDBusClass *salut_tube_dbus_class) { @@ -911,7 +916,7 @@ salut_tube_dbus_class_init (SalutTubeDBusClass *salut_tube_dbus_class) object_class->constructor = salut_tube_dbus_constructor; base_class->channel_type = TP_IFACE_CHANNEL_TYPE_DBUS_TUBE; - base_class->interfaces = salut_tube_dbus_interfaces; + base_class->get_interfaces = salut_tube_dbus_get_interfaces; base_class->target_handle_type = TP_HANDLE_TYPE_CONTACT; base_class->close = salut_tube_dbus_close_dbus; base_class->fill_immutable_properties = |