summaryrefslogtreecommitdiff
path: root/src/systemd/sd-bus.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2016-08-15 14:58:09 +0200
committerLennart Poettering <lennart@poettering.net>2016-08-22 14:17:24 +0200
commitae1a2efa8b72c30b46528fa6469ce6686527dec7 (patch)
tree0c84b8a2fc1c220e96b86c934c2baec8e92b45f5 /src/systemd/sd-bus.h
parent512e3bbce6925f9951fcd1c397d4e1b6ab37d37a (diff)
downloadsystemd-ae1a2efa8b72c30b46528fa6469ce6686527dec7.tar.gz
sd-bus: add a "recursive" mode to sd_bus_track
This adds an optional "recursive" counting mode to sd_bus_track. If enabled adding the same name multiple times to an sd_bus_track object is counted individually, so that it also has to be removed the same number of times before it is gone again from the tracking object. This functionality is useful for implementing local ref counted objects that peers make take references on.
Diffstat (limited to 'src/systemd/sd-bus.h')
-rw-r--r--src/systemd/sd-bus.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/systemd/sd-bus.h b/src/systemd/sd-bus.h
index 295989cd69..0305c56a8c 100644
--- a/src/systemd/sd-bus.h
+++ b/src/systemd/sd-bus.h
@@ -438,8 +438,14 @@ int sd_bus_track_remove_sender(sd_bus_track *track, sd_bus_message *m);
int sd_bus_track_add_name(sd_bus_track *track, const char *name);
int sd_bus_track_remove_name(sd_bus_track *track, const char *name);
+int sd_bus_track_set_recursive(sd_bus_track *track, int b);
+int sd_bus_track_get_recursive(sd_bus_track *track);
+
unsigned sd_bus_track_count(sd_bus_track *track);
-const char* sd_bus_track_contains(sd_bus_track *track, const char *names);
+int sd_bus_track_count_sender(sd_bus_track *track, sd_bus_message *m);
+int sd_bus_track_count_name(sd_bus_track *track, const char *name);
+
+const char* sd_bus_track_contains(sd_bus_track *track, const char *name);
const char* sd_bus_track_first(sd_bus_track *track);
const char* sd_bus_track_next(sd_bus_track *track);