summaryrefslogtreecommitdiff
path: root/lib/async_req/async_req.h
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2009-02-01 16:32:02 +0100
committerVolker Lendecke <vl@samba.org>2009-02-01 19:05:39 +0100
commitc14b7e648bcfc4865da4b290e46977fff81d4500 (patch)
tree0986bdd1520bf5df0d17d05f35873154756331cb /lib/async_req/async_req.h
parent0931bb8937eaec55844dee0cdeefafa162053c53 (diff)
downloadsamba-c14b7e648bcfc4865da4b290e46977fff81d4500.tar.gz
samba-c14b7e648bcfc4865da4b290e46977fff81d4500.tar.bz2
samba-c14b7e648bcfc4865da4b290e46977fff81d4500.zip
Split up async_req into a generic and a NTSTATUS specific part
Diffstat (limited to 'lib/async_req/async_req.h')
-rw-r--r--lib/async_req/async_req.h20
1 files changed, 8 insertions, 12 deletions
diff --git a/lib/async_req/async_req.h b/lib/async_req/async_req.h
index 59f5bd19b2..19b052a788 100644
--- a/lib/async_req/async_req.h
+++ b/lib/async_req/async_req.h
@@ -20,7 +20,7 @@
#ifndef __ASYNC_REQ_H__
#define __ASYNC_REQ_H__
-#include "includes.h"
+#include "lib/talloc/talloc.h"
/**
* An async request moves between the following 4 states:
@@ -92,9 +92,9 @@ struct async_req {
* @brief status code when finished
*
* This status can be queried in the async completion function. It
- * will be set to NT_STATUS_OK when everything went fine.
+ * will be set to 0 when everything went fine.
**/
- NTSTATUS status;
+ uint32_t error;
/**
* @brief What to do on completion
@@ -121,16 +121,12 @@ char *async_req_print(TALLOC_CTX *mem_ctx, struct async_req *req);
void async_req_done(struct async_req *req);
-void async_req_error(struct async_req *req, NTSTATUS status);
+void async_req_error(struct async_req *req, uint32_t error);
-bool async_post_status(struct async_req *req, struct tevent_context *ev,
- NTSTATUS status);
+bool async_post_error(struct async_req *req, struct tevent_context *ev,
+ uint32_t error);
-bool async_req_nomem(const void *p, struct async_req *req);
-
-bool async_req_is_error(struct async_req *req, NTSTATUS *status);
-
-NTSTATUS async_req_simple_recv(struct async_req *req);
+bool async_req_is_error(struct async_req *req, uint32_t *error);
bool async_req_set_timeout(struct async_req *req, struct tevent_context *ev,
struct timeval to);
@@ -139,7 +135,7 @@ struct async_req *async_wait_send(TALLOC_CTX *mem_ctx,
struct tevent_context *ev,
struct timeval to);
-NTSTATUS async_wait_recv(struct async_req *req);
+bool async_wait_recv(struct async_req *req);
struct async_req_queue;