chiark / gitweb /
various cleanups
[elogind.git] / name.h
diff --git a/name.h b/name.h
index 9c638f3f734a5aadfa3e4b3c625582ad41ad6513..8a4c1744f4bcf2ba6b176bf4a2d29d74ce2acee6 100644 (file)
--- a/name.h
+++ b/name.h
@@ -75,6 +75,8 @@ enum NameDependency {
         NAME_WANTS,
         NAME_REQUISITE,
         NAME_SOFT_REQUISITE,
         NAME_WANTS,
         NAME_REQUISITE,
         NAME_SOFT_REQUISITE,
+
+        /* Inverse of the above */
         NAME_REQUIRED_BY,       /* inverse of 'requires' and 'requisite' is 'required_by' */
         NAME_SOFT_REQUIRED_BY,  /* inverse of 'soft_requires' and 'soft_requisite' is 'soft_required_by' */
         NAME_WANTED_BY,         /* inverse of 'wants' */
         NAME_REQUIRED_BY,       /* inverse of 'requires' and 'requisite' is 'required_by' */
         NAME_SOFT_REQUIRED_BY,  /* inverse of 'soft_requires' and 'soft_requisite' is 'soft_required_by' */
         NAME_WANTED_BY,         /* inverse of 'wants' */
@@ -85,7 +87,9 @@ enum NameDependency {
         /* Order */
         NAME_BEFORE,            /* inverse of before is after and vice versa */
         NAME_AFTER,
         /* Order */
         NAME_BEFORE,            /* inverse of before is after and vice versa */
         NAME_AFTER,
-        _NAME_DEPENDENCY_MAX
+
+        _NAME_DEPENDENCY_MAX,
+        _NAME_DEPENDENCY_INVALID = -1
 };
 
 struct Meta {
 };
 
 struct Meta {
@@ -230,4 +234,6 @@ char *name_change_suffix(const char *t, const char *suffix);
 
 bool name_job_is_applicable(Name *n, JobType j);
 
 
 bool name_job_is_applicable(Name *n, JobType j);
 
+int name_add_dependency(Name *n, NameDependency d, Name *other);
+
 #endif
 #endif