summaryrefslogtreecommitdiff
path: root/source3/include/async_req.h
diff options
context:
space:
mode:
Diffstat (limited to 'source3/include/async_req.h')
-rw-r--r--source3/include/async_req.h30
1 files changed, 21 insertions, 9 deletions
diff --git a/source3/include/async_req.h b/source3/include/async_req.h
index 14a30696c4..1b8dbf3346 100644
--- a/source3/include/async_req.h
+++ b/source3/include/async_req.h
@@ -97,13 +97,6 @@ struct async_req {
NTSTATUS status;
/**
- * @brief The event context we are using
- *
- * The event context that this async request works on.
- */
- struct event_context *event_ctx;
-
- /**
* @brief What to do on completion
*
* This is used for the user of an async request, fn is called when
@@ -122,7 +115,7 @@ struct async_req {
} async;
};
-struct async_req *async_req_new(TALLOC_CTX *mem_ctx, struct event_context *ev);
+struct async_req *async_req_new(TALLOC_CTX *mem_ctx);
char *async_req_print(TALLOC_CTX *mem_ctx, struct async_req *req);
@@ -130,7 +123,8 @@ void async_req_done(struct async_req *req);
void async_req_error(struct async_req *req, NTSTATUS status);
-bool async_post_status(struct async_req *req, NTSTATUS status);
+bool async_post_status(struct async_req *req, struct event_context *ev,
+ NTSTATUS status);
bool async_req_nomem(const void *p, struct async_req *req);
@@ -138,4 +132,22 @@ bool async_req_is_error(struct async_req *req, NTSTATUS *status);
NTSTATUS async_req_simple_recv(struct async_req *req);
+bool async_req_set_timeout(struct async_req *req, struct event_context *ev,
+ struct timeval to);
+
+struct async_req *async_wait_send(TALLOC_CTX *mem_ctx,
+ struct event_context *ev,
+ struct timeval to);
+
+NTSTATUS async_wait_recv(struct async_req *req);
+
+struct async_req_queue;
+
+struct async_req_queue *async_req_queue_init(TALLOC_CTX *mem_ctx);
+
+bool async_req_enqueue(struct async_req_queue *queue,
+ struct event_context *ev,
+ struct async_req *req,
+ void (*trigger)(struct async_req *req));
+
#endif