moving file descriptor passing into a header
Thiago Macieira
thiago at kde.org
Tue Apr 13 14:50:09 PDT 2010
Em Terça-feira 13. Abril 2010, às 23.27.25, Colin Walters escreveu:
> We were discussing some DBus related stuff at this GSettings hackfest,
> and related to the GVariant/GBus work, we were thinking it'd be good
> to take the file descriptor bits out of the type system, and move them
> into a message header. This makes things significantly saner for
> GVariant and anyone else reimplementing the protocol.
>
> The API would be something like:
>
> int dbus_message_get_unix_file_descriptor (DBusMessage *message, int
> index); int dbus_message_append_unix_file_descriptor (DBusMessage
> *message, int fd);
How would this work?
The data payload would contain the indices, right? So when you are
demarshalling from the stream, you get ints that are the indices. Then you'd
call the header API to get the actual FD?
And when marshalling, you'd insert into the header, then you'd marshall the
index?
I'm sorry, but how is this indirection any better than the current code? By
adding this indirection, it also means that file descriptors are no longer
basic types -- you need to take extra action to copy the type from one message
to another (i.e., "trans-marshalling").
--
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
Senior Product Manager - Nokia, Qt Development Frameworks
PGP/GPG: 0x6EF45358; fingerprint:
E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freedesktop.org/archives/dbus/attachments/20100413/4292e774/attachment.pgp>
More information about the dbus
mailing list