summaryrefslogtreecommitdiff
path: root/source3/include
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2009-06-06 21:06:33 +0200
committerVolker Lendecke <vl@samba.org>2009-06-20 18:54:06 +0200
commit63a70ba0ad306e39311db3145d85323276e02c02 (patch)
tree80d2477357b87cec984e3a4cba73a906ffc4ae53 /source3/include
parent62eb817c06458070d090c1698e9c0a99914c6d78 (diff)
downloadsamba-63a70ba0ad306e39311db3145d85323276e02c02.tar.gz
samba-63a70ba0ad306e39311db3145d85323276e02c02.tar.bz2
samba-63a70ba0ad306e39311db3145d85323276e02c02.zip
Prepare control support
We will have arrays of controls passed to tldap.c. Follow a mantra from the classic book "Thinking Forth" by Leo Brodie: Favor counts over terminators :-) This makes the parameter lists to tldap pretty long, but everyone will have wrapper routines anyway, see for example tldap_search_fmt. And the OpenLDAP manpages call the non-_ext routines deprecated, probably for a reason.
Diffstat (limited to 'source3/include')
-rw-r--r--source3/include/tldap.h52
1 files changed, 33 insertions, 19 deletions
diff --git a/source3/include/tldap.h b/source3/include/tldap.h
index 96272449e5..3da7d69d86 100644
--- a/source3/include/tldap.h
+++ b/source3/include/tldap.h
@@ -58,15 +58,19 @@ struct tevent_req *tldap_sasl_bind_send(TALLOC_CTX *mem_ctx,
const char *dn,
const char *mechanism,
DATA_BLOB *creds,
- struct tldap_control **sctrls,
- struct tldap_control **cctrls);
+ struct tldap_control *sctrls,
+ int num_sctrls,
+ struct tldap_control *cctrls,
+ int num_cctrls);
int tldap_sasl_bind_recv(struct tevent_req *req);
int tldap_sasl_bind(struct tldap_context *ldap,
const char *dn,
const char *mechanism,
DATA_BLOB *creds,
- struct tldap_control **sctrls,
- struct tldap_control **cctrls);
+ struct tldap_control *sctrls,
+ int num_sctrls,
+ struct tldap_control *cctrls,
+ int num_ctrls);
struct tevent_req *tldap_simple_bind_send(TALLOC_CTX *mem_ctx,
struct tevent_context *ev,
@@ -85,8 +89,10 @@ struct tevent_req *tldap_search_send(TALLOC_CTX *mem_ctx,
const char **attrs,
int num_attrs,
int attrsonly,
- struct tldap_control **sctrls,
- struct tldap_control **cctrls,
+ struct tldap_control *sctrls,
+ int num_sctrls,
+ struct tldap_control *cctrls,
+ int num_cctrls,
int timelimit,
int sizelimit,
int deref);
@@ -95,7 +101,8 @@ int tldap_search_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
int tldap_search(struct tldap_context *ld,
const char *base, int scope, const char *filter,
const char **attrs, int num_attrs, int attrsonly,
- struct tldap_control **sctrls, struct tldap_control **cctrls,
+ struct tldap_control *sctrls, int num_sctrls,
+ struct tldap_control *cctrls, int num_cctrls,
int timelimit, int sizelimit, int deref,
TALLOC_CTX *mem_ctx, struct tldap_message ***pentries,
struct tldap_message ***refs);
@@ -107,38 +114,45 @@ struct tevent_req *tldap_add_send(TALLOC_CTX *mem_ctx,
struct tevent_context *ev,
struct tldap_context *ld,
const char *dn,
- int num_attributes,
struct tldap_mod *attributes,
- struct tldap_control **sctrls,
- struct tldap_control **cctrls);
+ int num_attributes,
+ struct tldap_control *sctrls,
+ int num_sctrls,
+ struct tldap_control *cctrls,
+ int num_cctrls);
int tldap_add_recv(struct tevent_req *req);
int tldap_add(struct tldap_context *ld, const char *dn,
int num_attributes, struct tldap_mod *attributes,
- struct tldap_control **sctrls, struct tldap_control **cctrls);
+ struct tldap_control *sctrls, int num_sctrls,
+ struct tldap_control *cctrls, int num_cctrls);
struct tevent_req *tldap_modify_send(TALLOC_CTX *mem_ctx,
struct tevent_context *ev,
struct tldap_context *ld,
const char *dn,
int num_mods, struct tldap_mod *mods,
- struct tldap_control **sctrls,
- struct tldap_control **cctrls);
+ struct tldap_control *sctrls,
+ int num_sctrls,
+ struct tldap_control *cctrls,
+ int num_cctrls);
int tldap_modify_recv(struct tevent_req *req);
int tldap_modify(struct tldap_context *ld, const char *dn,
int num_mods, struct tldap_mod *mods,
- struct tldap_control **sctrls, struct tldap_control **cctrls);
-
+ struct tldap_control *sctrls, int num_sctrls,
+ struct tldap_control *cctrls, int num_cctrls);
struct tevent_req *tldap_delete_send(TALLOC_CTX *mem_ctx,
struct tevent_context *ev,
struct tldap_context *ld,
const char *dn,
- struct tldap_control **sctrls,
- struct tldap_control **cctrls);
+ struct tldap_control *sctrls,
+ int num_sctrls,
+ struct tldap_control *cctrls,
+ int num_cctrls);
int tldap_delete_recv(struct tevent_req *req);
int tldap_delete(struct tldap_context *ld, const char *dn,
- struct tldap_control **sctrls, struct tldap_control **cctrls);
-
+ struct tldap_control *sctrls, int num_sctrls,
+ struct tldap_control *cctrls, int num_cctrls);
int tldap_msg_id(const struct tldap_message *msg);
int tldap_msg_type(const struct tldap_message *msg);