libdbus port on QNX

Simon McVittie smcv at collabora.com
Mon Jan 8 12:15:45 UTC 2018


On Mon, 08 Jan 2018 at 11:35:30 +0530, Nitin Jain wrote:
> It seems previously it was ported for 1.7 version on QNX  already  . With
> latest version also is QNX support available . 

We haven't deliberately broken libdbus on QNX, but we don't test there
either. If you are using it on an uncommon platform, it's up to you to
test and verify it, and open bugs/send patches where appropriate.

The closest thing we have to an official portability policy is:
https://lists.freedesktop.org/archives/dbus/2013-October/015825.html

You should use the current stable branch (currently 1.12.x), unless
you require (or are doing) new feature development, in which case you
should use git master, the development branch (currently 1.13.x).

> As per my understanding, libdbus provide low level API and can be used
> directly  by application for ipc .

Yes, although I don't recommend it. Here's what the documentation says:

    This manual documents the *low-level* D-Bus C API. **If you use this
    low-level API directly, you're signing up for some pain.**

> Also it provides high level bindings like
> glib  which can be used and is better way . 

Not exactly. There are several closely related concepts:

D-Bus is an IPC protocol. It's normally used by having several
applications (referred to as *clients* and *services*) connect to a
central server (the *bus daemon* or *message bus* - in the jargon used
in some other IPC systems like CORBA, this would be called the *broker*).

dbus (a software package) is the reference implementation of D-Bus (the
protocol).

dbus-daemon is part of dbus. It is a daemon (background service program),
and is the reference implementation of the bus daemon/message bus. There
are others, but dbus-daemon is the most popular and is our recommendation.

libdbus is also part of dbus. It is a library implementing the
D-Bus protocol, and is used by dbus-daemon. It can also be used by
applications, but we don't recommend that, because it's low-level
and has some weird design choices.

GDBus is part of GLib (specifically, part of the GIO library). It's a
higher-level reimplementation of the D-Bus protocol, which can be used
by applications as an easier alternative to libdbus. In particular,
GDBus has a better and more reliable design if your application is
multi-threaded.

I would recommend making GLib work on QNX (perhaps it already does,
I don't know), then using the GDBus APIs in your applications,
communicating via the reference dbus-daemon from dbus.

When you say "high level bindings" you might be thinking of dbus-glib,
which is an older GLib-based library. It's a higher-level wrapper
(binding) around libdbus, not a reimplementation of the protocol like
GDBus. dbus-glib has severe design flaws which cannot be corrected without
breaking compatibility, so you should not use it. It's also not safe for
use in multi-threaded applications. Please use the GDBus APIs instead.

    smcv


More information about the dbus mailing list