Allow using a different DBus library for gio Application
Currently there's no way to use a different DBus library than GDBus
for Gio.Application
. Unfortunately, this also means for example that it is not possible to create a Gio.Application
using Rust, and then use zbus to provide APIs over DBus (by using the same DBus name as the Gio.Application
).
It would be good if there is any possibility from gio
side to allow using "third party" DBus libraries. I must confess, I have no idea what such a solution might look like, but perhaps this can be used to start a discussion about it.
Currently I work around this problem by closing the DBus connection in activate()
. This way the name is free again, and thus zbus can take over.
fn activate(&self, app: &Self::Type) {
self.parent_activate(app);
let conn = app.dbus_connection().unwrap();
conn.close_sync(gtk::gio::Cancellable::NONE).unwrap();
cc: @zeenix (who sent me here)