Specifies a function to determine which function should be called to provide a value for a computed attribute.
typedef int (*slapi_compute_callback_t)(computed_attr_context *c, char* type,Slapi_Entry *e,slapi_compute_output_t outputfn);
The callback takes the following parameters.
Table 15–14 slapi_compute_callback_t Parameters
Field |
Description |
---|---|
c |
Context of the callback. |
type |
Attribute type for which the outputfn computes values. |
e |
Entry including computed attributes, returned to client after this callback returns. |
outputfn |
Callback to compute the attribute value. |
This callback selects the function that provides a computed value for an attribute of type type on an entry e, given context c. The server calls this function to get a a function for calculating attribute values before returning the entry e to the client having requested the operation.
This function is registered with the server using slapi_compute_add_evaluator() in the plug-in initialization function.
This function should return 0 on success. It should return -1 if does not handle the attribute type passed in type. Otherwise, it should return an LDAP error code.