20.27. slapi_register_backend_state_change()

Description

This function enables a plug-in to register for callback when the state of a backend changes. The function will come handy when developing custom plug-ins.

For example, if your plug-in stores any kind of state, such as a configuration cache, it will become invalidated or incomplete whenever the state of a backend changes. Because the plug-in wouldn't be aware of these state changes, it would require restarting the server whenever a backend state changed.
By registering for callback whenever the backend changes its state, your plug-in can keep track of these changes and retain its functionality. You can use slapi_unregister_backend_state_change() to unregister the callback.
Syntax

#include "slapi-plugin.h"
void slapi_register_backend_state_change(void * handle, slapi_backend_state_change_fnptr funct);

Parameters

This function takes the following parameter:

handle
Pointer or reference to the address of the specified function.