chiark / gitweb /
use #pragma once instead of foo*foo #define guards
[elogind.git] / src / shared / unit-name.h
index cd30d65e3a43b52f9bd3e428aa9d1dfe4a793818..f899f865285c3fea38119fd35baafd05287b2a33 100644 (file)
@@ -1,7 +1,6 @@
 /*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
 
-#ifndef foounitnamehfoo
-#define foounitnamehfoo
+#pragma once
 
 /***
   This file is part of systemd.
@@ -27,6 +26,7 @@
 #define UNIT_NAME_MAX 256
 
 typedef enum UnitType UnitType;
+typedef enum UnitLoadState UnitLoadState;
 
 enum UnitType {
         UNIT_SERVICE = 0,
@@ -43,9 +43,22 @@ enum UnitType {
         _UNIT_TYPE_INVALID = -1
 };
 
+enum UnitLoadState {
+        UNIT_STUB,
+        UNIT_LOADED,
+        UNIT_ERROR,
+        UNIT_MERGED,
+        UNIT_MASKED,
+        _UNIT_LOAD_STATE_MAX,
+        _UNIT_LOAD_STATE_INVALID = -1
+};
+
 const char *unit_type_to_string(UnitType i);
 UnitType unit_type_from_string(const char *s);
 
+const char *unit_load_state_to_string(UnitLoadState i);
+UnitLoadState unit_load_state_from_string(const char *s);
+
 int unit_name_to_instance(const char *n, char **instance);
 char* unit_name_to_prefix(const char *n);
 char* unit_name_to_prefix_and_instance(const char *n);
@@ -78,5 +91,3 @@ char *unit_name_to_path(const char *name);
 char *unit_dbus_path_from_name(const char *name);
 
 char *unit_name_mangle(const char *name);
-
-#endif