Syntax
#include "slapi-plugin.h" typedef int (*mrFilterMatchFn) (void* filter, Slapi_Entry* entry, Slapi_Attr* attrs);
Parameters
The function has the following parameters:
Description
mrFilterMatchFn specifies the prototype for a "filter matching" function that is called by the server when processing an "extensible match" filter.
An "extensible match" filter specifies either the OID of a matching rule or an attribute type (or both) that indicates how matching entries are found. For example, a "sound-alike" matching rule might find all entries that sound like a given value.
To handle an "extensible match" filter for a matching rule, you can write a matching rule plug-in. (For more information, see Chapter 12, "Writing Matching Rule Plug-Ins".)
One of the functions that you need to define is the "filter matching" function (the function with the prototype specified by mrFilterMatchFn). The server calls this function for each potential matching candidate entry. The server passes pointers to a filter structure (that you create in your filter factory function -- see "Writing a Filter Factory Function" on page 175 for details), the candidate entry, and the entry's attributes.
In your filter matching function, you need to retrieve information about the filter (such as the attribute type and value specified in the filter) from the filter structure. You use this information to compare the value in the filter against the attribute values in the candidate entry.
For more information on writing a filter matching function, see "Writing a Filter Matching Function" on page 180.
Example
[To be added]
See Also