python - using a signal not in introspection

John (J5) Palmieri johnp at redhat.com
Wed Apr 25 16:49:19 PDT 2007


On Wed, 2007-04-25 at 17:56 -0400, Havoc Pennington wrote:
> While I'm asking questions, it looks like add_signal_receiver always 
> resolves the passed-in bus name. I think this is frequently undesirable, 
> since it means you have to monitor that bus name and re-connect if it 
> gets a new owner. For example, if you are monitoring the current 
> Rhythmbox song and the user exits and restarts the app, it would break.
> This is why the glib bindings have the new_for_name/new_for_name_owner 
> distinction.
> 
> Is there a way to not resolve the name?

Don't give a name to add_signal_receiver and just filter on signal_name
and dbus_interface.

I think newer versions of the bindings handle the reconnects for you
though.

-- 
John (J5) Palmieri <johnp at redhat.com>



More information about the dbus mailing list