<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">
<html><body>
<p>Hi friends:</p>
<p>I'm using dbus-c++-1 to communicate two apps, so, I invoke a method that returns an ::DBus::Struct like </p>
<p>::DBus::Struct< ::DBus::Struct< int32_t, std::string, double, int32_t, int32_t, bool >, int32_t, std::string, std::string, std::string, std::string, double > </p>
<p>until here all is ok, the problem is when I'm trying to access his members. The normal struct member access is using the (.) or (->) operator like</p>
<p>struct Person {</p>
<p>string name;</p>
<p>int age;</p>
<p>};</p>
<p>Person me;</p>
<p>me.name = "Peter";</p>
<p>me.age = 28;</p>
<p> </p>
<p>but in the dbus struct case, the members do not have any name, so, I use this <span id="result_box" class="short_text"><span class="hps">technique</span></span></p>
<p><span class="short_text"><span class="hps">::DBus::Struct< ::DBus::Struct< int32_t, std::string, double, int32_t, int32_t, bool >, int32_t, std::string, std::string, std::string, std::string, double > returnData = <br />            { {12, string("TM3"), 5.00, 1, 1, false}, 13, string("Peter"), string("Florin"), string("Selles"), string("develop"), 200.00 };<br />            <br />            ::DBus::Struct< int32_t, std::string, double, int32_t, int32_t, bool > * innerStruct = (::DBus::Struct< int32_t, std::string, double, int32_t, int32_t, bool > *)&returnData;<br />            <br />            /*Service * service = new Service;<br />            service->id = ((int *) innerStruct)[0];<br />            service->Name = ((string *) innerStruct)[1];<br />            service->Rate = ((double *) innerStruct)[2];<br />            service->CollectUnit = ((int *) innerStruct)[3];<br />            service->ServiceType = ((int *) innerStruct)[4];<br />            service->FreeOfCharge = ((bool *) innerStruct)[5];</span></span></p>
<p><span class="short_text"><span class="hps"> </span></span></p>
<p><span class="short_text"><span class="hps">but I get some error accessing the data, some one can tell me a different way to accomplish this, or a wait to declare dbus struct whit member names.<br /></span></span></p>
<p> </p>
<div>-- <br />
<p><img src="data:image/gif;base64,R0lGODlh2gIgALMAAPLz9Q9JtZaWloSl2sbHx7a3t9fY2KWnp7HE58rY71OBzP39/enp6efn5/////7+/iH/C1hNUCBEYXRhWE1QP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Gpg4JoiSITmBf0OSLriBMfg3MamCI8lJfaOBk2N7rSgVmdMgGFJ1sNgt4/IML9Uqp5As1+IlcOErhdJgPLX/KtcCLUi5lGnxKM+iF1apLVTZlEqpLDdVlbIyKFLplEypKGRJU73ylbKgUmHCep+HUbUSJqnnDXJJK633eqo3JaO3l2nll5GCKcAxQ7kHhLloLkWJi60IlENpVGHxLY0Zmf0gUf6He9gVIVgXhD35D2XCETxZXT0YJMCxmRFBmrboZEW1IJkJmq4IbSOCWNtkmGSxms+QIa0phJd5VNekIEpVHJl0ELEndaaJGEQyXYoZIocpmZxDe7HJafHHe1GXm8xGi4s5EvDgIK3ZLi8zmta5I7tXmjsYi1n3maRJnqdgc+A5nFUmnI1Bm+v5FQbCg+pJXZk0muapEbyJnAKBeZ236RiL8RC2KZ2uiZsB0Rf+EZ3UGZr6SZS3yCBCGZ7z+RsdlQkUWqEWeqEYmqEauqEc2qEe+qEgGqIfOnJhcAImeqIomqIquqIs2qIu+qIwGqMyOqM0WqM2eqM4mqM6uqM82qM++qNAGqRCOqREWqRGeqRIqqMNEAEAOw==" alt="" /></p>
</div>

<br> ________________________________________________________________
 XII Edicion del Evento Nacional de Informatica para Jovenes. INFOCLUB.
 Septiembre. 2014. Ver www.jovenclub.cu
 ________________________________________________________________


<br><br />-- 
<br />Este mensaje ha sido analizado por 
<a href="http://www.mailscanner.info/"><b>MailScanner</b></a>
<br />en busca de virus y otros contenidos peligrosos,
<br />y se considera que está limpio.
</body></html>