summaryrefslogtreecommitdiff
path: root/src/core/service.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-08-21 17:03:15 +0200
committerLennart Poettering <lennart@poettering.net>2014-08-21 17:24:21 +0200
commit308d72dc1e2106f94ae637e2ea510e8d466d2af1 (patch)
treeb7cae9d62f78eb64810065245ab39e9657bad21d /src/core/service.h
parent70af4d17dafe81acc96f71f4ec06fbea7386bc38 (diff)
core: allow informing systemd about service status changes with RELOADING=1 and STOPPING=1 sd_notify() messages
Diffstat (limited to 'src/core/service.h')
-rw-r--r--src/core/service.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/core/service.h b/src/core/service.h
index 686cf4b0bd..0227321d99 100644
--- a/src/core/service.h
+++ b/src/core/service.h
@@ -91,6 +91,15 @@ typedef enum NotifyAccess {
_NOTIFY_ACCESS_INVALID = -1
} NotifyAccess;
+typedef enum NotifyState {
+ NOTIFY_UNKNOWN,
+ NOTIFY_READY,
+ NOTIFY_RELOADING,
+ NOTIFY_STOPPING,
+ _NOTIFY_STATE_MAX,
+ _NOTIFY_STATE_INVALID = -1
+} NotifyState;
+
typedef enum ServiceResult {
SERVICE_SUCCESS,
SERVICE_FAILURE_RESOURCES,
@@ -196,6 +205,7 @@ struct Service {
PathSpec *pid_file_pathspec;
NotifyAccess notify_access;
+ NotifyState notify_state;
};
extern const UnitVTable service_vtable;
@@ -219,6 +229,9 @@ ServiceExecCommand service_exec_command_from_string(const char *s) _pure_;
const char* notify_access_to_string(NotifyAccess i) _const_;
NotifyAccess notify_access_from_string(const char *s) _pure_;
+const char* notify_state_to_string(NotifyState i) _const_;
+NotifyState notify_state_from_string(const char *s) _pure_;
+
const char* service_result_to_string(ServiceResult i) _const_;
ServiceResult service_result_from_string(const char *s) _pure_;