Creating a dbus connection

P. Durante shackan at
Thu Jul 5 08:30:03 PDT 2007

On 7/5/07, Naveen Verma <ernaveenverma at> wrote:
> As per my previous understanding, there is a function in dbus C apis,
> dbus_bus_register() to register a connection. To test it I have added a
> public function in DBus::Connection class as:
> bool register_connection() {
>    return dbus_bus_register(_pvt->conn);
> }
> And in my program I am doing like:
> DBus::Connection *pconn = DBus::Connection(bus_path);
> pconn->register_connection();
> After this it is working ok.
> So I have a question, is there any other way already exist to register the
> connection, or such function is missing and we need to add one as I did
> above?

Yes, it's a bug, as per the doc:

"If you open a bus connection with dbus_connection_open() or
dbus_connection_open_private() you will have to dbus_bus_register()
yourself, or make the appropriate registration method calls yourself."

the constructor should call it and it doesn't, this hasn't come up
earlier because only the 'default' buses were being used.

> Btv,  is there any api documentation for dbus c++ bindings?

I'm afraid that's still on TODO.

thanks for your investigation,

More information about the dbus mailing list