summaryrefslogtreecommitdiff
path: root/name.h
diff options
context:
space:
mode:
Diffstat (limited to 'name.h')
-rw-r--r--name.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/name.h b/name.h
index 8c526baed6..59f3b16f17 100644
--- a/name.h
+++ b/name.h
@@ -140,9 +140,16 @@ struct NameVTable {
* a simpler one that the engine can understand */
NameActiveState (*active_state)(Name *n);
+ void (*fd_event)(Name *n, int fd, uint32_t events);
+ void (*sigchld_event)(Name *n, pid_t pid, int code, int status);
+
void (*free_hook)(Name *n);
};
+extern const NameVTable * const name_vtable[_NAME_TYPE_MAX];
+
+#define NAME_VTABLE(n) name_vtable[(n)->meta.type]
+
/* For casting a name into the various name types */
#define DEFINE_CAST(UPPERCASE, MixedCase) \
static inline MixedCase* UPPERCASE(Name *name) { \
@@ -191,4 +198,10 @@ int name_reload(Name *n);
void name_notify(Name *n, NameActiveState os, NameActiveState ns);
+int name_watch_fd(Name *n, int fd, uint32_t events);
+void name_unwatch_fd(Name *n, int fd);
+
+int name_watch_pid(Name *n, pid_t pid);
+void name_unwatch_pid(Name *n, pid_t pid);
+
#endif