Problem in dbus connection

Naveen Verma ernaveenverma at
Thu Jul 5 17:20:39 EEST 2007

Hi All,

I have just started learning the dbus c++ binding. I have already used the
dbus c apis so I have understanding of that.
In c++ binding, I am trying to make a dbus connection without using static
function like DBus::Connection::SessionBus() etc. I found two public
constructors DBus::Connection(Private*)
, and DBus::Connection(const char * address, bool priv = true). I am unable
to understand how to use first one. But I tried to use second one, but in
the second one it seems it does not
register the connection. So when I execute, it abort with the error that
connection is not registered.

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);

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

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

-Best Regards
-------------- next part --------------
An HTML attachment was scrubbed...

More information about the dbus mailing list