diff options
Diffstat (limited to 'lib/tevent/tevent.h')
-rw-r--r-- | lib/tevent/tevent.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/tevent/tevent.h b/lib/tevent/tevent.h index 56ae0ee082..d3556053ac 100644 --- a/lib/tevent/tevent.h +++ b/lib/tevent/tevent.h @@ -238,6 +238,14 @@ char *tevent_req_default_print(struct tevent_req *req, TALLOC_CTX *mem_ctx); char *tevent_req_print(TALLOC_CTX *mem_ctx, struct tevent_req *req); +typedef bool (*tevent_req_cancel_fn)(struct tevent_req *); + +void tevent_req_set_cancel_fn(struct tevent_req *req, tevent_req_cancel_fn fn); + +bool _tevent_req_cancel(struct tevent_req *req, const char *location); +#define tevent_req_cancel(req) \ + _tevent_req_cancel(req, __location__) + struct tevent_req *_tevent_req_create(TALLOC_CTX *mem_ctx, void *pstate, size_t state_size, |