HP-UX Directory Server 8.1 plug-in reference

Table Of Contents
Parameters This function takes the following parameters:
Entry to which you want to add values.
e
Attribute to which you want to add values.
type
Array of Slapi_Value data values you want to add.vals
Returns This function returns 0 if successful; any other value returned signals failure.
Memory concerns This function makes a copy of the parameter vals. vals can be NULL.
24.21 slapi_entry_attr_replace_sv()
Replaces the values of an attribute with the Slapi_Value data value you specify.
Description This function replaces existing attribute values in a specified entry with a single
Slapi_Value data value. The function first deletes the existing attribute from the entry, then
replaces it with the new value specified. This function replaces the deprecated
slapi_entry_attr_replace() function. This function uses Slapi_Value attribute values
instead of the now obsolete berval attribute values.
Syntax
#include "slapi-plugin.h"
int slapi_entry_attr_replace_sv( Slapi_Entry *e,
const char *type, Slapi_Value **vals );
Parameters This function takes the following parameters:
Entry in which you want to replace values.
e
Attribute type which will receive the replaced values.
type
Array containing the Slapi_Value values that should replace the existing values of
the attribute.
vals
Returns This function returns 0 when successful; any other value returned signals failure.
Memory concerns This function makes a copy of the parameter vals. vals can be NULL.
See also slapi_entry_attr_replace()
24.22 slapi_entry_attr_set_charptr()
Replaces the value or values of an attribute in an entry with a specified string value.
Syntax
#include "slapi-plugin.h"
void slapi_entry_attr_set_charptr(Slapi_Entry* e, const char *type,
const char *value);
Parameters This function takes the following parameters:
Entry in which you want to set the value.
e
Attribute type in which you want to set the value.
type
String value that you want to assign to the attribute.
value
Memory concerns This function makes a copy of the parameter values. values can be NULL;
if so, this function is roughly equivalent to “slapi_entry_attr_delete()”.
See also “slapi_entry_attr_delete()”
24.21 slapi_entry_attr_replace_sv() 221