summaryrefslogtreecommitdiff
path: root/src/libsystemd-bus/bus-message.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2013-05-15 01:43:15 +0200
committerLennart Poettering <lennart@poettering.net>2013-05-15 01:43:15 +0200
commit9b29bb6853987bf6fef21531f69864fdfb39eb9a (patch)
tree85b58efc6f3b0955cad75df2f72069ab73e84341 /src/libsystemd-bus/bus-message.h
parent13c299d3a8603db8fdfc715eaea69ce5acd7aecb (diff)
bus: add macro for iterating through body parts of a message
Diffstat (limited to 'src/libsystemd-bus/bus-message.h')
-rw-r--r--src/libsystemd-bus/bus-message.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libsystemd-bus/bus-message.h b/src/libsystemd-bus/bus-message.h
index 1c50c7357a..01a1e01230 100644
--- a/src/libsystemd-bus/bus-message.h
+++ b/src/libsystemd-bus/bus-message.h
@@ -217,3 +217,6 @@ int bus_message_parse_fields(sd_bus_message *m);
int bus_header_size(struct bus_header *h, size_t *sum);
struct bus_body_part *message_append_part(sd_bus_message *m);
+
+#define MESSAGE_FOREACH_PART(part, i, m) \
+ for ((i) = 0, (part) = &(m)->body; (i) < (m)->n_body_parts; (i)++, (part) = (part)->next)