dbus unmarshalling

Lucas De Marchi lucas.demarchi at profusion.mobi
Wed Aug 17 06:12:34 PDT 2011


Hi Gahcep,

On Mon, Aug 8, 2011 at 3:39 AM, gahcep man <promdev at gmail.com> wrote:
> Hi everybody.
>
> All last week i tried to work with bluez dbus api. Everything is clear for
> me now except the question about unmarshaling complex structures in dbus
> messages. For example, method "GetProperties" from "org.bluez.Adapter"
> interface returns array of dictionary records of string and variant. So, i
> have three complex situations: 1 is array, 2 is dictionary record, 3 is
> variant. And i cannot handle with this.
> Can you tell me what kind of strategies or algorithms or libraries should i
> use to completely parse this values.

You can use this api:
http://dbus.freedesktop.org/doc/api/html/group__DBusMessage.html

> Maybe glib? or others? Is the only decision to use a python?

If you need an example, look at the EFL wrapper (function
_e_bluez_element_get_properties_callback()):

http://trac.enlightenment.org/e/browser/trunk/e_dbus/src/lib/bluez/e_bluez_element.c


regards,
Lucas De Marchi


More information about the dbus mailing list