Writing A Destructor Function; Writing An Initialization Function - Netscape DIRECTORY SERVER 6.01 - PLUG-IN Manual

Table of Contents

Advertisement

The server compares the keys to sort the results.
4.

Writing a Destructor Function

The server calls the destructor function to free any memory that you've allocated
(for example, the indexer object or the filter object).
The destructor function takes a single
table summarizes the different parameters that the destructor function should get
and set in the parameter block that is passed in:
Table 11-6
Parameter Name
SLAPI_PLUGIN_OBJECT
For example, your destructor function can get the indexer object from the
SLAPI_PLUGIN_OBJECT
This function will never be called for the same indexer or filter object concurrently.
(If you plan to manipulate global variables, keep in mind that the server can call
this function concurrently for different filter or indexer objects.)

Writing an Initialization Function

Internally, the server keeps a list of matching rule plug-ins. When dealing with
matching rules, the server attempts to find the matching rule plug-in to handle the
given matching rule. (See "How the Server Associates Plug-Ins with OIDs" on
page 127 for details.)
The server calls the indexer function (specified by the
SLAPI_PLUGIN_MR_INDEXER_FN
Next, the server gets the value of the
which is an array of
berval
to the values.
Input and Output Parameters Available to a Destructor Function
Data Type
void *
parameter and free the object from memory.
parameter).
SLAPI_PLUGIN_MR_KEYS
structures containing the keys corresponding
argument. The following
Slapi_PBlock
Description
(Input parameter) Pointer to the
filter object or indexer object created
by your factory function.
Chapter 11
Writing Matching Rule Plug-Ins
Writing a Destructor Function
parameter,
143

Advertisement

Table of Contents
loading

This manual is also suitable for:

Directory server 6.01

Table of Contents