diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2009-01-04 22:48:23 +0100 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2009-01-04 22:48:23 +0100 |
commit | af744e0954bbe9ddfa2e3da173e79de65e640a4c (patch) | |
tree | 78b98c28e6d54c5339c12f2f942883d5088fda84 /source3/include/async_req.h | |
parent | ce47b69d8e318bbb3642d27aa0451e2914c92be7 (diff) | |
parent | 2c0faaf5d921fe57a88d3b999067458e8774c6f6 (diff) | |
download | samba-af744e0954bbe9ddfa2e3da173e79de65e640a4c.tar.gz samba-af744e0954bbe9ddfa2e3da173e79de65e640a4c.tar.bz2 samba-af744e0954bbe9ddfa2e3da173e79de65e640a4c.zip |
Merge branch 'master' of ssh://git.samba.org/data/git/samba
Diffstat (limited to 'source3/include/async_req.h')
-rw-r--r-- | source3/include/async_req.h | 30 |
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 |