dbus_message_demarshal() and partial messages

Avery Pennarun apenwarr at gmail.com
Tue Aug 14 15:35:28 PDT 2007


On 14/08/07, Thiago Macieira <thiago at kde.org> wrote:
> Avery Pennarun wrote:
> >What's the recommended way to do this?
>
> Don't use the D-Bus protocol per se, but prefix the message with its
> length.
>
> That is, you're transporting D-Bus messages, but you're not using the
> D-Bus protocol. You cannot talk to a D-Bus bus.

I thought of that option, however, I can see value in staying 100% the
same as the DBus protocol.  For example, I can make the SSL part
optional and when it's disabled, use standard DBus tools/library to
debug my code.

It seems odd that the dbus library provides almost, but not quite,
enough API for me to implement the DBus protocol using its DBusMessage
implementation.

After more digging around, I've found
_dbus_header_have_message_untrusted().  A slight variation on this
function (a normal program has no need for most of the information it
returns) would be great to add to the api.

With something like that available, we unlock the real usefulness of
dbus_message_demarshal().

Have fun,

Avery


More information about the dbus mailing list