summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/include/ldb.h
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib/ldb/include/ldb.h')
-rw-r--r--source4/lib/ldb/include/ldb.h46
1 files changed, 46 insertions, 0 deletions
diff --git a/source4/lib/ldb/include/ldb.h b/source4/lib/ldb/include/ldb.h
index a6cec7f774..4a40e34363 100644
--- a/source4/lib/ldb/include/ldb.h
+++ b/source4/lib/ldb/include/ldb.h
@@ -560,15 +560,51 @@ enum ldb_request_type {
LDB_REQ_MODIFY,
LDB_REQ_DELETE,
LDB_REQ_RENAME,
+ LDB_ASYNC_SEARCH,
+ LDB_ASYNC_ADD,
+ LDB_ASYNC_MODIFY,
+ LDB_ASYNC_DELETE,
+ LDB_ASYNC_RENAME,
+
LDB_REQ_REGISTER
};
+enum ldb_reply_type {
+ LDB_REPLY_ENTRY,
+ LDB_REPLY_REFERRAL,
+ LDB_REPLY_DONE
+};
+
+enum ldb_async_wait_type {
+ LDB_WAIT_ALL,
+ LDB_WAIT_NONE
+};
+
+enum ldb_async_state {
+ LDB_ASYNC_PENDING,
+ LDB_ASYNC_DONE
+};
+
struct ldb_result {
unsigned int count;
struct ldb_message **msgs;
+ char **refs;
struct ldb_control **controls;
};
+struct ldb_async_result {
+ enum ldb_reply_type type;
+ struct ldb_message *message;
+ char *referral;
+ struct ldb_control **controls;
+};
+
+struct ldb_async_handle {
+ int status;
+ enum ldb_async_state state;
+ void *private_data;
+};
+
struct ldb_search {
const struct ldb_dn *base;
enum ldb_scope scope;
@@ -613,10 +649,20 @@ struct ldb_request {
struct ldb_control **controls;
struct ldb_credentials *creds;
+
+ struct {
+ void *context;
+ int (*callback)(struct ldb_context *, void *, struct ldb_async_result *);
+
+ time_t timeout;
+ struct ldb_async_handle *handle;
+ } async;
};
int ldb_request(struct ldb_context *ldb, struct ldb_request *request);
+int ldb_async_wait(struct ldb_context *ldb, struct ldb_async_handle *handle, enum ldb_async_wait_type type);
+
/**
Initialise an ldb context