#ifndef _JITTERBUG__MATCH_H #define _JITTERBUG__MATCH_H #include #include #include "wire.h" #define MATCH_RULE_MAX 1024 #define MATCH_RULE_MAX_ARG 12 typedef struct match_rule { uint8_t type; bool eavesdrop; char *sender, *interface, *member, *path, *path_namespace, *destination, *arg0namespace, *rule_string; char *arg[MATCH_RULE_MAX_ARG]; /* TODO: spec states that indexes 0 to 63 should be supported */ char *arg_path[MATCH_RULE_MAX_ARG]; /* TODO: spec states that indexes 0 to 63 should be supported */ } match_rule_t; void match_rule_free(match_rule_t *rule); match_rule_t *match_rule_from_string(char *d); int match_rule_check(match_rule_t *rule, wire_message_t *msg, wire_context_t *ctx); #endif // _JITTERBUG__MATCH_H