[Patch] Moving FD passing into the header

Thiago Macieira thiago at kde.org
Wed Jun 16 10:14:25 PDT 2010

Em Quarta-feira 16 Junho 2010, às 16:29:36, Marcel Holtmann escreveu:
> > So you what you're saying is that file descriptors aren't arguments to
> > the callback functions.
> > 
> > I'm not sure I like this approach. Transmarshalling will become just a
> > lot more complex.
> > 
> > I prefer Lennart's approach.
> I have to agree here. Why are we trying to treat file descriptors
> differently? I don't see the point in here. I like having them part of
> the signature and part of the introspection.

With this patch, we effectively make file descriptors "out of band data", which 
is what they are in Unix sockets.

But more importantly, it would also make it very difficult for me to have return 
values as file descriptors.

Right now, you make calls like so:

	QDBusPendingReply<ReturnType> reply = interface.asyncCall("something");

which you can currently shorten to (if you know it can never fail):

	ReturnType reply = interface.asyncCall("something");

To support file descriptors with this patch, it would be necessary to modify 
the QDBusPendingReply in a way it wasn't meant to. I'd much rather simply add 
a type that matches the signature, thus allowing for:

	QDBusUnixFileDescriptor fd = interface.asyncCall("something");

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/20100616/9321eb67/attachment.pgp>

More information about the dbus mailing list