14.7. plugin_result_callback

This typedef is used for LDAP result callback functions, which are plugin-defined functions that process result messages that are generated by some internal search functions.
Syntax

This typedef uses the following syntax:

#include "slapi-plugin.h"
typedef void (*plugin_result_callback)(int rc, void *callback_data);
Parameters

This typedef takes the following parameters:

Table 14.9. plugin_result_callback Parameters

rc
The LDAP result code of the internal operation; for example, LDAP_SUCCESS.
callback_data This value matches the callback_data pointer that was passed to the original internal operation function.
Returns

The following table lists this function's possible return values.

Table 14.10. plugin_result_callback Return Values

Return Value Description
0 Success
-1 An error occurred.
Description

A function that matches this typedef can be passed as the prc parameter of slapi_search_internal_callback_pb() or as the res_callback parameter of slapi_seq_internal_callback_pb().

The LDAP result callback function should be called once for each search operation, unless the search is abandoned, in which case it will not be called.
The callback_data parameter can be used to pass arbitrary plug-in or operation-specific information to a result callback function.