diff options
author | Lennart Poettering <lennart@poettering.net> | 2013-03-31 16:16:37 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2013-03-31 16:16:37 +0200 |
commit | 392d5b378ceae5e1fd7c91ca545fcf4cd105744a (patch) | |
tree | e231fe77155323de76b535cd509ee5677f1bf28f /src/libsystemd-bus/bus-internal.h | |
parent | 11c4c2492083325531aeb3eeb9b041c929677890 (diff) |
bus: parse matches locally and allow registration of callbacks for them
This includes code to parse and split up match strings which will also
be useful to calculate bloom filter masks when the time comes.
Diffstat (limited to 'src/libsystemd-bus/bus-internal.h')
-rw-r--r-- | src/libsystemd-bus/bus-internal.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/libsystemd-bus/bus-internal.h b/src/libsystemd-bus/bus-internal.h index 76b90ea3a6..1dcb383038 100644 --- a/src/libsystemd-bus/bus-internal.h +++ b/src/libsystemd-bus/bus-internal.h @@ -32,6 +32,7 @@ #include "sd-bus.h" #include "bus-error.h" +#include "bus-match.h" struct reply_callback { sd_message_handler_t callback; @@ -97,6 +98,7 @@ struct sd_bus { char *unique_name; + struct bus_match_node match_callbacks; Prioq *reply_callbacks_prioq; Hashmap *reply_callbacks; LIST_HEAD(struct filter_callback, filter_callbacks); @@ -166,6 +168,14 @@ bool interface_name_is_valid(const char *p); bool service_name_is_valid(const char *p); bool member_name_is_valid(const char *p); +bool namespace_complex_pattern(const char *pattern, const char *value); +bool path_complex_pattern(const char *pattern, const char *value); + +bool namespace_simple_pattern(const char *pattern, const char *value); +bool path_simple_pattern(const char *pattern, const char *value); + +int bus_message_type_from_string(const char *s, uint8_t *u); + #define error_name_is_valid interface_name_is_valid int bus_ensure_running(sd_bus *bus); |