<div dir="ltr"><br><br><div class="gmail_quote">2008/9/26 Havoc Pennington <span dir="ltr"><<a href="mailto:hp@pobox.com">hp@pobox.com</a>></span><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>
<div class="Ih2E3d"><br>
On Fri, Sep 26, 2008 at 12:43 AM, jim harvey <<a href="mailto:jimharvy@gmail.com">jimharvy@gmail.com</a>> wrote:<br>
> concerning the sending of a message from another thread - i think a more<br>
> elegant solution would be to use an internal function like:<br>
><br>
> send_msg(conn,msg)<br>
> {<br>
> dbus_connection_send(conn,msg,0);<br>
> my_wakeup_mainloop();<br>
> }<br>
<br>
</div>That makes every module and library in an application process be aware<br>
of this send_msg() and use it instead of dbus_connection_send()<br>
<br>
Also, some API like dbus_bus_add_match() calls send() for you, as<br>
Thiago mentions<br><div class="Ih2E3d"></div></blockquote><div><br>yes you're right on that point.<br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d"><br>
</div>Look, it just is not correct to ask whether you "must" implement the<br>
dispatch functions, given some specific combination of details of what<br>
API you're using right now and how dbus works right now. The API<br>
contract is that you must implement them. If you want to rely on the<br>
specifics for right now, then you have to read all the source of<br>
libdbus and your app and figure out what pertains right now. I have no<br>
idea. But, it's easier and more robust and correct to just follow the<br>
API contract.<font color="#888888"><br>
</font></blockquote></div><br>Is there a document specifying this API contract? i gather from your comment that to be on the safe side<br>i should implement both callbacks and wake the mainloop on both.<br><br>Regards,<br>
Jim<br><br></div>