Being interested in NameOwnerChanged for a namespace, not one name

Lennart Poettering mzqohf at 0pointer.de
Wed Sep 15 04:45:57 PDT 2010


On Wed, 15.09.10 12:09, Will Thompson (will.thompson at collabora.co.uk) wrote:

> 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.

The idea sounds good to me.

> Any opinions on whether:
> 
> • this is a good general approach to solving this problem;

Yes, I think so. Uses like this are common. The MediaServerSpec uses the
same prefix naming scheme. As does the device reservation spec.

> • this is a good specific approach to solving this problem;

Yes, this too.

> • 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...?

It's a feature of the bus, not of the connection, hence I wouldn't
attach this to the connection nego.

My suggestion would be to use an error of AddMatch for this
negotiation. It's the nicest and simplemost thing you can do I think. i.e.:

if (!AddMatch("fooo, arg0prefix=...."))
        AddMatch("fooo");

Lennart

-- 
Lennart Poettering - Red Hat, Inc.


More information about the dbus mailing list