Questions ad using GDBus instead of libdbus (Re: Fwd: Re: Race condition in send_with_reply_and_block()
zeuthen at gmail.com
Tue Jul 23 11:15:11 PDT 2013
On Tue, Jul 23, 2013 at 6:09 AM, rony <rony at wu.ac.at> wrote:
> Can GDBus be used without a message loop?
To the extent that you don't need callbacks, yes, GDBus works fine
without the application/process running a GMainLoop. For example,
g_dbus_connection_call_sync() will work but g_dbus_connection_call()
won't. Listening to D-Bus signals, exporting objects etc. only have
variants that requires callbacks so you can't do any of that
obviously. But, yes, just doing a method call works great - and it's
an often needed for feature for e.g. command-line tools and other
one-shot applications that don't use a message loop.
FWIW, this is the same with libdbus -
dbus_connection_send_with_reply_and_block() does not require mainloop
In fact, if you're curious, the ability to do this was a requirement
when I designed GDBus. IIRC it was also a requirement Havoc had when
he designed libdbus.
> What infrastructure is needed to be able to run GDBUs on AIX, Linux, MacOSX,
> Windows? Are there maybe stand-alone packages for installation on these
> systems (and for the Windows world, maybe precompiled binaries)?
> What do you expect GDBUs' lifetime will be (how long would it be developed,
The same as GLib.
I would talk to the people who use GTK+ (say, the Gimp developers) on
Win32/OSX for packaging / precompiled libs / binaries. For the
non-Linux Unices, things should just work.
More information about the dbus