![Netscape NETSCAPE DIRECTORY SERVER 6.2 - GATEWAY CUSTOMIZATION Manual Download Page 143](http://html1.mh-extra.com/html/netscape/netscape-directory-server-6-2-gateway-customization/netscape-directory-server-6-2-gateway-customization_manual_1674642143.webp)
Writing a Destructor Function
Chapter
11
Writing Matching Rule Plug-Ins
143
❍
The server calls the indexer function (specified by the
SLAPI_PLUGIN_MR_INDEXER_FN
parameter).
❍
Next, the server gets the value of the
SLAPI_PLUGIN_MR_KEYS
parameter,
which is an array of
berval
structures containing the keys corresponding
to the values.
4.
The server compares the keys to sort the results.
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
Slapi_PBlock
argument. The following
table summarizes the different parameters that the destructor function should get
and set in the parameter block that is passed in:
For example, your destructor function can get the indexer object from the
SLAPI_PLUGIN_OBJECT
parameter and free the object from memory.
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.)
Table 11-6
Input and Output Parameters Available to a Destructor Function
Parameter Name
Data Type
Description
SLAPI_PLUGIN_OBJECT
void *
(Input parameter) Pointer to the
filter object or indexer object created
by your factory function.
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...