Lines Matching refs:root

55 static int match_add(sd_bus_slot *slots, struct bus_match_node *root, const char *match, int value) {
71 r = bus_match_add(root, components, n_components, &s->match_callback);
87 struct bus_match_node root = {
101 assert_se(match_add(slots, &root, "arg2='wal\\'do',sender='foo',type='signal',interface='bar.x',", 1) >= 0);
102 assert_se(match_add(slots, &root, "arg2='wal\\'do2',sender='foo',type='signal',interface='bar.x',", 2) >= 0);
103 assert_se(match_add(slots, &root, "arg3='test',sender='foo',type='signal',interface='bar.x',", 3) >= 0);
104 assert_se(match_add(slots, &root, "arg3='test',sender='foo',type='method_call',interface='bar.x',", 4) >= 0);
105 assert_se(match_add(slots, &root, "", 5) >= 0);
106 assert_se(match_add(slots, &root, "interface='quux.x'", 6) >= 0);
107 assert_se(match_add(slots, &root, "interface='bar.x'", 7) >= 0);
108 assert_se(match_add(slots, &root, "member='waldo',path='/foo/bar'", 8) >= 0);
109 assert_se(match_add(slots, &root, "path='/foo/bar'", 9) >= 0);
110 assert_se(match_add(slots, &root, "path_namespace='/foo'", 10) >= 0);
111 assert_se(match_add(slots, &root, "path_namespace='/foo/quux'", 11) >= 0);
112 assert_se(match_add(slots, &root, "arg1='two'", 12) >= 0);
113 assert_se(match_add(slots, &root, "member='waldo',arg2path='/prefix/'", 13) >= 0);
114 assert_se(match_add(slots, &root, "member=waldo,path='/foo/bar',arg3namespace='prefix'", 14) >= 0);
115 assert_se(match_add(slots, &root, "arg4has='pi'", 15) >= 0);
116 assert_se(match_add(slots, &root, "arg4has='pa'", 16) >= 0);
117 assert_se(match_add(slots, &root, "arg4has='po'", 17) >= 0);
118 assert_se(match_add(slots, &root, "arg4='pi'", 18) >= 0);
120 bus_match_dump(&root, 0);
127 assert_se(bus_match_run(NULL, &root, m) == 0);
130 assert_se(bus_match_remove(&root, &slots[8].match_callback) >= 0);
131 assert_se(bus_match_remove(&root, &slots[13].match_callback) >= 0);
133 bus_match_dump(&root, 0);
136 assert_se(bus_match_run(NULL, &root, m) == 0);
149 bus_match_free(&root);