HP-UX Directory Server 8.1 plug-in reference

Table Of Contents
(&(ou=Accounting)(l=Sunnyvale))
(|(ou=Accounting)(l=Sunnyvale))
(!(l=Sunnyvale))
Each of these examples contain one or more LDAP_FILTER_EQUALITY filters.
Call the slapi_filter_join() function to create a new filter of the type LDAP_FILTER_AND,
LDAP_FILTER_OR, or LDAP_FILTER_NOT.
Syntax
#include "slapi-plugin.h"
Slapi_Filter *slapi_filter_join( int ftype, Slapi_Filter *f1,
Slapi_Filter *f2 );
Parameters This function takes the following parameters:
Type of composite filter you want to create.
ftype
First filter that you want to join.
f1
Second filter that you want to join. If ftype is LDAP_FILTER_NOT, specify NULL for
this argument.
f2
Returns This function returns the new filter constructed from the other two filters.
Memory concerns The f1 and f2 filters are neither copied nor freed during the join process,
but the resulting filter will have references pointing to these two filters.
See also “slapi_filter_join()” uses “slapi_filter_join_ex()” with the recurse_always argument
being 1.
26.11 slapi_filter_join_ex()
Recursively joins the two specified filters using one of the following filter types:
LDAP_FILTER_AND, LDAP_FILTER_OR, or LDAP_FILTER_NOT. When specifying the filter type
LDAP_FILTER_NOT, the second filter should be NULL.
Description Filters of the type LDAP_FILTER_AND, LDAP_FILTER_OR, and LDAP_FILTER_NOT
generally consist of one or more other filters. For example:
(&(ou=Accounting)(l=Sunnyvale))
(|(ou=Accounting)(l=Sunnyvale))
(!(l=Sunnyvale))
Each of these examples contain one or more LDAP_FILTER_EQUALITY filters.
Call the slapi_filter_join() function to create a new filter of the type LDAP_FILTER_AND,
LDAP_FILTER_OR, or LDAP_FILTER_NOT.
Syntax
#include "slapi-plugin.h"
Slapi_Filter *slapi_filter_join_ex( int ftype, Slapi_Filter *f1,
Slapi_Filter *f2, int recurse_always );
Parameters This function takes the following parameters:
Type of composite filter you want to create.
ftype
First filter that you want to join.
f1
Second filter that you want to join. If ftype is LDAP_FILTER_NOT, specify NULL for
this argument.
f2
Recursively joins filters f1 and f2.recurse_always
Returns This function returns the new filter constructed from the other two filters.
26.11 slapi_filter_join_ex() 241