tevent: add tevent_req_cancel() infrastructure
[metze/samba/wip.git] / lib / tevent / tevent_internal.h
index e260524208796c7ba5dd3a5595e8dfb0edd6aee6..513ca1c7325b769d2fc0abb325a595c18bfbdf70 100644 (file)
@@ -64,6 +64,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
         *
@@ -99,6 +108,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
                 *