From f6ec4a80abbfd4e4f4969747c39e625b2689df08 Mon Sep 17 00:00:00 2001 From: Ryan Lortie Date: Thu, 20 Sep 2007 13:04:38 -0400 Subject: Add argument path matching support. Bug #11066. 2007-09-20 Ryan Lortie * dbus/signals.c (struct DBusMatchRule, bus_match_rule_new, bus_match_rule_set_arg, bus_match_rule_parse_arg_match, match_rule_matches): Add support for parsing and matching on arg0path='/some/path' type rules. * dbus/signals.h (bus_match_rule_set_arg): change to take const DBusString instead of const char * for the string to match against. * dbus/dbus-bus.c: add a quick note to dbus_bus_add_match documentation about the path matching. * doc/dbus-specification.xml: add a more detailed description of the changes here. --- doc/dbus-specification.xml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'doc') diff --git a/doc/dbus-specification.xml b/doc/dbus-specification.xml index 39bb7723..9e33944c 100644 --- a/doc/dbus-specification.xml +++ b/doc/dbus-specification.xml @@ -3136,6 +3136,20 @@ would be arg3='Foo'. Only argument indexes from 0 to 63 should be accepted. + + arg[0, 1, 2, 3, ...]path + Any string + 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 + rule then the rule is satisfied. Additionally, there is also a + match when either the string given in the match rule or the + appropriate message argument ends with '/' and is a prefix of the + other. An example argument path match is arg0path='/aa/bb/'. This + would match messages with first arguments of '/', '/aa/', + '/aa/bb/', '/aa/bb/cc/' and '/aa/bb/cc'. It would not match + messages with first arguments of '/aa/b', '/aa' or even '/aa/bb'. + -- cgit