On 23 November 2015 at 09:48, Michal Suchanek <[email protected]> wrote: > Hello, > > org.freedesktop.DBus.ObjectManager.GetManagedObjects (out > DICT<OBJPATH,DICT<STRING,DICT<STRING,VARIANT>>> > objpath_interfaces_and_properties) seems becoming a standard > interface. There is a push to abandon application-specific manager > interfaces in favour of this standard one. Documented here: > http://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces-objectmanager > > I tried to connect to a service that implements it and calling > eldbus_message_signature_get(msg)) in the return callback gives > a{oa{sa{sv}}}. > > Is there an example of parsing this? > > In particular I did not find something like > eldbus_message_iterate_array - that is a function that gives me the > current element without the need to craft the signature of the element > by hand as seems to be the case in eldbus_message_iter_get_and_next(). > Just passing the signature of the message without change into > eldbus_message_iter_get_and_next does not work. > > I can of course try to parse that a{oa{sa{sv}}} signature by hand in > my application but that's not what sane library interface should > require, right? > > I tried > arguments = eldbus_message_iter_get(msg); > eldbus_message_iter_get_and_next(arguments, > eldbus_message_iter_signature_get(arguments) + 1, &objects); > > but it complains that the type does not match with or without that + 1.
OK, that error message is just wrong. An example of parsing the ObjectManager data is here: https://gist.github.com/hramrach/606ae05725f49eeaabf3 > > Thanks > > Michal ------------------------------------------------------------------------------ Go from Idea to Many App Stores Faster with Intel(R) XDK Give your users amazing mobile app experiences with Intel(R) XDK. Use one codebase in this all-in-one HTML5 development environment. Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs. http://pubads.g.doubleclick.net/gampad/clk?id=254741551&iu=/4140 _______________________________________________ enlightenment-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
