summaryrefslogtreecommitdiff
path: root/src/dbus-execute.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-07-04 18:49:58 +0200
committerLennart Poettering <lennart@poettering.net>2010-07-04 18:49:58 +0200
commitb58b41160fde88a82cba1ddec4be7dfb08825e35 (patch)
tree9f5b30cf50bcaf752fc955507c5d065d214e0222 /src/dbus-execute.h
parent14ad1d1437f51b8ebc8dc6e8d3707b41d48d0a3a (diff)
dbus: complete exec status coverage
Diffstat (limited to 'src/dbus-execute.h')
-rw-r--r--src/dbus-execute.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/dbus-execute.h b/src/dbus-execute.h
index f6cca9c493..1ab196ff21 100644
--- a/src/dbus-execute.h
+++ b/src/dbus-execute.h
@@ -26,6 +26,13 @@
#include "manager.h"
+#define BUS_EXEC_STATUS_INTERFACE(prefix) \
+ " <property name=\"" prefix "StartTimestamp\" type=\"t\" access=\"read\"/>\n" \
+ " <property name=\"" prefix "ExitTimestamp\" type=\"t\" access=\"read\"/>\n" \
+ " <property name=\"" prefix "PID\" type=\"u\" access=\"read\"/>\n" \
+ " <property name=\"" prefix "Code\" type=\"i\" access=\"read\"/>\n" \
+ " <property name=\"" prefix "Status\" type=\"i\" access=\"read\"/>\n"
+
#define BUS_EXEC_CONTEXT_INTERFACE \
" <property name=\"Environment\" type=\"as\" access=\"read\"/>\n" \
" <property name=\"UMask\" type=\"u\" access=\"read\"/>\n" \
@@ -130,6 +137,13 @@
{ interface, "PrivateTmp", bus_property_append_bool, "b", &(context).private_tmp }, \
{ interface, "NoSetSID", bus_property_append_bool, "b", &(context).no_setsid }
+#define BUS_EXEC_STATUS_PROPERTIES(interface, estatus, prefix) \
+ { interface, prefix "StartTimestamp", bus_property_append_usec, "t", &(estatus).start_timestamp.realtime }, \
+ { interface, prefix "ExitTimestamp", bus_property_append_usec, "t", &(estatus).start_timestamp.realtime }, \
+ { interface, prefix "PID", bus_property_append_pid, "u", &(estatus).pid }, \
+ { interface, prefix "Code", bus_property_append_int, "i", &(estatus).code }, \
+ { interface, prefix "Status", bus_property_append_int, "i", &(estatus).status }
+
int bus_execute_append_output(Manager *m, DBusMessageIter *i, const char *property, void *data);
int bus_execute_append_input(Manager *m, DBusMessageIter *i, const char *property, void *data);
int bus_execute_append_oom_adjust(Manager *m, DBusMessageIter *i, const char *property, void *data);