chiark / gitweb /
bus: synthesize timeout message errors instead of returning error codes
[elogind.git] / src / libsystemd-bus / bus-message.h
index 2517514bac13168a034d4e5a61ef3a7cbb713460..2fb11ea3b17c6337149b605ff5cc262e0c0c46bd 100644 (file)
 struct bus_container {
         char enclosing;
 
-        char *signature;
         unsigned index, saved_index;
 
+        char *signature;
+
         uint32_t *array_size;
         size_t before, begin;
 };
@@ -51,13 +52,15 @@ struct bus_header {
 } _packed_;
 
 struct bus_body_part {
+        struct bus_body_part *next;
         void *data;
         size_t size;
         size_t mapped;
         int memfd;
         bool free_this:1;
+        bool munmap_this:1;
         bool sealed:1;
-        struct bus_body_part *next;
+        bool is_zero:1;
 };
 
 struct sd_bus_message {
@@ -229,3 +232,10 @@ 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)
+
+int bus_body_part_map(struct bus_body_part *part);
+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);