Samba4/LDB/Request: Difference between revisions
From SambaWiki
No edit summary |
|||
(7 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
= Enumerations = |
|||
== ldb_request_type == |
|||
<pre> |
|||
enum ldb_request_type { |
|||
LDB_SEARCH, |
|||
LDB_ADD, |
|||
LDB_MODIFY, |
|||
LDB_DELETE, |
|||
LDB_RENAME, |
|||
LDB_EXTENDED, |
|||
LDB_REQ_REGISTER_CONTROL, |
|||
LDB_REQ_REGISTER_PARTITION |
|||
}; |
|||
</pre> |
|||
== ldb_scope == |
|||
<pre> |
|||
enum ldb_scope { |
|||
LDB_SCOPE_DEFAULT=-1, |
|||
LDB_SCOPE_BASE=0, |
|||
LDB_SCOPE_ONELEVEL=1, |
|||
LDB_SCOPE_SUBTREE=2}; |
|||
</pre> |
|||
= Structures = |
= Structures = |
||
== ldb_search == |
|||
<pre> |
|||
struct ldb_search { |
|||
struct ldb_dn *base; |
|||
enum ldb_scope scope; |
|||
struct ldb_parse_tree *tree; |
|||
const char * const *attrs; |
|||
struct ldb_result *res; |
|||
}; |
|||
</pre> |
|||
== ldb_add == |
|||
<pre> |
|||
struct ldb_add { |
|||
const struct ldb_message *message; |
|||
}; |
|||
</pre> |
|||
== ldb_modify == |
|||
<pre> |
|||
struct ldb_modify { |
|||
const struct ldb_message *message; |
|||
}; |
|||
</pre> |
|||
== ldb_delete == |
|||
<pre> |
|||
struct ldb_delete { |
|||
struct ldb_dn *dn; |
|||
}; |
|||
</pre> |
|||
== ldb_rename == |
|||
<pre> |
|||
struct ldb_rename { |
|||
struct ldb_dn *olddn; |
|||
struct ldb_dn *newdn; |
|||
}; |
|||
</pre> |
|||
== ldb_extended == |
|||
<pre> |
|||
struct ldb_extended { |
|||
const char *oid; |
|||
void *data; |
|||
}; |
|||
</pre> |
|||
== ldb_register_control == |
|||
<pre> |
|||
struct ldb_register_control { |
|||
const char *oid; |
|||
}; |
|||
</pre> |
|||
== ldb_register_partition == |
|||
<pre> |
|||
struct ldb_register_partition { |
|||
struct ldb_dn *dn; |
|||
}; |
|||
</pre> |
|||
== ldb_request == |
|||
<pre> |
<pre> |
Latest revision as of 17:45, 2 February 2010
Enumerations
ldb_request_type
enum ldb_request_type { LDB_SEARCH, LDB_ADD, LDB_MODIFY, LDB_DELETE, LDB_RENAME, LDB_EXTENDED, LDB_REQ_REGISTER_CONTROL, LDB_REQ_REGISTER_PARTITION };
ldb_scope
enum ldb_scope { LDB_SCOPE_DEFAULT=-1, LDB_SCOPE_BASE=0, LDB_SCOPE_ONELEVEL=1, LDB_SCOPE_SUBTREE=2};
Structures
ldb_search
struct ldb_search { struct ldb_dn *base; enum ldb_scope scope; struct ldb_parse_tree *tree; const char * const *attrs; struct ldb_result *res; };
ldb_add
struct ldb_add { const struct ldb_message *message; };
ldb_modify
struct ldb_modify { const struct ldb_message *message; };
ldb_delete
struct ldb_delete { struct ldb_dn *dn; };
ldb_rename
struct ldb_rename { struct ldb_dn *olddn; struct ldb_dn *newdn; };
ldb_extended
struct ldb_extended { const char *oid; void *data; };
ldb_register_control
struct ldb_register_control { const char *oid; };
ldb_register_partition
struct ldb_register_partition { struct ldb_dn *dn; };
ldb_request
struct ldb_request { enum ldb_request_type operation; union { struct ldb_search search; struct ldb_add add; struct ldb_modify mod; struct ldb_delete del; struct ldb_rename rename; struct ldb_extended extended; struct ldb_register_control reg_control; struct ldb_register_partition reg_partition; } op; struct ldb_control **controls; void *context; ldb_request_callback_t callback; int timeout; time_t starttime; struct ldb_handle *handle; };
Operations
ldb_request()
int ldb_request(struct ldb_context *ldb, struct ldb_request *request);
ldb_request_done()
int ldb_request_done(struct ldb_request *req, int status);
ldb_request_is_done()
bool ldb_request_is_done(struct ldb_request *req);