chiark / gitweb /
manager: add newly created units to gc queue
[elogind.git] / target.h
index 6ee9f22013e7fb92378e08263b8fd4d002480342..5397d50d7c1069486cdef29e5c088025fb52b09a 100644 (file)
--- a/target.h
+++ b/target.h
@@ -29,15 +29,21 @@ typedef struct Target Target;
 typedef enum TargetState {
         TARGET_DEAD,
         TARGET_ACTIVE,
-        _TARGET_STATE_MAX
+        _TARGET_STATE_MAX,
+        _TARGET_STATE_INVALID = -1
 } TargetState;
 
 struct Target {
         Meta meta;
 
-        TargetState state;
+        TargetState state, deserialized_state;
 };
 
 extern const UnitVTable target_vtable;
 
+int target_get_runlevel(Target *t);
+
+const char* target_state_to_string(TargetState i);
+TargetState target_state_from_string(const char *s);
+
 #endif