X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=name.h;h=8a4c1744f4bcf2ba6b176bf4a2d29d74ce2acee6;hp=9c638f3f734a5aadfa3e4b3c625582ad41ad6513;hb=44d8db9e5aa86165c97289f6c78a7e42bac78362;hpb=75787bb7136e064ee623aaee00ec76a7f024c91a diff --git a/name.h b/name.h index 9c638f3f7..8a4c1744f 100644 --- a/name.h +++ b/name.h @@ -75,6 +75,8 @@ enum NameDependency { 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' */ @@ -85,7 +87,9 @@ enum NameDependency { /* 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 { @@ -230,4 +234,6 @@ char *name_change_suffix(const char *t, const char *suffix); bool name_job_is_applicable(Name *n, JobType j); +int name_add_dependency(Name *n, NameDependency d, Name *other); + #endif