X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=src%2Funit.h;h=d3dd5decd25348dea9c8fd094517557be8378ea0;hp=03031892d0f33f8b5477218d01db5a18a356603e;hb=2c966c038dc32ef39baa176371395cde4e541d01;hpb=6124958c7bda3fed9b079e8217781480797703f5 diff --git a/src/unit.h b/src/unit.h index 03031892d..d3dd5decd 100644 --- a/src/unit.h +++ b/src/unit.h @@ -78,9 +78,9 @@ enum UnitLoadState { enum UnitActiveState { UNIT_ACTIVE, - UNIT_ACTIVE_RELOADING, + UNIT_RELOADING, UNIT_INACTIVE, - UNIT_INACTIVE_MAINTENANCE, + UNIT_MAINTENANCE, UNIT_ACTIVATING, UNIT_DEACTIVATING, _UNIT_ACTIVE_STATE_MAX, @@ -88,19 +88,19 @@ enum UnitActiveState { }; static inline bool UNIT_IS_ACTIVE_OR_RELOADING(UnitActiveState t) { - return t == UNIT_ACTIVE || t == UNIT_ACTIVE_RELOADING; + return t == UNIT_ACTIVE || t == UNIT_RELOADING; } static inline bool UNIT_IS_ACTIVE_OR_ACTIVATING(UnitActiveState t) { - return t == UNIT_ACTIVE || t == UNIT_ACTIVATING || t == UNIT_ACTIVE_RELOADING; + return t == UNIT_ACTIVE || t == UNIT_ACTIVATING || t == UNIT_RELOADING; } static inline bool UNIT_IS_INACTIVE_OR_DEACTIVATING(UnitActiveState t) { - return t == UNIT_INACTIVE || t == UNIT_INACTIVE_MAINTENANCE || t == UNIT_DEACTIVATING; + return t == UNIT_INACTIVE || t == UNIT_MAINTENANCE || t == UNIT_DEACTIVATING; } static inline bool UNIT_IS_INACTIVE_OR_MAINTENANCE(UnitActiveState t) { - return t == UNIT_INACTIVE || t == UNIT_INACTIVE_MAINTENANCE; + return t == UNIT_INACTIVE || t == UNIT_MAINTENANCE; } enum UnitDependency { @@ -367,8 +367,13 @@ void unit_free(Unit *u); int unit_add_name(Unit *u, const char *name); int unit_add_dependency(Unit *u, UnitDependency d, Unit *other, bool add_reference); +int unit_add_two_dependencies(Unit *u, UnitDependency d, UnitDependency e, Unit *other, bool add_reference); + int unit_add_dependency_by_name(Unit *u, UnitDependency d, const char *name, const char *filename, bool add_reference); +int unit_add_two_dependencies_by_name(Unit *u, UnitDependency d, UnitDependency e, const char *name, const char *path, bool add_reference); + int unit_add_dependency_by_name_inverse(Unit *u, UnitDependency d, const char *name, const char *filename, bool add_reference); +int unit_add_two_dependencies_by_name_inverse(Unit *u, UnitDependency d, UnitDependency e, const char *name, const char *path, bool add_reference); int unit_add_exec_dependencies(Unit *u, ExecContext *c);