diff options
-rw-r--r-- | src/salut-tubes-channel.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/salut-tubes-channel.c b/src/salut-tubes-channel.c index 7efeaa39..dfbf41f6 100644 --- a/src/salut-tubes-channel.c +++ b/src/salut-tubes-channel.c @@ -1598,12 +1598,41 @@ salut_tubes_channel_get_available_stream_tube_types ( DBusGMethodInvocation *context) { GHashTable *ret; + GArray *unix_tab, *ipv4_tab, *ipv6_tab; + TpSocketAccessControl access; ret = g_hash_table_new (g_direct_hash, g_direct_equal); + /* Socket_Address_Type_Unix */ + unix_tab = g_array_sized_new (FALSE, FALSE, sizeof (TpSocketAccessControl), + 1); + access = TP_SOCKET_ACCESS_CONTROL_LOCALHOST; + g_array_append_val (unix_tab, access); + g_hash_table_insert (ret, GUINT_TO_POINTER (TP_SOCKET_ADDRESS_TYPE_UNIX), + unix_tab); + + /* Socket_Address_Type_IPv4 */ + ipv4_tab = g_array_sized_new (FALSE, FALSE, sizeof (TpSocketAccessControl), + 1); + access = TP_SOCKET_ACCESS_CONTROL_LOCALHOST; + g_array_append_val (ipv4_tab, access); + g_hash_table_insert (ret, GUINT_TO_POINTER (TP_SOCKET_ADDRESS_TYPE_IPV4), + ipv4_tab); + + /* Socket_Address_Type_IPv6 */ + ipv6_tab = g_array_sized_new (FALSE, FALSE, sizeof (TpSocketAccessControl), + 1); + access = TP_SOCKET_ACCESS_CONTROL_LOCALHOST; + g_array_append_val (ipv6_tab, access); + g_hash_table_insert (ret, GUINT_TO_POINTER (TP_SOCKET_ADDRESS_TYPE_IPV6), + ipv6_tab); + tp_svc_channel_type_tubes_return_from_get_available_stream_tube_types ( context, ret); + g_array_free (unix_tab, TRUE); + g_array_free (ipv4_tab, TRUE); + g_array_free (ipv6_tab, TRUE); g_hash_table_destroy (ret); } |