GDBus: Add support for D-Bus type 'h' (ie. G_VARIANT_TYPE_HANDLE)
authorDavid Zeuthen <davidz@redhat.com>
Tue, 20 Jul 2010 15:38:23 +0000 (11:38 -0400)
committerDavid Zeuthen <davidz@redhat.com>
Tue, 20 Jul 2010 15:38:23 +0000 (11:38 -0400)
commit2be167f57c2b59d427aa54e2204bfaa906391b3e
tree38febcba171dca3443125e2823191a82df7b4f6d
parent66388120d23a2fcec345874cc1a6259c08a6ef38
GDBus: Add support for D-Bus type 'h' (ie. G_VARIANT_TYPE_HANDLE)

This allows sending and receiving D-Bus messages with instances of the
'h' D-Bus type. Unlike libdbus-1's dbus_message_iter_get_basic()
method, g_variant_get_handle() does not return a duplicated unix file
descriptor (that must be closed with close(2)) - instead, it returns
an index that can be used to get/dup the file descriptor from a
GUnixFDList object that can be obtained from the GDBusMessage object.

Signed-off-by: David Zeuthen <davidz@redhat.com>
gio/gdbusmessage.c
gio/tests/gdbus-serialization.c