While using the qdbusxml2cpp program to convert the following xml to a Qt Class, I am getting this error:
qdbusxml2cpp -c ObjectManager -a ObjectManager:ObjectManager.cpp xml/object_manager.xml
Got unknown type `a{oa{sa{sv}}}'
You should add <annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="<type>"/> to the XML description
D-Feet description:
XML:
<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node><interface name="org.freedesktop.DBus.Introspectable"><method name="Introspect"><arg name="xml" type="s" direction="out"/>
</method></interface><interface name="org.freedesktop.DBus.ObjectManager"><method name="GetManagedObjects"><arg name="objects" type="a{oa{sa{sv}}}" direction="out"/>
</method><signal name="InterfacesAdded"><arg name="object" type="o"/>
<arg name="interfaces" type="a{sa{sv}}"/>
</signal>
<signal name="InterfacesRemoved"><arg name="object" type="o"/>
<arg name="interfaces" type="as"/>
</signal>
</interface><node name="org"/></node>
From this website ( http://techbase.kde.org/Development/Tutorials/D-Bus/CustomTypes ) I understand that I need to add an annotation to the XML for the tool to work properly.
Here is what I have so far:
a{oa{sa{sv}}}
https://alteeve.ca/w/List_of_DBus_data_types
o == A UTF-8 string whose value is a valid DBus object path.
array { object_path array { string array { string variant } } }
<arg name="customdata" type="a{sv}" direction="in" />
QVariantMap in the arguments (type "a{sv}")
QMap<QString, QVariant>
However, I'm not sure what the annotation should be for a{oa{sa{sv}}}, can someone please help me understand? Thanks!