I would like to register an object for a Bus name that's already owned. Below is how I would register an object on a new Bus, but own_name
fails if the Bus already exists. Can I retrieve the DBusConnection object some other way so I can call register_object
?
Bus.own_name (BusType.SESSION, "net.launchpad.Diodon", BusNameOwnerFlags.NONE,
conn => {
try {
conn.register_object ("/net/launchpad/Diodon", new DBusController (controller));
} catch (IOError e) {
stderr.printf ("Could not register service\n");
}
},
() => {},
() => stderr.printf ("Could not aquire name\n"));