another gotcha with twisted-dbus integration
John (J5) Palmieri
johnp at redhat.com
Mon Jun 6 10:31:54 PDT 2005
On Mon, 2005-06-06 at 22:41 +1000, Anthony Baxter wrote:
> Once I started using the previously mentioned twisted-dbus wrappers, I hit
> another gotcha. In the code to add a match rule, there's a call to
> GetServiceOwner - this is now asynchronous, so I needed to break the code
> in two there to get the right behaviour. It looks like the new matchrule
> code in current-CVS no longer has this, but I thought I'd mention it just
> to be sure. There's no requirement for the explicit sender=:1.29 type
> thing any more, is there?
There never really was a requirement but the bindings enforced them
because of their simple hash matching scheme. It was one of those get
the bindings into a working state and fix it later things. In CVS you
can now match on as few element as you would like.
As pure signals go one would usually attach to a specific object and
connect to its signal which is how the connect_to_signal API works.
However, in dbus you may want to listen for a signal before the object
that sends it has been created. In that case you can use the
add_signal_receiver method of the bus to filter all incoming signals
without having to first create a proxy object.
--
John (J5) Palmieri
Associate Software Engineer
Desktop Group
Red Hat, Inc.
Blog: http://martianrock.com
More information about the dbus
mailing list