[patch] generate marshallers and metadata from dbus-glib-tool

Colin Walters walters at verbum.org
Thu Nov 18 19:19:56 PST 2004

On Wed, 2004-11-10 at 01:22 -0500, Havoc Pennington wrote:

> Just seems simpler as a start. I suppose GObject
> introspection framework, whatever it is, will surely support 
> "const char* foo_get_name()" type of stuff though.


> >   On the other hand - DBusMessage already copies everything you
> > stick in to it (something I think we should not do as an option for byte
> > [] at least, but that's another issue).
> Two options:
>  - add _unswapped() variants to the getters, and then either 
>    message_get_byte_order() or message_has_native_byte_order()

Right, although you never need to swap a byte[] at least.
Would it be useful to get the unswapped version in general?

Maybe a less invasive approach would be a flag on the type, like:

dbus_message_get_args (message,

>  - always return by const reference; if you call a getter 
>    on a field/arg where byte order matters, and the message is in the 
>    wrong byte order, swap the *entire* message in place and then 
>    return the const ref. i.e. byteswap lazily.

That might work too, although it sounds a bit hard.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://freedesktop.org/pipermail/dbus/attachments/20041118/fe2a8ef8/attachment-0001.pgp

More information about the dbus mailing list