root/source4/ntvfs/sysdep/sys_notify.h

/* [<][>][^][v][top][bottom][index][help] */

INCLUDED FROM


   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/notify.h"
  21 #include "param/share.h"
  22 
  23 struct sys_notify_context;
  24 
  25 typedef void (*sys_notify_callback_t)(struct sys_notify_context *, 
  26                                       void *, struct notify_event *ev);
  27 
  28 typedef 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 
  34 struct 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 
  41 struct sys_notify_backend {
  42         const char *name;
  43         notify_watch_t notify_watch;
  44 };
  45 
  46 NTSTATUS sys_notify_register(struct sys_notify_backend *backend);
  47 struct sys_notify_context *sys_notify_context_create(struct share_config *scfg,
  48                                                      TALLOC_CTX *mem_ctx, 
  49                                                      struct tevent_context *ev);
  50 NTSTATUS sys_notify_watch(struct sys_notify_context *ctx, struct notify_entry *e,
  51                           sys_notify_callback_t callback, void *private_data, 
  52                           void *handle);
  53 NTSTATUS sys_notify_init(void);

/* [<][>][^][v][top][bottom][index][help] */