diff options
author | Stefan Metzmacher <metze@samba.org> | 2009-01-03 11:27:00 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2009-01-03 19:58:51 +0100 |
commit | e45ed828d042acca09cb1ed5b6dd7a24eb5e7ffd (patch) | |
tree | 87cc211ffd1b8354299ab720446dec89e8b1c18a /lib/tevent/tevent.h | |
parent | e928d863e2bb654d16ac9094e3406ef6a207c023 (diff) | |
download | samba-e45ed828d042acca09cb1ed5b6dd7a24eb5e7ffd.tar.gz samba-e45ed828d042acca09cb1ed5b6dd7a24eb5e7ffd.tar.bz2 samba-e45ed828d042acca09cb1ed5b6dd7a24eb5e7ffd.zip |
tevent: add tevent_fd_set_close_fn()
Let callers specify a close function
as an alternative to TEVENT_FD_AUTOCLOSE.
metze
Diffstat (limited to 'lib/tevent/tevent.h')
-rw-r--r-- | lib/tevent/tevent.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/tevent/tevent.h b/lib/tevent/tevent.h index 3a1b6057fb..9d3b8aa39e 100644 --- a/lib/tevent/tevent.h +++ b/lib/tevent/tevent.h @@ -37,6 +37,10 @@ typedef void (*tevent_fd_handler_t)(struct tevent_context *ev, struct tevent_fd *fde, uint16_t flags, void *private_data); +typedef void (*tevent_fd_close_fn_t)(struct tevent_context *ev, + struct tevent_fd *fde, + int fd, + void *private_data); typedef void (*tevent_timer_handler_t)(struct tevent_context *ev, struct tevent_timer *te, struct timeval current_time, @@ -107,6 +111,8 @@ struct tevent_aio *_tevent_add_aio(struct tevent_context *ev, int tevent_loop_once(struct tevent_context *ev); int tevent_loop_wait(struct tevent_context *ev); +void tevent_fd_set_close_fn(struct tevent_fd *fde, + tevent_fd_close_fn_t close_fn); uint16_t tevent_fd_get_flags(struct tevent_fd *fde); void tevent_fd_set_flags(struct tevent_fd *fde, uint16_t flags); |