2006-04-03 10:46:55 +04:00
/*
Unix SMB / CIFS implementation .
Copyright ( C ) Andrew Tridgell 2006
This program is free software ; you can redistribute it and / or modify
it under the terms of the GNU General Public License as published by
2007-07-10 06:07:03 +04:00
the Free Software Foundation ; either version 3 of the License , or
2006-04-03 10:46:55 +04:00
( at your option ) any later version .
This program is distributed in the hope that it will be useful ,
but WITHOUT ANY WARRANTY ; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the
GNU General Public License for more details .
You should have received a copy of the GNU General Public License
2007-07-10 06:07:03 +04:00
along with this program . If not , see < http : //www.gnu.org/licenses/>.
2006-04-03 10:46:55 +04:00
*/
2011-05-02 05:10:12 +04:00
# include "librpc/gen_ndr/notify.h"
2006-07-23 22:43:07 +04:00
# include "param/share.h"
2006-04-03 10:46:55 +04:00
struct sys_notify_context ;
typedef void ( * sys_notify_callback_t ) ( struct sys_notify_context * ,
void * , struct notify_event * ev ) ;
2006-04-05 09:54:10 +04:00
typedef NTSTATUS ( * notify_watch_t ) ( struct sys_notify_context * ctx ,
2006-04-07 17:15:46 +04:00
struct notify_entry * e ,
2007-01-28 20:03:10 +03:00
sys_notify_callback_t callback ,
void * private_data ,
void * handle_p ) ;
2006-04-05 09:54:10 +04:00
2006-04-03 10:46:55 +04:00
struct sys_notify_context {
2008-12-29 22:24:57 +03:00
struct tevent_context * ev ;
2007-01-28 20:03:10 +03:00
void * private_data ; /* for use of backend */
2006-04-03 10:46:55 +04:00
const char * name ;
2006-04-05 09:54:10 +04:00
notify_watch_t notify_watch ;
2006-04-03 10:46:55 +04:00
} ;
struct sys_notify_backend {
const char * name ;
2006-04-05 09:54:10 +04:00
notify_watch_t notify_watch ;
2006-04-03 10:46:55 +04:00
} ;
NTSTATUS sys_notify_register ( struct sys_notify_backend * backend ) ;
2006-07-23 22:43:07 +04:00
struct sys_notify_context * sys_notify_context_create ( struct share_config * scfg ,
2006-04-07 17:15:46 +04:00
TALLOC_CTX * mem_ctx ,
2008-12-29 22:24:57 +03:00
struct tevent_context * ev ) ;
2006-04-05 09:54:10 +04:00
NTSTATUS sys_notify_watch ( struct sys_notify_context * ctx , struct notify_entry * e ,
2007-01-28 20:03:10 +03:00
sys_notify_callback_t callback , void * private_data ,
void * handle ) ;
2006-04-07 17:15:46 +04:00
NTSTATUS sys_notify_init ( void ) ;