QtDBus: expose two different interfaces on two different services

64 Views Asked by At

I am trying to develop a stand-alone status notifier app to display "tray icons". KDE developed a dbus spec for this where apps can register a status notifier icon via dbus. The service that waits for the apps is org.kde.StatusNotifierWatcher, the object path is /StatusNotifierWatcher and the interface used is org.kde.StatusNotifierWatcher. Now that this is becoming the standard, FD.O has proposed that the dbus service to be used should be org.freedesktop.StatusNotifierWatcher. However, this is in the process of being adopted, and org.kde.StatusNotifierWatcher is more commonly used one.

In my app, I would like to provide both these services. I can register the services quite easily. However, the problem is the interfaces. I would like to expose the org.kde.StatusNotifierWatcher interface via the org.kde.StatusNotifierWatcher service and the freedesktop interface with org.freedesktop.StatusNotifierWatcher. Whatever I try, I end up with either both interfaces on both services or one interface on both services.

Since the code is quite lengthy, I have uploaded it to a repo: https://gitlab.com/marcusbritanicus/sni-test

TL;DR: How do I expose two different interfaces on two different services in a single app.

0

There are 0 best solutions below