HP-UX Directory Server 8.1 plug-in reference

Table Of Contents
#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:
Entry to which you want to add a value.
e
Attribute to which you want to add a value.
type
The Slapi_value data value you want to add to the entry.value
Returns This function returns 0 when successful; any other value returned signals failure.
Memory concerns This routine makes a copy of the parameter value. value can be NULL.
24.6 slapi_entry_add_values_sv()
Description This function adds an array of Slapi_Value data values to an attribute. If the
attribute does not exist, it is created and given the value contained in the Slapi_Value array.
This function replaces the deprecated slapi_entry_add_values() function. This function
uses Slapi_Value attribute values instead of the now obsolete berval attribute values.
Syntax
#include "slapi-plugin.h"
int slapi_entry_add_values_sv( Slapi_Entry *e, const char *type,
Slapi_Value **vals );
Parameters This function takes the following parameters:
Entry to which you want to add values.
e
Attribute type to which you want to add values.
type
Array of Slapi_Value data values that you want to add.vals
Returns This function returns one of the following values:
LDAP_SUCCESS if the Slapi_Value array is successfully added to the attribute.
LDAP_TYPE_OR_VALUE_EXISTS if any values you are trying to add duplicate an existing
value in the attribute.
LDAP_OPERATIONS_ERROR if there are pre-existing duplicate values in the attribute.
Memory concerns This routine makes a copy of the parameter vals. vals can be NULL.
See also slapi_entry_add_values_sv()
24.7 slapi_entry_add_valueset()
Description This function adds a set of values to an attribute in an entry. The values added are
in the form of a Slapi_ValueSet data type. If the entry does not contain the attribute specified,
it is created with the specified Slapi_ValueSet value.
Syntax
#include "slapi-plugin.h"
int slapi_entry_add_valueset(Slapi_Entry *e, const char *type,
Slapi_ValueSet *vs);
24.6 slapi_entry_add_values_sv() 215