summaryrefslogtreecommitdiff
path: root/src/libsystemd/sd-bus/bus-message.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-01-22 20:01:23 +0100
committerLennart Poettering <lennart@poettering.net>2014-01-22 20:01:23 +0100
commitca7b42c81652c342288a3e0a10abd885c66ac5b2 (patch)
tree25af7e6df93701499016b8c24170b883684ffb57 /src/libsystemd/sd-bus/bus-message.c
parentaa575ef8dec6fe74c9fdf27960125dd214511202 (diff)
bus: expose priority field of messages, in preparation for prioq support
Diffstat (limited to 'src/libsystemd/sd-bus/bus-message.c')
-rw-r--r--src/libsystemd/sd-bus/bus-message.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/libsystemd/sd-bus/bus-message.c b/src/libsystemd/sd-bus/bus-message.c
index 2c25b3f5f1..b42c4915ea 100644
--- a/src/libsystemd/sd-bus/bus-message.c
+++ b/src/libsystemd/sd-bus/bus-message.c
@@ -5548,3 +5548,19 @@ int bus_message_append_sender(sd_bus_message *m, const char *sender) {
return message_append_field_string(m, BUS_MESSAGE_HEADER_SENDER, SD_BUS_TYPE_STRING, sender, &m->sender);
}
+
+_public_ int sd_bus_message_get_priority(sd_bus_message *m, int64_t *priority) {
+ assert_return(m, -EINVAL);
+ assert_return(priority, -EINVAL);
+
+ *priority = m->priority;
+ return 0;
+}
+
+_public_ int sd_bus_message_set_priority(sd_bus_message *m, int64_t priority) {
+ assert_return(m, -EINVAL);
+ assert_return(!m->sealed, -EPERM);
+
+ m->priority = priority;
+ return 0;
+}