summaryrefslogtreecommitdiff
path: root/source3/include/event.h
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2009-01-05 09:06:05 +0100
committerStefan Metzmacher <metze@samba.org>2009-01-05 15:07:34 +0100
commitee5be748e64f6c8f4814ff322e38511a9a65f4fc (patch)
tree2415ee09987ef26edaf9cd33e675d78a9e2de5f9 /source3/include/event.h
parent077d5cff71bdb95f5829ae27309958e4661e4184 (diff)
downloadsamba-ee5be748e64f6c8f4814ff322e38511a9a65f4fc.tar.gz
s3:events: move prototypes to event.h
metze
Diffstat (limited to 'source3/include/event.h')
-rw-r--r--source3/include/event.h44
1 files changed, 44 insertions, 0 deletions
diff --git a/source3/include/event.h b/source3/include/event.h
index 0465fae471f..ebbf9c9f639 100644
--- a/source3/include/event.h
+++ b/source3/include/event.h
@@ -18,7 +18,51 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+struct event_context;
+struct fd_event;
+struct timed_event;
+
/* bits for file descriptor event flags */
#define EVENT_FD_READ 1
#define EVENT_FD_WRITE 2
+/* The following definitions come from lib/events.c */
+
+struct timed_event *event_add_timed(struct event_context *event_ctx,
+ TALLOC_CTX *mem_ctx,
+ struct timeval when,
+ const char *event_name,
+ void (*handler)(struct event_context *event_ctx,
+ struct timed_event *te,
+ const struct timeval *now,
+ void *private_data),
+ void *private_data);
+struct fd_event *event_add_fd(struct event_context *event_ctx,
+ TALLOC_CTX *mem_ctx,
+ int fd, uint16_t flags,
+ void (*handler)(struct event_context *event_ctx,
+ struct fd_event *event,
+ uint16 flags,
+ void *private_data),
+ void *private_data);
+void event_fd_set_writeable(struct fd_event *fde);
+void event_fd_set_not_writeable(struct fd_event *fde);
+void event_fd_set_readable(struct fd_event *fde);
+void event_fd_set_not_readable(struct fd_event *fde);
+bool event_add_to_select_args(struct event_context *event_ctx,
+ const struct timeval *now,
+ fd_set *read_fds, fd_set *write_fds,
+ struct timeval *timeout, int *maxfd);
+bool run_events(struct event_context *event_ctx,
+ int selrtn, fd_set *read_fds, fd_set *write_fds);
+struct timeval *get_timed_events_timeout(struct event_context *event_ctx,
+ struct timeval *to_ret);
+int event_loop_once(struct event_context *ev);
+void event_context_reinit(struct event_context *ev);
+struct event_context *event_context_init(TALLOC_CTX *mem_ctx);
+int set_event_dispatch_time(struct event_context *event_ctx,
+ const char *event_name, struct timeval when);
+int cancel_named_event(struct event_context *event_ctx,
+ const char *event_name);
+void dump_event_list(struct event_context *event_ctx);
+