I discovered that argXpath matches don't actually do what I thought they did, and that they aren't really well tested, and that they don't actually work on path arguments.
So here's a branch that records the explanation Ryan gave me in Cambridge, as well as adding some tests and making messages with suitable 'o' arguments match (as well as 's' arguments).
I think it's worth saying explicitly in the Specification that argN works on strings, and argNpath works on strings or object paths. Other than that, I like this branch.
(In reply to comment #1)
> I think it's worth saying explicitly in the Specification that argN works on
> strings, and argNpath works on strings or object paths.
Perhaps this could be phrased by replacing this bit:
> Argument path matches provide a specialised form of wildcard
> matching for path-like namespaces. As with normal argument matches,
> if the argument is exactly equal to the string given in the match
with something like "... path-like namespaces. They can match arguments whose type is either STRING or OBJECT_PATH. As with normal ..."
Relatedly, the argN part says:
> As of this time only string arguments can be matched.
which should probably be "... only STRING arguments can be matched in this way", to be consistent with the use of capitalized type names when describing the message format, and to reflect that yes you can match non-STRINGs now, just not with argN.
(I'm suggesting capitalization to try to avoid people thinking that maybe "string" includes STRING, OBJECT_PATH and SIGNATURE, like g_variant_get_string does.)
I've added roughly that wording:
Looks good to me!
I think this would be OK to put in 1.4.x, with a note that dbus-daemon/libdbus 1.5.x or later is needed for this to work.
(Almost as though dbus-spec and libdbus were distinct projects...)
I hear Will still wants to change the semantics a bit, so, removing the patch tag.
I propose to merge this as part of Bug #24317, if not before.
Created attachment 45378 [details] [review]
Document when argNpath was added, for completeness
I'd like to add this patch too.
Fixed in git for 1.5.0