dbus unmarshalling

gahcep man promdev at gmail.com
Sun Aug 7 23:39:28 PDT 2011


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.
Maybe glib? or others? Is the only decision to use a python?

P.S. I saw in dbus sources that unmarshalling structures is not supported
yet. So why?

This is what i need to receive from method "GetProperties": (D-Feet output)
{u'Address': u'00:15:83:41:3F:3F',
 u'Class': 5767424L,
 u'Devices': [],
 u'Discoverable': 0,
 u'DiscoverableTimeout': 0L,
 u'Discovering': 0,
 u'Name': u'gahcepvm-0',
 u'Pairable': 1,
 u'PairableTimeout': 0L,
 u'Powered': 1,
 u'UUIDs': [u'00001000-0000-1000-8000-
00805f9b34fb',
            u'00001001-0000-1000-8000-00805f9b34fb',
            u'00001112-0000-1000-8000-00805f9b34fb',
            u'0000111f-0000-1000-8000-00805f9b34fb',
            u'0000110a-0000-1000-8000-00805f9b34fb',
            u'0000110c-0000-1000-8000-00805f9b34fb',
            u'0000110e-0000-1000-8000-00805f9b34fb',
            u'00001105-0000-1000-8000-00805f9b34fb',
            u'00001106-0000-1000-8000-00805f9b34fb']}

P.S.S. Sorry for my English )
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/dbus/attachments/20110808/ed82305a/attachment.htm>


More information about the dbus mailing list