Sun Java System Directory Server Enterprise Edition 6.1 Developer's Guide

slapi_compute_output_t

Specifies a callback function to determine the value of a computed attribute.

Syntax

typedef int (*slapi_compute_output_t)(computed_attr_context *c,
    Slapi_Attr *a , Slapi_Entry *e);

Parameters

The callback takes the following parameters.

Table 15–15 slapi_compute_output_t Parameters

Parameter 

Description 

c

Context of the callback. 

a

Attribute for which the callback computes values. 

e

Entry including computed attributes, returned to client after this callback returns. 

Description

This callback provides a computed value for attribute a of entry e, given context c. The slapi_compute_callback_t function you register using slapi_compute_add_evaluator() calls this function to compute a value for a before returning the entry e to the server.

Returns

This function should return 0 on success. It should return -1 if does not handle the attribute type passed in a. Otherwise, it should return an LDAP error code.