Anyway to remove interface from session bus?
thiago at kde.org
Thu Sep 19 13:41:34 PDT 2013
On sexta-feira, 20 de setembro de 2013 04:14:06, 斟酌鵬兄 wrote:
> > 3) force a registration by passing the DBUS_NAME_FLAG_REPLACE_EXISTING
> > flag to RegisterName
> I am not sure how to do that.
> Can you make a simple example for me?
The simplest I can write is using QtDBus. I won't use the pre-existing wrapper
class because I've renamed the API into something that looks a little more
"Qtish" and you'll have a hard time reproducing.
In plain low-level QtDBus:
auto msg = QDBusMessage::createMethodCall("org.freedesktop.DBus",
msg << "org.freedesktop.Notifications";
msg << uint(DBUS_NAME_FLAG_DO_NOT_QUEUE | DBUS_NAME_FLAG_REPLACE_EXISTING);
With the low-level library, you'd use
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
Software Architect - Intel Open Source Technology Center
PGP/GPG: 0x6EF45358; fingerprint:
E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 190 bytes
Desc: This is a digitally signed message part.
More information about the dbus