![Netscape NETSCAPE DIRECTORY SERVER 6.2 - GATEWAY CUSTOMIZATION Manual Download Page 144](http://html1.mh-extra.com/html/netscape/netscape-directory-server-6-2-gateway-customization/netscape-directory-server-6-2-gateway-customization_manual_1674642144.webp)
Writing an Initialization Function
144
Netscape Directory Server Plug-In Programmer’s Guide • December 2003
In order to add your plug-in to that internal list, you need to write an initialization
function. The initialization function takes a single
Slapi_PBlock
argument. The
function should set the following parameters:
•
The
SLAPI_PLUGIN_MR_FILTER_CREATE_FN
parameter should be set to the
filter factory function. See “How the Server Handles the Filter” on page 135
and “Writing a Filter Factory Function” on page 137 for details.
•
The
SLAPI_PLUGIN_MR_INDEXER_CREATE_FN
parameter should be set to the
indexer factory function, if you have defined one (optional). See “How the
Server Sets Up the Index” on page 129 and “Writing the Indexer Factory
Function” on page 131 for details.
•
The
SLAPI_PLUGIN_CLOSE_FN
parameter should be set to the “close”
function, if you have defined one (optional). See “Specifying Start and Close
Functions” on page 146 for details.
•
The
SLAPI_PLUGIN_PRIVATE
parameter should be set to any private data you
want made accessible to the plug-in functions (optional).
You need to register the initialization function (see “Registering Matching Rule
Functions” on page 145) so that the server runs the function when starting up.
The following table summarizes the different parameters that the initialization
function should get and set in the parameter block that is passed in:
Table 11-7
Input and Output Parameters Available to a Matching Rule Plug-In Initialization Function
Parameter Name
Data Type
Description
SLAPI_PLUGIN_ARGC
int
(Input parameter) Number of
arguments in the
plugin
directive (not including the
library name and initialization
function name).
SLAPI_PLUGIN_ARGV
char **
(Input parameter) Array of
string arguments in the
plugin
directive (not
including the library name and
initialization function name).
SLAPI_PLUGIN_MR_FILTER_CREATE_FN
void *
(function pointer)
(Output parameter) The factory
function used for creating
filters.
SLAPI_PLUGIN_MR_INDEXER_CREATE_FN
void *
(function pointer)
(Output parameter) The factory
function used for creating
indexers.
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...