Complete Contents
Getting Started
Chapter 1 Understanding Server Plug-Ins
Chapter 2 Writing and Compiling Plug-Ins
Chapter 3 Calling the Front-End API Functions
Chapter 4 Quick Start
Chapter 5 Writing Database Plug-Ins
Chapter 6 Writing Pre/Post-Operation Plug-Ins
Chapter 7 Defining Functions for LDAP Operations
Chapter 8 Defining Functions for Database Operations
Chapter 9 Defining Functions for Authentication
Chapter 10 Writing Entry Store/Fetch Plug-Ins
Chapter 11 Writing Extended Operation Plug-Ins
Chapter 12 Writing Matching Rule Plug-Ins
Chapter 13 Data Type and Structure Reference
Chapter 14 Function Reference
Chapter 15 Parameter Reference
Glossary
Previous Next Contents Bookshelf Datatypes List



 mrFilterMatchFn
mrFilterMatchFn specifies the prototype for a "filter matching" callback function. This function is called by the server when processing a search operation. The server calls this function for each potential candidate entry that might match a search filter.

Syntax

#include "slapi-plugin.h"
typedef int (*mrFilterMatchFn) (void* filter,
Slapi_Entry* entry, Slapi_Attr* attrs);

Parameters

The function has the following parameters:
filter

Pointer to the filter structure created by your filter factory function. (For details, see "Writing a Filter Factory Function" on page  175.)
entry

Pointer to the Slapi_Entry structure representing the candidate entry being checked by the server.
attrs

Pointer to the Slapi_Attr structure representing the first attribute in the entry. To iterate through the rest of the attributes in the entry, call slapi_entry_next_attr().

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

 

© Copyright 1998 Netscape Communications Corporation