From: Kurt Zeilenga Date: Sun, 14 Mar 2004 00:57:44 +0000 (+0000) Subject: Add prototypes for grouping functions X-Git-Tag: OPENLDAP_REL_ENG_2_2_BP~299 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=af9e1583a70fd70d5161d1c94a73962de6002ddb;p=openldap Add prototypes for grouping functions Add ldap_find_control() --- diff --git a/include/ldap.h b/include/ldap.h index 64a634e711..e2be9c0242 100644 --- a/include/ldap.h +++ b/include/ldap.h @@ -664,6 +664,11 @@ ldap_create_control LDAP_P(( int iscritical, LDAPControl **ctrlp )); +LDAP_F( LDAPControl * ) +ldap_find_control LDAP_P(( + LDAP_CONST char *oid, + LDAPControl **ctrls )); + LDAP_F( void ) ldap_control_free LDAP_P(( LDAPControl *ctrl )); @@ -729,6 +734,110 @@ ldap_parse_intermediate LDAP_P(( LDAPControl ***serverctrls, int freeit )); +/* + * in groupings.c: + */ + +LDAP_F( int ) +ldap_grouping_create_operation LDAP_P(( + LDAP *ld, + LDAP_CONST char *grpoid, + struct berval *grpdata, + LDAPControl **serverctrls, + LDAPControl **clientctrls, + int *msgidp )); + +LDAP_F( int ) +ldap_grouping_create_operation_s LDAP_P(( + LDAP *ld, + LDAP_CONST char *grpoid, + struct berval *grpdata, + LDAPControl **serverctrls, + LDAPControl **clientctrls, + struct berval **retgrpcookiep, + struct berval **retgrpdatap )); + +LDAP_F( int ) +ldap_parse_grouping_create_result LDAP_P(( + LDAP *ld, + LDAPMessage *res, + struct berval **retgrpcookiep, + struct berval **retgrpdatap, + LDAPControl ***serverctrls, + int freeit )); + +LDAP_F( int ) +ldap_grouping_end_operation LDAP_P(( + LDAP *ld, + LDAP_CONST char *grpoid, + struct berval *grpdata, + LDAPControl **serverctrls, + LDAPControl **clientctrls, + int *msgidp )); + +LDAP_F( int ) +ldap_grouping_end_operation_s LDAP_P(( + LDAP *ld, + LDAP_CONST char *grpoid, + struct berval *grpdata, + LDAPControl **serverctrls, + LDAPControl **clientctrls, + struct berval **retgrpdatap )); + +LDAP_F( int ) +ldap_parse_grouping_end_result LDAP_P(( + LDAP *ld, + LDAPMessage *res, + struct berval **retgrpdatap, + LDAPControl ***serverctrls, + int freeit )); + +LDAP_F( int ) +ldap_grouping_action_operation LDAP_P(( + LDAP *ld, + LDAP_CONST char *grpoid, + struct berval *grpdata, + LDAPControl **serverctrls, + LDAPControl **clientctrls, + int *msgidp )); + +LDAP_F( int ) +ldap_grouping_action_operation_s LDAP_P(( + LDAP *ld, + LDAP_CONST char *grpoid, + struct berval *grpdata, + LDAPControl **serverctrls, + LDAPControl **clientctrls, + struct berval **retgrpcookiep, + struct berval **retgrpdatap )); + +LDAP_F( int ) +ldap_parse_grouping_action_result LDAP_P(( + LDAP *ld, + LDAPMessage *res, + struct berval **retgrpcookiep, + struct berval **retgrpdatap, + LDAPControl ***serverctrls, + int freeit )); + +LDAP_F( int ) +ldap_parse_grouping_end_notice LDAP_P(( + LDAP *ld, + LDAPMessage *res, + struct berval **retdatap, + struct berval **retgrpcookiep, + struct berval **retgrpdatap, + int freeit )); + +LDAP_F( int ) +ldap_parse_grouping_info_notice LDAP_P(( + LDAP *ld, + LDAPMessage *res, + struct berval **retdatap, + struct berval **retgrpcookiep, + struct berval **retgrpdatap, + int freeit )); + /* * in abandon.c: */ diff --git a/libraries/libldap/controls.c b/libraries/libldap/controls.c index d60837ae4a..c9b6c722fe 100644 --- a/libraries/libldap/controls.c +++ b/libraries/libldap/controls.c @@ -26,9 +26,6 @@ * LICENSE, OR OTHER PRIOR WRITTEN CONSENT FROM NOVELL, COULD SUBJECT THE * PERPETRATOR TO CRIMINAL AND CIVIL LIABILITY. *--- - * Modification to OpenLDAP source by Novell, Inc. - * June 2000 sfs Added control utilities - *-- * Note: A verbatim copy of version 2.0.1 of the OpenLDAP Public License * can be found in the file "build/LICENSE-2.0.1" in this distribution * of OpenLDAP Software. @@ -392,6 +389,25 @@ ldap_control_dup( const LDAPControl *c ) return new; } + +LDAPControl * +ldap_find_control( + LDAP_CONST char *oid, + LDAPControl **ctrls ) +{ + if( ctrls == NULL || *ctrls == NULL ) { + return NULL; + } + + for( ; *ctrls != NULL; ctrls++ ) { + if( strcmp( (*ctrls)->ldctl_oid, oid ) == 0 ) { + return *ctrls; + } + } + + return NULL; +} + /* ldap_create_control