HP-UX Directory Server 8.1 plug-in reference

Table Of Contents
43.2 slapi_valueset_add_value_ext()
Description This function enables adding of a Slapi_Value in the Slapi_ValueSet structure
without having to duplicate and free the target value. Sometimes, it is desirable to have a pass-in
interface to add a Slapi_Value to a list without having to duplicate and free the target value.
This function is similar to an existing function “slapi_valueset_add_value()” but has one more
parameter, unsigned long flags, for setting flags. If SLAPI_VALUE_FLAG_PASSIN bit is
set in the flags, the function would simply take over the ownership of the new value to be added
without duplicating it.
Syntax
#include "slapi-plugin.h"
void slapi_valueset_add_value_ext(Slapi_ValueSet *vs,
Slapi_Value *addval, unsigned long flags);
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
If SLAPI_VALUE_FLAG_PASSIN bit is set in the flags, the function would takeover
the ownership of the new value to be added without duplicating it.
flags
See also
“slapi_valueset_add_value()”
“slapi_valueset_first_value()”
“slapi_valueset_next_value()”
43.3 slapi_valueset_count()
Returns the number of values contained in a Slapi_ValueSet structure.
Syntax
#include "slapi-plugin.h"
int slapi_valueset_count( const Slapi_ValueSet *vs);
Parameters This function takes the following parameter:
Pointer to the Slapi_ValueSet structure of which you wish to get the count.vs
Returns This function returns the number of values contained in the Slapi_ValueSet structure.
43.4 slapi_valueset_done()
Frees the values contained in the Slapi_ValueSet structure.
Syntax
#include "slapi-plugin.h"
void slapi_valueset_done(Slapi_ValueSet *vs);
Parameters This function takes the following parameter:
Pointer to the Slapi_ValueSet structure from which you wish to free its values.vs
Memory concerns Use this function when you are no longer using the values but you want to
re-use the Slapi_ValueSet structure for a new set of values.
348 Functions for handling valuesets