Event over Dbus when Device gets linked
When I'm linking a device (scanning the QR Code) via Dbus, I currently see no way for the client to know this has happened. IMHO the DbusSignalControl would need a Dbus Signal that notifies the client a link has happened and which number to use. Is this possible?
Should be possible, there's even a standard dbus signal that can be used to notify about newly exported objects: org.freedesktop.DBus.ObjectManager.InterfacesAdded
In the latest signal-cli version there are also two new methods for linking startLink and finishLink that might help you. The startLink method returns the url for the qr code and the finishLink method returns the new account number.
I tried this, but somehow fail to receive that message. As dry-run I just did a dbus-monitor --system "type='signal',interface='org.freedesktop.DBus.ObjectManager.InterfacesAdded'" I would expect this to trigger signals when restarting signal-cli daemon, but there was nothing. Is this not working on system bus?
startLink/finishLink are not yet documented it seems. So do I get it right: startLink gives me the URI so I can display the QR Code and then I call finishLink and it would return once done (or timeout?). Since Perl is a single threaded environment, that won't work for me (I'd block the whole framework). Emitting a Dbus signal would be much better.
Yes, exactly. The InterfacesAdded event needs to be implemented in signal-cli, unfortunately dbus-java doesn't provide it automatically ...