chiark / gitweb /
unit: Move UnitLoadState definitions from core/unit.c to shared/unit-name.c
[elogind.git] / src / shared / unit-name.h
index cd30d65e3a43b52f9bd3e428aa9d1dfe4a793818..c6c09dd31feb5136680594b649f1cb6d2e5c699d 100644 (file)
@@ -27,6 +27,7 @@
 #define UNIT_NAME_MAX 256
 
 typedef enum UnitType UnitType;
+typedef enum UnitLoadState UnitLoadState;
 
 enum UnitType {
         UNIT_SERVICE = 0,
@@ -43,9 +44,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);