From 51a4261d0ee74afbb95611e7474715a754db97bb Mon Sep 17 00:00:00 2001 From: Havoc Pennington Date: Fri, 29 Jul 2005 17:43:30 +0000 Subject: 2005-07-29 Havoc Pennington * bus/signals.c (bus_signals_test): add match_rule_equal() tests (match_rule_matches): remove unused arg (test_matching): add tests for match_rule_matches() * bus/signals.c (bus_match_rule_parse_arg_match): add ability to do arg0='foo' arg5='bar' in the match rules (match_rule_matches): don't match if the arg0='foo' doesn't match. * dbus/dbus-protocol.h (DBUS_MAXIMUM_MATCH_RULE_ARG_NUMBER): add this --- bus/signals.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'bus/signals.h') diff --git a/bus/signals.h b/bus/signals.h index c9bd5c91..48fb0710 100644 --- a/bus/signals.h +++ b/bus/signals.h @@ -36,7 +36,8 @@ typedef enum BUS_MATCH_MEMBER = 1 << 2, BUS_MATCH_SENDER = 1 << 3, BUS_MATCH_DESTINATION = 1 << 4, - BUS_MATCH_PATH = 1 << 5 + BUS_MATCH_PATH = 1 << 5, + BUS_MATCH_ARGS = 1 << 6 } BusMatchFlags; BusMatchRule* bus_match_rule_new (DBusConnection *matches_go_to); @@ -55,6 +56,9 @@ dbus_bool_t bus_match_rule_set_destination (BusMatchRule *rule, const char *destination); dbus_bool_t bus_match_rule_set_path (BusMatchRule *rule, const char *path); +dbus_bool_t bus_match_rule_set_arg (BusMatchRule *rule, + int arg, + const char *value); BusMatchRule* bus_match_rule_parse (DBusConnection *matches_go_to, const DBusString *rule_text, -- cgit