$qdbusxml2cpp -v -c CustomIf -p customif.h:customif.cpp org.item.custom.xml
org.item.custom.xml
<node>
<interface name="org.pace.custom">
<method name="Send_Custom_Msg">
<arg name="msg" type="a(ii)" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="Message"/>
</method>
<signal name="LateEvent">
<arg name="eventkind" type="s" direction="out"/>
</signal>
</interface>
</node>
How to add the header - message.h in the generated adaptor customif.h? I don't want to add manually into it as #include "message.h", but actually want the qdbusxml2cpp to add the inclusion.
Use the following option:
-i <filename> Add #include to the output
So, this would be the corresponding command:
qdbusxml2cpp -v -i message.h -c CustomIf -p customif.h:customif.cpp org.item.custom.xml