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. --- dbus/dbus-bus.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'dbus') diff --git a/dbus/dbus-bus.c b/dbus/dbus-bus.c index fd569c2b..c7f43e8c 100644 --- a/dbus/dbus-bus.c +++ b/dbus/dbus-bus.c @@ -1424,6 +1424,13 @@ send_no_return_values (DBusConnection *connection, * * Currently there is no way to match against non-string arguments. * + * A specialised form of wildcard matching on arguments is + * supported for path-like namespaces. If your argument match has + * a 'path' suffix (eg: "arg0path='/some/path/'") then it is + * considered a match if the argument exactly matches the given + * string or if one of them ends in a '/' and is a prefix of the + * other. + * * Matching on interface is tricky because method call * messages only optionally specify the interface. * If a message omits the interface, then it will NOT match -- cgit