[patch] demarshalling messages

Dafydd Harries daf at rhydd.org
Mon Mar 26 14:07:34 PDT 2007


Ar 23/03/2007 am 09:03, ysgrifennodd Havoc Pennington:
> Hi,
> 
> Dafydd Harries wrote:
> >
> > - get the marshalled form of the DBusMessage so that I can encapsulate it 
> > for
> >   the network transport I'm using
> >
> > - take a marshalled message from a network transport I have and turn it 
> > into
> >   a DBusMessage object so that I can send it to my local clients
> >
> 
> OK, I think I see now. You want to be able to serialize DBusMessage so 
> you can put it over xmpp. As Thiago says, there is no API for that right 
> now.
> 
> The simplest approach would be a two-function API to convert a 
> DBusMessage to/from a byte array. The downside to this approach is that 
> you could not use DBusConnection, so might end up reinventing a lot of 
> that machinery - there is a lot of stuff in there, including e.g. some 
> default method handlers.

I've made a first cut of a patch that takes this approach. I'm not too
familiar with libdbus style, but I've tried to follow the code I've seen.

The naming I've used is dbus_message_{to,from}_raw.

-- 
Dafydd
-------------- next part --------------
A non-text attachment was scrubbed...
Name: libdbus-raw.diff
Type: text/x-diff
Size: 2557 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/dbus/attachments/20070326/248c1246/libdbus-raw.bin


More information about the dbus mailing list