Register an object extension.
#include "slapi-plugin.h" int slapi_register_object_extension( const char *pluginname, const char *objectname, slapi_extension_constructor_fnptr constructor, slapi_extension_destructor_fnptr destructor, int *objecttype, int *extensionhandle);
This function takes the following parameters:
String identifying the plug-in
Name of the object to extend such as SLAPI_EXT_CONNECTION to add private data to a connection or SLAPI_EXT_OPERATION to add private data to an operation
Constructor to allocate memory for the object extension and create the extension
Destructor to free memory used for the object extension
Set by the server and used to retrieve the extension
Set by the server and used to retrieve the extension
This function registers an extension to an object such as a connection or an operation. This mechanism enables a plug-in to store private data with an operation that is passed from a preoperation to a postoperation plug-in for example, something not possible using parameter blocks.
Register object extensions as part of the plug-in initialization function.
This function returns 0 if successful. Otherwise, it returns -1.
slapi_extension_constructor_fnptr