HP-UX Directory Server 8.1 plug-in reference

Table Of Contents
See also “slapi_get_first_suffix()”
20.26 slapi_is_root_suffix()
Description Checks if a suffix is a root suffix of the DIT.
Syntax
#include "slapi-plugin.h"
int slapi_is_root_suffix(Slapi_DN * dn);
Parameters This function takes the following parameter:
DN to check.
dn
Returns This function returns one of the following values:
0 if the DN is not a root suffix.
1 if the DN is a root suffix.
20.27 slapi_register_back end_state_change()
Description This function enables a plug-in to register for callback when the state of a back end
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 back end changes. Because the plug-in wouldn't
be aware of these state changes, it would require restarting the server whenever a back end state
changed.
By registering for callback whenever the back end changes its state, your plug-in can keep track
of these changes and retain its functionality. You can use “slapi_unregister_back
end_state_change()” to unregister the callback.
Syntax
#include "slapi-plugin.h"
void slapi_register_back end_state_change(void * handle,
slapi_back end_state_change_fnptr funct);
Parameters This function takes the following parameter:
Pointer or reference to the address of the specified function.handle
See also “slapi_unregister_back end_state_change()”
20.28 slapi_unregister_back end_state_change()
Description This function enables a plug-in to unregister back end-state-change callback. Use
this function to unregister the callback, which is registered using “slapi_register_back
end_state_change()”.
Syntax
#include "slapi-plugin.h"
int slapi_unregister_back end_state_change(void * handle);
Parameters This function takes the following parameter:
Pointer or reference to the address of the specified function.
handle
Returns This function returns one of the following values:
0 If the specified callback was found and unregistered successfully.
192 Functions for managing back end operations