summaryrefslogtreecommitdiff
path: root/unit.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-01-30 01:55:42 +0100
committerLennart Poettering <lennart@poettering.net>2010-01-30 01:55:42 +0100
commit94f043472a5af62dc9cd5767e89ba33872212d5e (patch)
tree282af9c7e9af74fd54219f5847a9db6ed202c3a1 /unit.h
parent79d6d8160834fdfc964f4b8b2a6b7fb32c7b36c9 (diff)
greatly extend what we enforce as process properties
Diffstat (limited to 'unit.h')
-rw-r--r--unit.h18
1 files changed, 16 insertions, 2 deletions
diff --git a/unit.h b/unit.h
index c12ce0b482..6dfc065c9f 100644
--- a/unit.h
+++ b/unit.h
@@ -41,7 +41,8 @@ enum UnitLoadState {
UNIT_STUB,
UNIT_LOADED,
UNIT_FAILED,
- _UNIT_LOAD_STATE_MAX
+ _UNIT_LOAD_STATE_MAX,
+ _UNIT_LOAD_STATE_INVALID = -1
};
enum UnitActiveState {
@@ -50,7 +51,8 @@ enum UnitActiveState {
UNIT_INACTIVE,
UNIT_ACTIVATING,
UNIT_DEACTIVATING,
- _UNIT_ACTIVE_STATE_MAX
+ _UNIT_ACTIVE_STATE_MAX,
+ _UNIT_ACTIVE_STATE_INVALID = -1
};
static inline bool UNIT_IS_ACTIVE_OR_RELOADING(UnitActiveState t) {
@@ -260,4 +262,16 @@ int set_unit_path(const char *p);
char *unit_name_escape_path(const char *prefix, const char *path, const char *suffix);
+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);
+
+const char *unit_active_state_to_string(UnitActiveState i);
+UnitActiveState unit_active_state_from_string(const char *s);
+
+const char *unit_dependency_to_string(UnitDependency i);
+UnitDependency unit_dependency_from_string(const char *s);
+
#endif