Using D-BUS with GLib and no dbus-daemon

James Kent James.Kent at palmsource.com
Wed Feb 15 11:05:13 PST 2006


This sounds good.  I think adding dbus_g_connection_open() seems like
the right way to go, since it would work in a similar way to
dbus_g_bus_get().

There's one other place where the glib bindings were not complete and I
had to dip into the dbus/dbus.h API.  I had to call dbus_server_listen
to create the DBusServer, like this:

 	dbusServer = dbus_server_listen("unix:path=/tmp/a1b2c3",
&error);
  	dbus_server_setup_with_g_main(dbusServer,
g_main_loop_get_context(mainloop)); 

I think it would be to combine these two steps into a single call,
something like this:

	DBusServer* dbus_server_new_with_g_main(const char *address,
GMainContext *  context, DBusError *error)

Jim

> -----Original Message-----
> From: Havoc Pennington [mailto:hp at redhat.com] 
> Sent: Wednesday, February 15, 2006 11:45 AM
> To: James Kent
> Cc: John (J5) Palmieri; dbus at lists.freedesktop.org
> Subject: RE: Using D-BUS with GLib and no dbus-daemon
> 
> On Wed, 2006-02-15 at 08:12 -0800, James Kent wrote:
> > It appears that there may be a hole in the exposed GLib 
> binding APIs, or else I'm just missing something.
> 
> The theory is that the glib bindings are "complete," i.e. you 
> should not need to include the lowlevel dbus/dbus.h at all. 
> In this case I think the bug is that there's no 
> dbus_g_connection_open(), or arguably g_proxy_new_for_peer 
> should take an address instead of a connection.
> 
> Havoc
> 
> 
> 


More information about the dbus mailing list