Hi,<br><div class="gmail_quote"><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi,<br>
I can send a struct through a signal with the help of some members of<br>
the list, now i have another question, how can i get this struct when<br>
reveice get this signal?</blockquote><div><br>-- Well its a bit complicated with the low level apis, I mean you need to attach a iterator with the message, and then recurse through the arguments to get the value.i.e if in the message you have a struct of string and int as s(su) then i will be like:<br>
dbus_message_iter_init(message, &iter);<br> dbus_message_iter_recurse(&iter, &iter1); /* To go inside the struct */<br> while (dbus_message_iter_get_arg_type(&iter1) != DBUS_TYPE_INVALID) {<br> dbus_message_iter_get_basic(iter, &value);<br>
dbus_message_iter_next(iter);<br>}<br><br>-- Hope this will give you some idea..<br><br>-Br<br>Naveen<br><br><br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
<br>
Brenno<br>
<br>
Em Qua, 2009-02-18 ŕs 19:21 -0500, Havoc Pennington escreveu:<br>
> Hi,<br>
><br>
> On Wed, Feb 18, 2009 at 1:08 PM, Brenno Freire <<a href="mailto:brenno.freire@fucapi.br">brenno.freire@fucapi.br</a>> wrote:<br>
> > Got the following error. " arguments to dbus_message_iter_append_basic()<br>
> > were incorrect, assertion "dbus_type_is_basic (type)" failed in file<br>
> > dbus-message.c line 2241.<br>
> > This is normally a bug in some application using the D-Bus library.<br>
> > D-Bus not built with -rdynamic so unable to print a backtrace<br>
> > "<br>
> > You could guide me?<br>
><br>
> There is a bug in your application which is that DBUS_TYPE_STRUCT is<br>
> not dbus_type_is_basic().<br>
> The documentation for dbus_message_iter_append_basic() should explain.<br>
> You need to use dbus_message_iter_open_container() to open the struct<br>
> then append each struct field individually.<br>
><br>
> Havoc<br>
><br>
> !DSPAM:499ca621106241690948120!<br>
><br>
><br>
<br>
_______________________________________________<br>
dbus mailing list<br>
<a href="mailto:dbus@lists.freedesktop.org">dbus@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/dbus" target="_blank">http://lists.freedesktop.org/mailman/listinfo/dbus</a><br>
</blockquote></div><br>