diff options
author | Xavier Claessens <xavier.claessens@collabora.co.uk> | 2012-01-20 16:55:57 +0100 |
---|---|---|
committer | Xavier Claessens <xavier.claessens@collabora.co.uk> | 2012-01-20 16:55:57 +0100 |
commit | 10f3e01c93ef23a638b934d81fee5015b44be768 (patch) | |
tree | af8c0fd30036a2c69e36bce1d64af13040ef08f8 /telepathy-glib/base-password-channel.c | |
parent | 74bd9452523bef1280a708eb31f08b91971bdb1e (diff) | |
download | telepathy-glib-10f3e01c93ef23a638b934d81fee5015b44be768.tar.gz |
TpBasePasswordChannel: Use TpBaseChannel:get_interfaces() virtual method
Diffstat (limited to 'telepathy-glib/base-password-channel.c')
-rw-r--r-- | telepathy-glib/base-password-channel.c | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/telepathy-glib/base-password-channel.c b/telepathy-glib/base-password-channel.c index 583d40329..825b807d6 100644 --- a/telepathy-glib/base-password-channel.c +++ b/telepathy-glib/base-password-channel.c @@ -74,11 +74,6 @@ G_DEFINE_TYPE_WITH_CODE (TpBasePasswordChannel, tp_base_password_channel, G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CHANNEL_INTERFACE_SASL_AUTHENTICATION, sasl_auth_iface_init)); -static const gchar *tp_base_password_channel_interfaces[] = { - TP_IFACE_CHANNEL_INTERFACE_SASL_AUTHENTICATION, - NULL -}; - static const gchar *tp_base_password_channel_available_mechanisms[] = { "X-TELEPATHY-PASSWORD", NULL @@ -128,6 +123,19 @@ struct _TpBasePasswordChannelPrivate gboolean may_save_response; }; +static GPtrArray * +tp_base_password_channel_get_interfaces (TpBaseChannel *base) +{ + GPtrArray *interfaces; + + interfaces = TP_BASE_CHANNEL_CLASS ( + tp_base_password_channel_parent_class)->get_interfaces (base); + + g_ptr_array_add (interfaces, TP_IFACE_CHANNEL_INTERFACE_SASL_AUTHENTICATION); + + return interfaces; +} + static void tp_base_password_channel_init (TpBasePasswordChannel *self) { @@ -283,7 +291,7 @@ tp_base_password_channel_class_init (TpBasePasswordChannelClass *tp_base_passwor chan_class->channel_type = TP_IFACE_CHANNEL_TYPE_SERVER_AUTHENTICATION; chan_class->target_handle_type = TP_HANDLE_TYPE_NONE; - chan_class->interfaces = tp_base_password_channel_interfaces; + chan_class->get_interfaces = tp_base_password_channel_get_interfaces; chan_class->close = tp_base_password_channel_close; chan_class->fill_immutable_properties = tp_base_password_channel_fill_immutable_properties; |