Re: a new transport for dbus in libgio



On 09/24/2013 07:40 AM, Przemyslaw Kedzierski wrote:

Hello

Currently we work on an experimental feature for libgio,
we try to adapt it to use kdbus.
We consider some concepts, one of it is adding a new transport
for dbus.
There are three interesting files in glib/gio subdirectory:
gsocket.c, gsocketclient.c, gsocketconnection.c.
There is implemented transport over sockets.
Our idea is to make a separate transport, based on gsocket.c (cloning
it).

Cloning the source file is a bad idea. If it's not possible to implement
it all inside GSocket (or if it would add a ton of kdbus-specific
stuff), then it should be done as a subclass of GSocket.

Put there ioctl's to communicate with kdbus, and
also make out version of objectc from gsocketclient.c and
gsocketconnection.c, especially of type GIOStream.

You don't want to do anything with GSocketClient; that's just a helper
for creating TCP connections.

Depending on exactly what you need (I'm not really familiar with kdbus),
it might be that GSocketConnection isn't a good match, and so making a
new "GKdbusConnection" or something might make sense. There is also a
bug open about adding control message support to the existing
GSocketConnection (https://bugzilla.gnome.org/show_bug.cgi?id=618556,
although the source code link from there is long-dead).

-- Dan



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]