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

slapi_entry_add_value()

Adds a specified Slapi_Value data value to an attribute in an entry.

Syntax

#include "slapi-plugin.h"
 int slapi_entry_add_value (Slapi_Entry *e, const char *type,
    const Slapi_Value *value);

Parameters

This function takes the following parameters:

e

Entry to which you want to add a value.

type

Attribute to which you want to add a value.

value

The Slapi_Value data value you want to add to the entry.

Returns

Returns 0 when successful; any other value returned signals failure.

Description

This function adds a Slapi_Value data value to the existing attribute values in an entry. If the specified attribute does not exist in the entry, the attribute is created with the Slapi_Value specified.

This function does not check whether the value added is a duplicate of an existing value.

Memory Concerns

This routine makes a copy of the parameter value. If value is NULL, the entry is not changed.