diff options
author | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2010-11-18 18:19:02 +0000 |
---|---|---|
committer | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2010-11-18 18:19:02 +0000 |
commit | 747c688cdd03a69f7d712e1eeeaaf756a0fb5c43 (patch) | |
tree | 6a017efc522d958e7dc4df802d5f3a022fcc455b | |
parent | 167d76996438e4e8e3eacf36577ec196354d592e (diff) |
Implement type_foreach_channel_class in both channel managers
This lets our Protocol objects advertise their requestable channel classes.
-rw-r--r-- | src/media-factory.c | 11 | ||||
-rw-r--r-- | src/text-factory.c | 9 |
2 files changed, 11 insertions, 9 deletions
diff --git a/src/media-factory.c b/src/media-factory.c index 689d773..f4573c5 100644 --- a/src/media-factory.c +++ b/src/media-factory.c @@ -451,15 +451,15 @@ static const gchar * const named_channel_allowed_properties[] = { NULL }; -/* not advertised in foreach_channel_class - can only be requested with +/* not advertised in type_foreach_channel_class - can only be requested with * RequestChannel, not with CreateChannel/EnsureChannel */ static const gchar * const anon_channel_allowed_properties[] = { NULL }; static void -tpsip_media_factory_foreach_channel_class (TpChannelManager *manager, - TpChannelManagerChannelClassFunc func, +tpsip_media_factory_type_foreach_channel_class (GType type, + TpChannelManagerTypeChannelClassFunc func, gpointer user_data) { GHashTable *table = g_hash_table_new_full (g_str_hash, g_str_equal, @@ -476,7 +476,7 @@ tpsip_media_factory_foreach_channel_class (TpChannelManager *manager, handle_type_value); g_value_set_uint (handle_type_value, TP_HANDLE_TYPE_CONTACT); - func (manager, table, named_channel_allowed_properties, user_data); + func (type, table, named_channel_allowed_properties, user_data); g_hash_table_destroy (table); } @@ -688,7 +688,8 @@ channel_manager_iface_init (gpointer g_iface, TpChannelManagerIface *iface = g_iface; iface->foreach_channel = tpsip_media_factory_foreach_channel; - iface->foreach_channel_class = tpsip_media_factory_foreach_channel_class; + iface->type_foreach_channel_class = + tpsip_media_factory_type_foreach_channel_class; iface->request_channel = tpsip_media_factory_request_channel; iface->create_channel = tpsip_media_factory_create_channel; iface->ensure_channel = tpsip_media_factory_ensure_channel; diff --git a/src/text-factory.c b/src/text-factory.c index 881891e..a9cb38c 100644 --- a/src/text-factory.c +++ b/src/text-factory.c @@ -328,8 +328,8 @@ static const gchar * const text_channel_allowed_properties[] = { }; static void -tpsip_text_factory_foreach_channel_class (TpChannelManager *manager, - TpChannelManagerChannelClassFunc func, +tpsip_text_factory_type_foreach_channel_class (GType type, + TpChannelManagerTypeChannelClassFunc func, gpointer user_data) { GHashTable *table = g_hash_table_new_full (g_str_hash, g_str_equal, @@ -346,7 +346,7 @@ tpsip_text_factory_foreach_channel_class (TpChannelManager *manager, g_hash_table_insert (table, (gchar *) text_channel_fixed_properties[1], value); - func (manager, table, text_channel_allowed_properties, user_data); + func (type, table, text_channel_allowed_properties, user_data); g_hash_table_destroy (table); } @@ -635,7 +635,8 @@ channel_manager_iface_init (gpointer g_iface, gpointer iface_data) TpChannelManagerIface *iface = g_iface; iface->foreach_channel = tpsip_text_factory_foreach_channel; - iface->foreach_channel_class = tpsip_text_factory_foreach_channel_class; + iface->type_foreach_channel_class = + tpsip_text_factory_type_foreach_channel_class; iface->create_channel = tpsip_text_factory_create_channel; iface->request_channel = tpsip_text_factory_request_channel; iface->ensure_channel = tpsip_text_factory_ensure_channel; |