s3:nmbd: s/struct event_context/struct tevent_context
[Samba/vl.git] / source3 / include / event.h
blobd5decaa669dec4c22d9d0dc6266b056aa9213fb8
1 /*
2 Unix SMB/CIFS implementation.
3 event handling
4 Copyright (C) Andrew Tridgell 1992-1998
5 Copyright (C) Volker Lendecke 2005-2007
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 3 of the License, or
10 (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program. If not, see <http://www.gnu.org/licenses/>.
21 #define TEVENT_COMPAT_DEFINES
22 #include <tevent.h>
24 /* The following definitions come from lib/events.c */
25 struct pollfd;
26 struct timeval *get_timed_events_timeout(struct tevent_context *event_ctx,
27 struct timeval *to_ret);
28 void dump_event_list(struct tevent_context *event_ctx);
29 struct tevent_context *s3_tevent_context_init(TALLOC_CTX *mem_ctx);
31 bool event_add_to_poll_args(struct tevent_context *ev, TALLOC_CTX *mem_ctx,
32 struct pollfd **pfds, int *num_pfds,
33 int *ptimeout);
34 bool run_events_poll(struct tevent_context *ev, int pollrtn,
35 struct pollfd *pfds, int num_pfds);
37 struct idle_event *event_add_idle(struct tevent_context *event_ctx,
38 TALLOC_CTX *mem_ctx,
39 struct timeval interval,
40 const char *name,
41 bool (*handler)(const struct timeval *now,
42 void *private_data),
43 void *private_data);