HP-UX Directory Server 8.1 plug-in reference

Table Of Contents
the entries in the directory. This function applies to searches that use the filter type
LDAP_FILTER_SUBSTRINGS.
The ldbm back end (the default back end database) calls this function when processing searches
in which the filter type is LDAP_FILTER_SUBSTRINGS.
The function invokes the syntax plug-in specified by the vpi argument. This is the plug-in
associated with the type of attribute used in the search. You can get this handle by calling the
“slapi_attr_type2plugin()” function.
The syntax plug-in function invoked by this function is responsible for comparing the values
(specified by initial, any, and final) against the actual values of the attributes in the directory
entries. The syntax plug-in function returns a list of matching entry keys (the ivals argument)
to the back end.
Syntax
#include "slapi-plugin.h"
int slapi_call_syntax_assertion2keys_sub_sv( void *vpi, char *initial,
char **any, char *final, Slapi_Value ***ivals );
Parameters This function takes the following parameters:
Handle to plug-in for this attribute type
vpi
"Starts with" value from the search filter; for example, if the filter is ou=Sales*, the
argument initial is Sales.
initial
Array of "contains" values from the search filter; for example, if the filter is
ou=*Corporate*Sales*, the argument any is an array containing Corporate and
Sales.
any
"Ends with" value from the search filter; for example, if the filter is ou=*Sales, the
argument final is Sales.
final
Pointer to an array of Slapi_Value structures containing the values returned by the
plug-in function; these values can now be compared against entries in the directory.
ivals
Returns This function returns one of the following values:
0 If successful.
-1 If an error occurs; for example, if the corresponding function for the specified plug-in is not
found.
22.3 slapi_call_syntax_values2keys_sv()
Description When adding or removing values from an index, the Directory Server calls the
function (defined in the specified syntax plug-in) responsible for returning an array of keys
matching the specified values.
Syntax
#include "slapi-plugin.h"
int slapi_call_syntax_values2keys_sv( void *vpi, Slapi_Value
**vals, Slapi_Value ***ivals, int ftype );
Parameters This function takes the following parameters:
Handle to plug-in for this attribute type.
vpi
Pointer to the Slapi_Value structure containing the value to add or delete.vals
Pointer to an array of Slapi_Value structures containing the values returned by the
plug-in function; these values can be compared against entries in the directory.
ivals
Type of filter; for example, LDAP_FILTER_EQUALITY.ftype
202 Functions for syntax plug-ins