chiark / gitweb /
execute: drop now unnecessary GCC pragma again
[elogind.git] / unit.h
diff --git a/unit.h b/unit.h
index c12ce0b482d784542eaf5a1da3ca4af448a64b0d..3b7f6995ff7caa2e0899cb652e4ea03138e08d56 100644 (file)
--- a/unit.h
+++ b/unit.h
@@ -3,6 +3,25 @@
 #ifndef foounithfoo
 #define foounithfoo
 
+/***
+  This file is part of systemd.
+
+  Copyright 2010 Lennart Poettering
+
+  systemd is free software; you can redistribute it and/or modify it
+  under the terms of the GNU General Public License as published by
+  the Free Software Foundation; either version 2 of the License, or
+  (at your option) any later version.
+
+  systemd is distributed in the hope that it will be useful, but
+  WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+  General Public License for more details.
+
+  You should have received a copy of the GNU General Public License
+  along with systemd; If not, see <http://www.gnu.org/licenses/>.
+***/
+
 #include <stdbool.h>
 #include <stdlib.h>
 
@@ -41,7 +60,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 +70,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 +281,18 @@ 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);
+
+char *unit_dbus_path(Unit *u);
+
 #endif