Re: Listening to a remote object's signals using the low-level API?
Simon McVittie <smcv-ZGY8ohtN/[email protected]>
| Newsgroups | gmane.comp.freedesktop.dbus |
|---|---|
| Message-ID | <20200408112401.GA24862@horizon> |
On Wed, 08 Apr 2020 at 13:18:41 +1200, Lawrence D'Oliveiro wrote:
> On Tue, 07 Apr 2020 21:58:20 -0300, Thiago Macieira wrote:
> > Either way, return DBUS_HANDLER_RESULT_NOT_YET_HANDLED.
>
> It seems to me D-Bus libraries should be implemented to ignore results
> from signal handlers and always pass them to subsequent handlers in the
> chain, if there are any.
In higher-level APIs that are not designed to be suitable for implementing
dbus-daemon, like g_dbus_connection_signal_subscribe(): yes, absolutely,
there should not be a way to stop the signal from being passed to
subsequent handlers.
However, libdbus doesn't have an equivalent of
g_dbus_connection_signal_subscribe(), only an equivalent of
g_dbus_connection_add_filter(). When you're working at that low a level,
there is no such thing as a signal handler, only a message filter that
you happen to have written such that it is looking at signals.
It is not coincidental that https://dbus.freedesktop.org/doc/api/html/
starts with "If you use this low-level API directly, you're signing up
for some pain".
smcv
_______________________________________________
dbus mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dbus