tevent_common_fd_set_close_fn: void (struct tevent_fd *, tevent_fd_close_fn_t)
tevent_common_fd_set_flags: void (struct tevent_fd *, uint16_t)
tevent_common_have_events: bool (struct tevent_context *)
+tevent_common_immediate_cancel: void (struct tevent_immediate *)
tevent_common_invoke_fd_handler: int (struct tevent_fd *, uint16_t, bool *)
tevent_common_invoke_immediate_handler: int (struct tevent_immediate *, bool *)
tevent_common_invoke_signal_handler: int (struct tevent_signal *, int, int, void *, bool *)
tevent_req_set_endtime: bool (struct tevent_req *, struct tevent_context *, struct timeval)
tevent_req_set_print_fn: void (struct tevent_req *, tevent_req_print_fn)
tevent_req_set_profile: bool (struct tevent_req *)
+tevent_reset_immediate: void (struct tevent_immediate *)
tevent_sa_info_queue_count: size_t (void)
tevent_set_abort_fn: void (void (*)(const char *))
tevent_set_debug: int (struct tevent_context *, void (*)(void *, enum tevent_debug_level, const char *, va_list), void *)
handler_name, location);
}
+/*
+ reset an immediate event
+*/
+void tevent_reset_immediate(struct tevent_immediate *im)
+{
+ tevent_common_immediate_cancel(im);
+}
+
/*
add a signal event
* @param[in] ctx The tevent_context to run this event
* @param[in] handler The event handler to run when this event fires
* @param[in] private_data Data to pass to the event handler
+ *
+ * @note To cancel an immediate handler, call talloc_free() on the event returned
+ * from tevent_create_immediate() or call tevent_reset_immediate() to
+ * keep the structure alive for later usage.
+ *
+ * @see tevent_create_immediate, tevent_reset_immediate
*/
void tevent_schedule_immediate(struct tevent_immediate *im,
struct tevent_context *ctx,
#handler, __location__);
#endif
+/**
+ * Reset an event for immediate execution.
+ *
+ * Undo the effect of tevent_schedule_immediate().
+ *
+ * @param[in] im The tevent_immediate object to clear the handler
+ *
+ * @see tevent_schedule_immediate.
+ */
+void tevent_reset_immediate(struct tevent_immediate *im);
+
/**
* @brief Associate a custom tag with the event.
*
#include "tevent_internal.h"
#include "tevent_util.h"
-static void tevent_common_immediate_cancel(struct tevent_immediate *im)
+void tevent_common_immediate_cancel(struct tevent_immediate *im)
{
const char *create_location = im->create_location;
bool busy = im->busy;
struct timeval current_time,
bool *removed);
+void tevent_common_immediate_cancel(struct tevent_immediate *im);
void tevent_common_schedule_immediate(struct tevent_immediate *im,
struct tevent_context *ev,
tevent_immediate_handler_t handler,