Marshalling bytewise data with Glib bindings
Matt Hoosier
matt.hoosier at gmail.com
Mon May 21 06:11:17 PDT 2007
On 5/21/07, Thiago Macieira <thiago at kde.org> wrote:
> Matt Hoosier wrote:
> >Is there a suitable datatype to use as the contents of a GValue, which
> >the dbus-glib bindings will understand natively? Shoehorning this
> >stuff into GValue whose type is G_TYPE_STRING sounds bad; the first 0
> >byte will cause the bindings to think that the "string" is finished,
> >and UTF-8 enforcement will probably choke on this method anyway.
>
> ARRAY of BYTE should do it.
>
> STRING should be used only for properly-encoded UTF-8 data. NULs are
> allowed, but arbitrary binary data isn't.
Sorry; I should have been more clear. I'm attempting to send a
dictionary style data structure across D-Bus as an "a{sv}". What Glib
datatype stuck inside a GValue (e.g., a boxed GArray or similar) will
be automatically recognized as a legal instance of the "v" D-Bus type?
>
> --
> Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
> PGP/GPG: 0x6EF45358; fingerprint:
> E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358
>
>
More information about the dbus
mailing list