chiark / gitweb /
bus: allow peeking signatures recusively inside of containers
[elogind.git] / src / libsystemd-bus / bus-message.h
index b9cd4c8f30965cec13e251af9f15e3cd69002120..a973e9fd6c5b9cdb58eb3cac9ae2e71f92fb1328 100644 (file)
@@ -46,8 +46,10 @@ struct bus_container {
         uint32_t *array_size;
 
         /* gvariant: list of offsets to end of children if this is struct/dict entry/array */
-        size_t *offsets, n_offsets, n_offsets_allocated, offset_index;
+        size_t *offsets, n_offsets, offsets_allocated, offset_index;
         size_t item_size;
+
+        char *peeked_signature;
 };
 
 struct bus_header {
@@ -65,6 +67,7 @@ struct bus_body_part {
         void *data;
         size_t size;
         size_t mapped;
+        size_t allocated;
         int memfd;
         bool free_this:1;
         bool munmap_this:1;
@@ -115,6 +118,7 @@ struct sd_bus_message {
 
         struct bus_container root_container, *containers;
         unsigned n_containers;
+        size_t containers_allocated;
 
         struct iovec *iovec;
         struct iovec iovec_fixed[2];
@@ -230,3 +234,7 @@ void bus_body_part_unmap(struct bus_body_part *part);
 int bus_message_to_errno(sd_bus_message *m);
 
 int bus_message_new_synthetic_error(sd_bus *bus, uint64_t serial, const sd_bus_error *e, sd_bus_message **m);
+
+int bus_message_remarshal(sd_bus *bus, sd_bus_message **m);
+
+int bus_message_append_sender(sd_bus_message *m, const char *sender);