Writing Plug-in Initialization Functions
Code Example 2-3
/* Set this information in the parameter block */
slapi_pblock_set( pb, SLAPI_PLUGIN_DESCRIPTION,
(void *)&mypdesc );
In this example code specifies the following plug-in information:
•
The unique identifier for the server plug-in is
•
The vendor of the server plug-in is
•
The version of the server plug-in is
Note that this version is intended to be used for your tracking purposes only; it
is not the same as the server compatibility version number specified by the
SLAPI_PLUGIN_VERSION
Compatibility" on page 33 for details on this parameter). As you make changes
to your plug-in code, you can track the version distributed using the number
contained in the
•
The description of the server plug-in is contained in the data structure value
sample pre-operation plug-in
Registering Your Plug-In Functions
Whether you register your plug-in through the initialization function depends
upon the type of function you are registering.
For some plug-in types, you do not need to register the plug-in function from
within the initialization function. For example, you register entry store and entry
fetch plug-ins by specifying the function names in the
dse.ldif
For other plug-in types, such as pre-operation plug-ins and post-operation
plug-ins, the Directory Server gets the pointer to your function from a parameter in
the initialization function parameter block. In these cases, you use the
slapi_pblock_set()
The full list parameters that you can use to register your plug-in functions are
listed in "Parameters for Registering Plug-In Functions" on page 494.
34
Netscape Directory Server Plug-In Programmer's Guide • May 2002
Specifying Plug-In Information (Continued)
parameter (see "Specifying Directory Server
Slapi_PluginDesc
file.
function to specify the name of your plug-in function.
test-plugin
.
example.com
.
0.5
structure.
.
plugin
.
directive in the
Need help?
Do you have a question about the NETSCAPE DIRECTORY SERVER 6.02 - PLUG-IN and is the answer not in the manual?
Questions and answers