[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freedesktop-dbus
Subject:    
From:       renato fringuello <rfringuello () gmail ! com>
Date:       2014-06-04 7:36:07
Message-ID: CAH2Z9sAee7XM0QbpdsZ9CYwnNSbPUTN09sPwS-_DXBJ2doF80Q () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Hi, I'm using DBUS 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.
I know I have to add the annotation to the xml file but I can't figure out
how to specify my type.

Let's say this is my class:
typedef enum{...} TestAttribute
class Test
{
public:
  //const, deconst, operators...

private:
    TestAttribute enumerator;
}

How can I pass this kind of object as argument of a method in the xml?

Thanks a lot guys!

[Attachment #5 (text/html)]

<div dir="ltr"><p style="margin:5px 0px 10px;padding:0px 0px \
10px;font-family:&#39;Open \
Sans&#39;,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:&#39;Open \
Sans&#39;,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:&#39;Open \
Sans&#39;,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:&#39;Open \
Sans&#39;,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:&#39;Open \
Sans&#39;,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:&#39;Open \
Sans&#39;,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>



_______________________________________________
dbus mailing list
dbus@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dbus


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic