integrate with my own mainloop
David Zeuthen
david at fubar.dk
Fri Sep 30 07:15:07 PDT 2005
On Thu, 2005-09-29 at 15:49 -0700, Tom Flynn wrote:
> hi there,
>
> As a start, I'd like to take something like lshal.c and integrate it
> with my own mainloop that I already have (not use glib's main loop).
> Is there an example somewhere like that? Is there simply a function I
> can call from my mainloop that'll perform all the necessary
> hal/dbus-related stuff. I've tried calling dbus_connection_dispatch()
> in my mainloop, but either that isn't the call i'm looking for or
> there's other calls I need to make.
Just make sure the DBusConnection* object that you pass to the function
libhal_ctx_set_dbus_connection() is already integrated into the
mainloop. If you're using a glib style mainloop use
dbus_connection_setup_with_g_main(), if you're using Qt use that
convenience function.
If you write your own mainloop libdbus has hooks for you to integrate
it. For example dhcdbd does this.
HTH,
David
More information about the hal
mailing list