DBUS Array & Dict
Hi Qt Community,
I try to implement the Freedesktop.org Notification Specifications as a small Qt library. It uses DBUS.
GetCapabilities, GetServerInformation etc works fine, but I've got some problems with the most important part, the notify:
I'm not able to create a DBUS Array and Dict. I've tried with QDBusArgument, but I don't understand how it works for more complex data types. Can somebody please give me an example of how to build an Array of String for QDBus and a Dict as described here: http://www.galago-project.org/specs/notification/0.9/x344.html
In case of Array of Strings, so DBus signature 'as ' Qt does all job for you. It is enough if you use QStringList as a type of your variable.
In case of most complex data like some structures with strings and integers etc. I think that you should define your own structure, create read/write operators for it, declare it as a new metatype and it should work.
Some documentation about it "QDBusArgument":http://doc.qt.digia.com/4.7-snapshot/qdbusargument.html
But you can also start from XML definition and then use code generation to genereate proxy client of your DBus methods. "Some documents":http://www.developer.nokia.com/Community/Wiki/QtDbus_quick_tutorial