]> git.sur5r.net Git - openldap/commitdiff
Add prototypes for grouping functions
authorKurt Zeilenga <kurt@openldap.org>
Sun, 14 Mar 2004 00:57:44 +0000 (00:57 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Sun, 14 Mar 2004 00:57:44 +0000 (00:57 +0000)
Add ldap_find_control()

include/ldap.h
libraries/libldap/controls.c

index 64a634e711bdc5477d25cb12cba952f18f999190..e2be9c0242d5d8b80fe91a6680e739c86e5a4678 100644 (file)
@@ -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:
  */
index d60837ae4a3e923f2c54ff31f3c751f1c9d41422..c9b6c722fe29debe8917fbf0aff3f41945f32870 100644 (file)
@@ -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