summaryrefslogtreecommitdiff
path: root/src/salut-tubes-channel.c
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2007-10-15 14:56:07 +0000
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2007-10-15 14:56:07 +0000
commit6404a27e9686954698c8ee4311323b58499d2467 (patch)
tree10b7f669e929a8fe981d44e861ec6025e0807379 /src/salut-tubes-channel.c
parent48c2cc4c9d53174875a72279b42ff57c9e2604b4 (diff)
tubes-channel: add unix and inet sockets in GetAvailableStreamTubeTypes result
Diffstat (limited to 'src/salut-tubes-channel.c')
-rw-r--r--src/salut-tubes-channel.c29
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);
}