chiark / gitweb /
don't care about syslog when starting up
[elogind.git] / name.h
diff --git a/name.h b/name.h
index 9c638f3f734a5aadfa3e4b3c625582ad41ad6513..17bb35d6a74e197c5ccba3aca693007421c81c24 100644 (file)
--- a/name.h
+++ b/name.h
@@ -31,7 +31,7 @@ enum NameType {
         NAME_SERVICE = 0,
         NAME_TIMER,
         NAME_SOCKET,
-        NAME_MILESTONE,
+        NAME_TARGET,
         NAME_DEVICE,
         NAME_MOUNT,
         NAME_AUTOMOUNT,
@@ -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 {
@@ -117,7 +121,7 @@ struct Meta {
 #include "service.h"
 #include "timer.h"
 #include "socket.h"
-#include "milestone.h"
+#include "target.h"
 #include "device.h"
 #include "mount.h"
 #include "automount.h"
@@ -128,7 +132,7 @@ union Name {
         Service service;
         Timer timer;
         Socket socket;
-        Milestone milestone;
+        Target target;
         Device device;
         Mount mount;
         Automount automount;
@@ -180,7 +184,7 @@ extern const NameVTable * const name_vtable[_NAME_TYPE_MAX];
 DEFINE_CAST(SOCKET, Socket);
 DEFINE_CAST(TIMER, Timer);
 DEFINE_CAST(SERVICE, Service);
-DEFINE_CAST(MILESTONE, Milestone);
+DEFINE_CAST(TARGET, Target);
 DEFINE_CAST(DEVICE, Device);
 DEFINE_CAST(MOUNT, Mount);
 DEFINE_CAST(AUTOMOUNT, Automount);
@@ -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