Hiding internal DBUS use inside a library
Lennart Poettering
mzqohf at 0pointer.de
Mon Aug 29 14:54:01 PDT 2005
On Mon, 29.08.05 15:19, Colin Walters (walters at verbum.org) wrote:
>
> On Mon, 2005-08-29 at 21:14 +0200, Lennart Poettering wrote:
>
> > Yes, the DBUS API is intended to be stable. It's perfectly OK to use
> > it directly from any language. In fact the avahi distribution contains
> > some utilities using the python-dbus to access avahi stuff.
>
> Ok, cool...I'm wondering then why you need libavahi-client at all; why
> not just recommend using bindings appropriate for the application
> language like GLib, Python, Qt etc?
Three reasons:
1) libavahi-client is much simpler to use than the bare-bone DBUS API.
2) libavahi-client resembles the API of libavahi-core (our embeddable
mDNS stack), so it is very easy to port your applications between
the two APIs. (Basically most functions in libavahi-client have
the prefix avahi_client while libavahi-core uses avahi_server. The
set of functions is otherwise the same starting from the arguments
and not ending in the semantics.)
3) If people code against libavahi-client they can be sure that as
soons as avahi offers a non-DBUS-RPC they can use that with the
same interface. (Don't be alarmed, we won't remove the DBUS support
in avahi anytime soon, however, for embedded applictions it might
make sense to have an RPC-API that doesn't require DBUS.)
Lennart
--
Lennart Poettering; lennart [at] poettering [dot] de
ICQ# 11060553; GPG 0x1A015CC4; http://0pointer.de/lennart/
More information about the dbus
mailing list