[maemo-developers] [maemo-developers] Re: [maemo-users] Using osso_iap_cb example

From: Brad Burleson bradb667 at gmail.com
Date: Tue Aug 1 09:34:01 EEST 2006
On 7/31/06, Kalle Valo <Kalle.Valo at nokia.com> wrote:
> Alvis Koon writes:
> > If you don't run into gtk_main() or some event handling loop, you
> > won't be able to process events (callbacks), isn't it?
> You are correct. libosso-ic needs D-BUS dispatcher to work. For
> example, one can use dbus_connection_setup_with_g_main() with GLib
> main loop.

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.

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)?

For now, I've simply written a custom daemon that monitors "status_changed"
messages and executes the desired script.

While I think that a custom daemon is the wrong solution to this problem it
may be useful -

How about diaperd?  (Dbus IAP Execute Uh..... something...

Despite the bad humor, it may be useful to finish.


PS And sorry for misdirecting this to users - the danger of auto completion
and inattention.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maemo.org/pipermail/maemo-developers/attachments/20060731/ef4b4718/attachment.htm 
More information about the maemo-developers mailing list