HP-UX Directory Server 8.1 plug-in reference

Table Of Contents
43 Functions for handling valuesets
This chapter contains reference information on valueset routines.
Table 43-1 Valueset routines
DescriptionFunction
Adds a Slapi_Value in the Slapi_ValueSet structure.
“slapi_valueset_add_value()”
Enables adding of a Slapi_Value in the Slapi_ValueSet structure without
having to duplicate and free the target value.
“slapi_valueset_add_value_ext()”
Returns the number of values contained in a Slapi_ValueSet structure.
“slapi_valueset_count()”
Frees the values contained in the Slapi_ValueSet structure.
“slapi_valueset_done()”
Finds the value in a valueset using the syntax of an attribute.“slapi_valueset_find()”
Gets the first value of a Slapi_ValueSet structure.
“slapi_valueset_first_value()”
Frees the specified Slapi_ValueSet structure and its members from
memory.
“slapi_valueset_free()”
Resets a Slapi_ValueSet structure to no values.
“slapi_valueset_init()”
Allocates a new Slapi_ValueSet structure.
“slapi_valueset_new()”
Gets the next value from a Slapi_ValueSet structure.
“slapi_valueset_next_value()”
Copies the values of Slapi_Mod structure into a Slapi_ValueSet structure.
“slapi_valueset_set_from_smod()”
Initializes a Slapi_ValueSet structure from another Slapi_ValueSet
structure.
“slapi_valueset_set_valueset()”
43.1 slapi_valueset_add_value()
Description This function adds a value in the form of a Slapi_Value structure in a
Slapi_ValueSet structure.
Syntax
#include "slapi-plugin.h"
void slapi_valueset_add_value(Slapi_ValueSet *vs,
const Slapi_Value *addval);
Parameters This function takes the following parameters:
Pointer to the Slapi_ValueSet structure to which to add the value.vs
Pointer to the Slapi_Value to add to the Slapi_ValueSet.addval
Memory concerns The value is duplicated from the Slapi_Value structure, which can be
freed from memory after using it without altering the Slapi_ValueSet structure.
This function does not verify if the value is already present in the Slapi_ValueSet structure.
You can manually check this using “slapi_valueset_first_value()” and
“slapi_valueset_next_value()”.
See also
“slapi_valueset_first_value()”
“slapi_valueset_next_value()”
43.1 slapi_valueset_add_value() 347