Being interested in NameOwnerChanged for a namespace, not one name

Will Thompson will.thompson at collabora.co.uk
Wed Sep 15 04:09:40 PDT 2010


Hi,

Mission Control, a Telepathy component, watches for new Telepathy 
Connection Managers appearing by binding to NameOwnerChanged and looking 
for names starting with "org.freedesktop.Telepathy.ConnectionManager.".

So obviously this is a bad idea. ryan lortie rightly called me out for 
this at GuadeKademy last summer, and I started implementing support for 
argXprefix in match rules: 
<http://git.collabora.co.uk/?p=user/wjt/dbus.git;a=commitdiff;h=refs/heads/argx-prefix-matching>. 
I haven't worked on it since then, but have just been reminded of it.

Any opinions on whether:

• this is a good general approach to solving this problem;
• this is a good specific approach to solving this problem;
• support for this should be negotiated at connection time, or inferred 
by the error reply from AddMatch, or included in a list of features 
pushed to the client by the bus just after connection (as suggested by 
Alban on IRC), or...?

(Note that MC can't just list available CMs using 
ListActivatableNames(), because you can install new CMs while it's 
running, and there's no change notification. And if there was change 
notification for activatable names, this wouldn't cover the 
developing-a-new-CM-which-I-haven't-installed-a-service-file-for use 
case. I think this general pattern of multiple services providing the 
same interface is useful beyond Telepathy — you could imagine GeoClue 
providers doing roughly the same thing.)

Regards,
-- 
Will


More information about the dbus mailing list