Netscape DIRECTORY SERVER 6.1 - PLUG-IN Manual page 144

Table of Contents

Advertisement

Writing an Initialization Function
In order to add your plug-in to that internal list, you need to write an initialization
function. The initialization function takes a single
function should set the following parameters:
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
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
function, if you have defined one (optional). See "Specifying Start and Close
Functions" on page 146 for details.
The
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:
Input and Output Parameters Available to a Matching Rule Plug-In Initialization Function
Table 11-7
Parameter Name
SLAPI_PLUGIN_ARGC
SLAPI_PLUGIN_ARGV
SLAPI_PLUGIN_MR_FILTER_CREATE_FN
SLAPI_PLUGIN_MR_INDEXER_CREATE_FN
144
Netscape Directory Server Plug-In Programmer's Guide • August 2002
SLAPI_PLUGIN_MR_FILTER_CREATE_FN
SLAPI_PLUGIN_MR_INDEXER_CREATE_FN
SLAPI_PLUGIN_CLOSE_FN
SLAPI_PLUGIN_PRIVATE
Data Type
int
char **
void *
(function pointer)
void *
(function pointer)
Slapi_PBlock
parameter should be set to the
parameter should be set to the
parameter should be set to the "close"
parameter should be set to any private data you
Description
(Input parameter) Number of
arguments in the plugin
directive (not including the
library name and initialization
function name).
(Input parameter) Array of
string arguments in the
plugin directive (not
including the library name and
initialization function name).
(Output parameter) The factory
function used for creating
filters.
(Output parameter) The factory
function used for creating
indexers.
argument. The

Advertisement

Table of Contents
loading

This manual is also suitable for:

Directory server 6.1

Table of Contents