<div dir="ltr"><p style="margin:5px 0px 10px;padding:0px 0px 10px;font-family:'Open Sans',sans-serif;font-size:12.727272033691406px;word-wrap:break-word;color:rgb(54,53,52);line-height:15.363636016845703px">Hi, I’m using <span class="" style="margin:0px;padding:0px">DBUS</span> declaring my methods in the xml files and then I use qdbusxml2cpp to generate my .h and .cpp files. I can use the native types (like “s”, “i”, “b”) pretty well but I need to use a custom type.<br style="margin:0px;padding:0px">
I know I have to add the annotation to the xml file but I can’t figure out how to specify my type.</p><p style="margin:5px 0px 10px;padding:0px 0px 10px;font-family:'Open Sans',sans-serif;font-size:12.727272033691406px;word-wrap:break-word;color:rgb(54,53,52);line-height:15.363636016845703px">
Let’s say this is my class:<br style="margin:0px;padding:0px"></p><div class="" style="margin:0px;padding:0px;font-family:'Open Sans',sans-serif;color:rgb(54,53,52);font-size:12.727272033691406px;line-height:15.363636016845703px">
<span class="" style="line-height:14px;font-size:12.727272033691406px;margin:0px;padding:0px;color:rgb(210,0,32);font-weight:bold">typedef</span><span style="color:rgb(0,0,0);line-height:14px;font-size:12.727272033691406px"> </span><span class="" style="line-height:14px;font-size:12.727272033691406px;margin:0px;padding:0px;color:rgb(210,0,32);font-weight:bold">enum</span><span class="" style="line-height:14px;font-size:12.727272033691406px;margin:0px;padding:0px">{</span><span style="color:rgb(0,0,0);line-height:14px;font-size:12.727272033691406px">...</span><span class="" style="line-height:14px;font-size:12.727272033691406px;margin:0px;padding:0px">}</span><span style="color:rgb(0,0,0);line-height:14px;font-size:12.727272033691406px"> </span><span style="color:rgb(0,0,0);line-height:14px;font-size:12.727272033691406px">TestAttribute</span><br>
<span class="" style="line-height:14px;font-size:12.727272033691406px;margin:0px;padding:0px;color:rgb(210,0,32);font-weight:bold">class</span><span style="color:rgb(0,0,0);line-height:14px;font-size:12.727272033691406px"> </span><span style="color:rgb(0,0,0);line-height:14px;font-size:12.727272033691406px">Test</span><br>
<span style="line-height:14px;font-size:12.727272033691406px">{</span><br><span class="" style="line-height:14px;font-size:12.727272033691406px;margin:0px;padding:0px;color:rgb(210,0,32);font-weight:bold">public</span><span class="" style="line-height:14px;font-size:12.727272033691406px;margin:0px;padding:0px">:</span><br>
<span style="color:rgb(0,0,0);line-height:14px;font-size:12.727272033691406px"> </span><span style="color:rgb(0,0,0);line-height:14px;font-size:12.727272033691406px"> </span><span class="" style="line-height:14px;font-size:12.727272033691406px;margin:0px;padding:0px;color:green">//const, deconst, operators...</span><br>
<span style="color:rgb(0,0,0);line-height:14px;font-size:12.727272033691406px"> </span><br><span class="" style="line-height:14px;font-size:12.727272033691406px;margin:0px;padding:0px;color:rgb(210,0,32);font-weight:bold">private</span><span class="" style="line-height:14px;font-size:12.727272033691406px;margin:0px;padding:0px">:</span><br>
<span style="color:rgb(0,0,0);line-height:14px;font-size:12.727272033691406px"> TestAttribute enumerator</span><span class="" style="line-height:14px;font-size:12.727272033691406px;margin:0px;padding:0px">;</span><br><span style="line-height:14px;font-size:12.727272033691406px">}</span><br>
</div><p style="margin:5px 0px 10px;padding:0px 0px 10px;font-family:'Open Sans',sans-serif;font-size:12.727272033691406px;word-wrap:break-word;color:rgb(54,53,52);line-height:15.363636016845703px"></p><p style="margin:5px 0px 10px;padding:0px 0px 10px;font-family:'Open Sans',sans-serif;font-size:12.727272033691406px;word-wrap:break-word;color:rgb(54,53,52);line-height:15.363636016845703px">
How can I pass this kind of object as argument of a method in the xml?</p><p style="margin:5px 0px 10px;padding:0px 0px 10px;font-family:'Open Sans',sans-serif;font-size:12.727272033691406px;word-wrap:break-word;color:rgb(54,53,52);line-height:15.363636016845703px">
Thanks a lot guys!</p></div>