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

slapi_entry_delete_values_sv()

Removes an array of Slapi_Value data values from an attribute in an entry.

Syntax

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

Parameters

This function takes the following parameters:

e

Entry from which you want to delete values.

type

Attribute from which you want to delete values.

vals

Array of Slapi_Value data values that you want to delete.

Returns

Returns LDAP_SUCCESS if the specified attribute and the array of Slapi_Value data values are deleted from the entry.

If the specified attribute contains a NULL value, the attribute is deleted from the attribute list and the function returns LDAP_NO_SUCH_ATTRIBUTE . Additionally, if the attribute is not found in the list of attributes for the specified entry, the function returns LDAP_NO_SUCH_ATTRIBUTE.

If there is an operational error during the processing of this call (such as a duplicate value found), the function will return LDAP_OPERATIONS_ERROR . If this occurs, please report the problem to Sun support services.

Description

This function removes an attribute/value set from an entry. Notice that both the attribute and its Slapi_Value data values are removed from the entry. If you supply a Slapi_Value whose value is NULL, the function will delete the specified attribute from the entry. In either case, the function returns LDAP_SUCCESS.

This function replaces the deprecated slapi_entry_delete_values() function. This function uses Slapi_Value attribute values instead of the berval attribute values.

Memory Concerns

The vals parameter can be NULL, in which case, this function does nothing.