diff options
author | Stefan Metzmacher <metze@samba.org> | 2009-08-15 09:46:23 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2009-08-17 09:25:44 +0200 |
commit | 45e4be0d96abdc729252df1e97bb9a56302e5a4a (patch) | |
tree | a9bcfc8d68dee0b58d6534029c9012733b588484 /lib/tevent/tevent_internal.h | |
parent | 26e114b83ce1de7515bfbf365da03ec3f18c95fd (diff) | |
download | samba-45e4be0d96abdc729252df1e97bb9a56302e5a4a.tar.gz samba-45e4be0d96abdc729252df1e97bb9a56302e5a4a.tar.bz2 samba-45e4be0d96abdc729252df1e97bb9a56302e5a4a.zip |
tevent: add tevent_req_cancel() infrastructure
This offers a generic way for callers to cancel an
async request.
metze
Diffstat (limited to 'lib/tevent/tevent_internal.h')
-rw-r--r-- | lib/tevent/tevent_internal.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/tevent/tevent_internal.h b/lib/tevent/tevent_internal.h index e260524208..513ca1c732 100644 --- a/lib/tevent/tevent_internal.h +++ b/lib/tevent/tevent_internal.h @@ -65,6 +65,15 @@ struct tevent_req { tevent_req_print_fn private_print; /** + * @brief A function to cancel the request + * + * The implementation might want to set a function + * that is called when the tevent_req_cancel() function + * was called. + */ + tevent_req_cancel_fn private_cancel; + + /** * @brief Internal state of the request * * Callers should only access this via functions and never directly. @@ -100,6 +109,16 @@ struct tevent_req { const char *finish_location; /** + * @brief The location where the request was canceled + * + * This uses the __location__ macro via the + * tevent_req_cancel() macro. + * + * This for debugging only. + */ + const char *cancel_location; + + /** * @brief The external state - will be queried by the caller * * While the async request is being processed, state will remain in |