source: trunk/server/source4/ntvfs/sysdep/sys_notify.h

Last change on this file was 745, checked in by Silvan Scherrer, 13 years ago

Samba Server: updated trunk to 3.6.0

File size: 1.8 KB
Line 
1/*
2 Unix SMB/CIFS implementation.
3
4 Copyright (C) Andrew Tridgell 2006
5
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 3 of the License, or
9 (at your option) any later version.
10
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with this program. If not, see <http://www.gnu.org/licenses/>.
18*/
19
20#include "librpc/gen_ndr/s4_notify.h"
21#include "param/share.h"
22
23struct sys_notify_context;
24
25typedef void (*sys_notify_callback_t)(struct sys_notify_context *,
26 void *, struct notify_event *ev);
27
28typedef NTSTATUS (*notify_watch_t)(struct sys_notify_context *ctx,
29 struct notify_entry *e,
30 sys_notify_callback_t callback,
31 void *private_data,
32 void *handle_p);
33
34struct sys_notify_context {
35 struct tevent_context *ev;
36 void *private_data; /* for use of backend */
37 const char *name;
38 notify_watch_t notify_watch;
39};
40
41struct sys_notify_backend {
42 const char *name;
43 notify_watch_t notify_watch;
44};
45
46NTSTATUS sys_notify_register(struct sys_notify_backend *backend);
47struct sys_notify_context *sys_notify_context_create(struct share_config *scfg,
48 TALLOC_CTX *mem_ctx,
49 struct tevent_context *ev);
50NTSTATUS sys_notify_watch(struct sys_notify_context *ctx, struct notify_entry *e,
51 sys_notify_callback_t callback, void *private_data,
52 void *handle);
53NTSTATUS sys_notify_init(void);
Note: See TracBrowser for help on using the repository browser.