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.
Содержание NETSCAPE DIRECTORY SERVER 6.2 - GATEWAY CUSTOMIZATION
Страница 1: ...Plug In Programmer s Guide Netscape Directory Server Version6 2 December 2003...
Страница 18: ...18 Netscape Directory Server Plug In Programmer s Guide December 2003...
Страница 26: ...Types of Directory Server Plug Ins 26 Netscape Directory Server Plug In Programmer s Guide December 2003...
Страница 38: ...Compiling a Directory Server Plug In 38 Netscape Directory Server Plug In Programmer s Guide December 2003...
Страница 54: ...An Example Pre Operation Plug In 54 Netscape Directory Server Plug In Programmer s Guide December 2003...
Страница 56: ...56 Netscape Directory Server Plug In Programmer s Guide December 2003...
Страница 90: ...Processing an LDAP Abandon Operation 90 Netscape Directory Server Plug In Programmer s Guide December 2003...
Страница 110: ...Using SASL with an LDAP Client 110 Netscape Directory Server Plug In Programmer s Guide December 2003...
Страница 112: ...112 Netscape Directory Server Plug In Programmer s Guide December 2003...
Страница 122: ...Specifying Start and Close Functions 122 Netscape Directory Server Plug In Programmer s Guide December 2003...
Страница 168: ...Plug In API Reference 168 Netscape Directory Server Plug In Programmer s Guide December 2003...
Страница 170: ...170 Netscape Directory Server Plug In Programmer s Guide December 2003...
Страница 214: ...Summary of Data Types and Structures 214 Netscape Directory Server Plug In Programmer s Guide December 2003...
Страница 554: ...Functions for Registering Additional Plug Ins 554 Netscape Directory Server Plug In Programmer s Guide December 2003...
Страница 596: ...Parameters for the Virtual Attribute Service 596 Netscape Directory Server Plug In Programmer s Guide December 2003...
Страница 600: ...600 Netscape Directory Server Plug In Programmer s Guide December 2003...
Страница 612: ...612 Netscape Directory Server Plug In Programmer s Guide December 2003...