![Netscape NETSCAPE DIRECTORY SERVER 6.2 - GATEWAY CUSTOMIZATION Manual Download Page 68](http://html1.mh-extra.com/html/netscape/netscape-directory-server-6-2-gateway-customization/netscape-directory-server-6-2-gateway-customization_manual_1674642068.webp)
Working with Search Filters
68
Netscape Directory Server Plug-In Programmer’s Guide • December 2003
Getting the Search Criteria
To get the search criteria specified by a search filter, call one of the following
functions:
•
If the filter type is
LDAP_FILTER_EQUALITY
,
LDAP_FILTER_GE
,
LDAP_FILTER_LE
, or
LDAP_FILTER_APPROX
, you can get the attribute and
value used in the filter by calling
slapi_filter_get_ava()
.
•
If the filter type is
LDAP_FILTER_PRESENT
, you can get the attribute type that
the filter is searching for by calling the
slapi_filter_get_type()
function.
•
If the filter type is
LDAP_FILTER_SUBSTRINGS
, you can get the attribute type
that the filter searches for by calling
slapi_filter_get_subfilt()
.
•
To get the components of a complex filter of the type
LDAP_FILTER_AND
,
LDAP_FILTER_OR
, or
LDAP_FILTER_NOT
, call the
slapi_filter_list_first()
and
slapi_filter_list_next()
functions.
Both of these functions will return either a filter component of the complex
filter or a NULL value, according to the following:
❍
If
slapi_list_first()
returns a NULL, the complex filter is not of the
type
LDAP_FILTER_AND
,
LDAP_FILTER_OR
, or
LDAP_FILTER_NOT
.
❍
If
slapi_list_next()
returns a NULL, the component returned by the
call is the last component in the complex filter.
LDAP_FILTER_GE
The search should find entries that contain a value
greater than or equal to the specified attribute value.
LDAP_FILTER_LE
The search should find entries that contain a value less
than or equal to the specified attribute value.
LDAP_FILTER_PRESENT
The search should find entries that contain the
specified attribute.
LDAP_FILTER_APPROX
The search should find entries that contain a value
approximately matching the specified attribute value.
NOTE
You do not need to free the values returned by the
slapi_filter_get_ava()
,
slapi_filter_get_type()
, and
slapi_filter_get_subfilt()
functions.
Table 5-4
Types of Filters (Continued)
Filter Type
Description
Summary of Contents for NETSCAPE DIRECTORY SERVER 6.2 - GATEWAY CUSTOMIZATION
Page 1: ...Plug In Programmer s Guide Netscape Directory Server Version6 2 December 2003...
Page 18: ...18 Netscape Directory Server Plug In Programmer s Guide December 2003...
Page 56: ...56 Netscape Directory Server Plug In Programmer s Guide December 2003...
Page 112: ...112 Netscape Directory Server Plug In Programmer s Guide December 2003...
Page 168: ...Plug In API Reference 168 Netscape Directory Server Plug In Programmer s Guide December 2003...
Page 170: ...170 Netscape Directory Server Plug In Programmer s Guide December 2003...
Page 600: ...600 Netscape Directory Server Plug In Programmer s Guide December 2003...
Page 612: ...612 Netscape Directory Server Plug In Programmer s Guide December 2003...