<div><span class="gmail_quote">On 7/31/06, <b class="gmail_sendername">Kalle Valo</b> <<a href="mailto:Kalle.Valo@nokia.com">Kalle.Valo@nokia.com</a>> wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Alvis Koon writes:<br><br>> If you don't run into gtk_main() or some event handling loop, you<br>> won't be able to process events (callbacks), isn't it?
<br><br>You are correct. libosso-ic needs D-BUS dispatcher to work. For<br>example, one can use dbus_connection_setup_with_g_main() with GLib<br>main loop.</blockquote>
<div> </div>
<div>Ok, so I got my daemon to work just fine by calling gtk_main() (as well as using status_changed). Thanks to all for the help, you guys were spot on.</div>
<div> </div>
<div>My only problem is that gtk_main() transfers control away from my daemon. Is it possible to attach to the GLib main loop and return back to my own code from time to time (the project I'm working on has it's own internal scheduler and I'm not up for a big rewrite now)?
</div>
<div> </div>
<div>For now, I've simply written a custom daemon that monitors "status_changed" messages and executes the desired script. </div>
<div> </div>
<div>While I think that a custom daemon is the wrong solution to this problem it may be useful - </div>
<div> </div>
<div>How about diaperd? (Dbus IAP Execute Uh..... something...</div>
<div> </div>
<div>Despite the bad humor, it may be useful to finish. </div>
<div> </div>
<div>Brad.</div>
<div> </div>
<div>PS And sorry for misdirecting this to users - the danger of auto completion and inattention.</div></div>