s3-misc: Move smb_io_time() to regfio.c
[samba.git] / source3 / include / event.h
1 /*
2    Unix SMB/CIFS implementation.
3    event handling
4    Copyright (C) Andrew Tridgell 1992-1998
5    Copyright (C) Volker Lendecke 2005
6
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.
11
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.
16
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/>.
19 */
20
21 #define TEVENT_COMPAT_DEFINES
22 #include <tevent.h>
23
24 #undef event_context_init
25 #define event_context_init(mem_ctx) s3_tevent_context_init(mem_ctx)
26
27 /* The following definitions come from lib/events.c  */
28
29 bool event_add_to_select_args(struct event_context *event_ctx,
30                               const struct timeval *now,
31                               fd_set *read_fds, fd_set *write_fds,
32                               struct timeval *timeout, int *maxfd);
33 bool run_events(struct event_context *event_ctx,
34                 int selrtn, fd_set *read_fds, fd_set *write_fds);
35 struct timeval *get_timed_events_timeout(struct event_context *event_ctx,
36                                          struct timeval *to_ret);
37 void dump_event_list(struct event_context *event_ctx);
38 struct tevent_context *s3_tevent_context_init(TALLOC_CTX *mem_ctx);
39