* 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) { \
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