chiark / gitweb /
bus: add macro for iterating through body parts of a message
[elogind.git] / src / libsystemd-bus / bus-match.h
index 0a63b55403431aa1d7ab957c90bf3a982510febf..075f1a9e3abc31260f4e78fffaa4569fa43c0986 100644 (file)
@@ -54,12 +54,13 @@ struct bus_match_node {
 
         union {
                 struct {
-                        uint8_t u8;
                         char *str;
+                        uint8_t u8;
                 } value;
                 struct {
-                        sd_message_handler_t callback;
+                        sd_bus_message_handler_t callback;
                         void *userdata;
+                        unsigned last_iteration;
                 } leaf;
                 struct {
                         /* If this is set, then the child is NULL */
@@ -70,8 +71,8 @@ struct bus_match_node {
 
 int bus_match_run(sd_bus *bus, struct bus_match_node *root, int ret, sd_bus_message *m);
 
-int bus_match_add(struct bus_match_node *root, const char *match, sd_message_handler_t callback, void *userdata, struct bus_match_node **ret);
-int bus_match_remove(struct bus_match_node *root, const char *match, sd_message_handler_t callback, void *userdata);
+int bus_match_add(struct bus_match_node *root, const char *match, sd_bus_message_handler_t callback, void *userdata, struct bus_match_node **ret);
+int bus_match_remove(struct bus_match_node *root, const char *match, sd_bus_message_handler_t callback, void *userdata);
 
 void bus_match_free(struct bus_match_node *node);