diff options
author | Andrew Tridgell <tridge@samba.org> | 2006-04-05 05:54:10 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:00:17 -0500 |
commit | 416d7b421001d00c4d494fceb4f2d0ab3e30cfaf (patch) | |
tree | 5551bf9f5e19d758417dff28b6b80fea16ad7b0c /source4/ntvfs/sysdep/sys_notify.h | |
parent | bacf1152fc711560ed141fa8e6e470cbd9de6efc (diff) | |
download | samba-416d7b421001d00c4d494fceb4f2d0ab3e30cfaf.tar.gz samba-416d7b421001d00c4d494fceb4f2d0ab3e30cfaf.tar.xz samba-416d7b421001d00c4d494fceb4f2d0ab3e30cfaf.zip |
r14920: allow a notify backend to separately specify if it has handled the
given mask for the current directory and sub-directories. This allows
us to setup the less efficient internal handling for subdirectories,
while using the kernel inotify service for the current directory if
available. It also allows inotify to handle only some of the filter
bits, leaving the other filter bits for the user space handler.
(This used to be commit 7c3d989fa44c7f57853a825337159f476d7dff80)
Diffstat (limited to 'source4/ntvfs/sysdep/sys_notify.h')
-rw-r--r-- | source4/ntvfs/sysdep/sys_notify.h | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/source4/ntvfs/sysdep/sys_notify.h b/source4/ntvfs/sysdep/sys_notify.h index 9ad5ed7555b..9cb01a1db47 100644 --- a/source4/ntvfs/sysdep/sys_notify.h +++ b/source4/ntvfs/sysdep/sys_notify.h @@ -25,28 +25,27 @@ struct sys_notify_context; typedef void (*sys_notify_callback_t)(struct sys_notify_context *, void *, struct notify_event *ev); +typedef NTSTATUS (*notify_watch_t)(struct sys_notify_context *ctx, + struct notify_event *e, + sys_notify_callback_t callback, void *private, + void **handle); + struct sys_notify_context { struct event_context *ev; void *private; /* for use of backend */ - NTSTATUS (*notify_watch)(struct sys_notify_context *ctx, const char *dirpath, - uint32_t filter, sys_notify_callback_t callback, - void *private, void **handle); const char *name; + notify_watch_t notify_watch; }; struct sys_notify_backend { - struct sys_notify_backend *next, *prev; const char *name; - NTSTATUS (*notify_watch)(struct sys_notify_context *ctx, const char *dirpath, - uint32_t filter, sys_notify_callback_t callback, - void *private, void **handle); + notify_watch_t notify_watch; }; NTSTATUS sys_notify_register(struct sys_notify_backend *backend); struct sys_notify_context *sys_notify_init(int snum, TALLOC_CTX *mem_ctx, struct event_context *ev); -NTSTATUS sys_notify_watch(struct sys_notify_context *ctx, const char *dirpath, - uint32_t filter, sys_notify_callback_t callback, - void *private, void **handle); - +NTSTATUS sys_notify_watch(struct sys_notify_context *ctx, struct notify_entry *e, + sys_notify_callback_t callback, void *private, + void **handle); |