chiark / gitweb /
systemctl: minor beautifications
[elogind.git] / src / service.h
index 521baaa1fb903df9e892558a63941e25db402062..6c1612d0f5abb53c43a8010a6bf901537e244269 100644 (file)
@@ -76,12 +76,22 @@ typedef enum ServiceExecCommand {
         _SERVICE_EXEC_COMMAND_INVALID = -1
 } ServiceExecCommand;
 
+typedef enum NotifyAccess {
+        NOTIFY_NONE,
+        NOTIFY_ALL,
+        NOTIFY_MAIN,
+        _NOTIFY_ACCESS_MAX,
+        _NOTIFY_ACCESS_INVALID = -1
+} NotifyAccess;
+
 struct Service {
         Meta meta;
 
         ServiceType type;
         ServiceRestart restart;
 
+        NotifyAccess notify_access;
+
         /* If set we'll read the main daemon PID from this file */
         char *pid_file;
 
@@ -127,13 +137,14 @@ struct Service {
         RateLimit ratelimit;
 
         int socket_fd;
+        struct Socket *socket;
 
         Watch timer_watch;
 };
 
 extern const UnitVTable service_vtable;
 
-int service_set_socket_fd(Service *s, int fd);
+int service_set_socket_fd(Service *s, int fd, struct Socket *socket);
 
 const char* service_state_to_string(ServiceState i);
 ServiceState service_state_from_string(const char *s);
@@ -147,4 +158,7 @@ ServiceType service_type_from_string(const char *s);
 const char* service_exec_command_to_string(ServiceExecCommand i);
 ServiceExecCommand service_exec_command_from_string(const char *s);
 
+const char* notify_access_to_string(NotifyAccess i);
+NotifyAccess notify_access_from_string(const char *s);
+
 #endif