python - using a signal not in introspection

Simon McVittie simon.mcvittie at collabora.co.uk
Thu Apr 26 03:23:30 PDT 2007


On Thu, 26 Apr 2007 at 06:49:41 +0200, Thiago Macieira wrote:
> Don't use AddMatch for the first owner. Instead, use AddMatch for the name 
> you're watching. The daemon handles that gracefully.

dbus-python 0.80 does this.

dbus-python < 0.80 had various cases where it behaved in a way somewhere
between early and late binding. In the newer versions I'm being careful to
make the distinction.

> You still need to store the owner information somewhere in the client in 
> order to match the incoming message (sender contains the owner).

Indeed - in dbus-python 0.80 the SignalMatch structure contains both
self._sender (the sender the user asked for, which is what we pass to
AddMatch) and self._sender_unique (the unique name of that sender). We
don't manipulate match rules in response to NameOwnerChanged.

I'm currently trying to refactor that code to be able to work in situations
where there is no bus daemon (Telepathy's multi-user Tubes, as used on OLPC,
behave something like a bus, but only have message forwarding between
users, with no org.freedesktop.DBus service or interface available).

	Simon


More information about the dbus mailing list