HP-UX Directory Server 8.1 plug-in reference

Table Of Contents
43.5 slapi_valueset_find()
Description This function finds the value in a valueset using the syntax of an attribute. Use this
to check for duplicate values in an attribute.
Syntax
#include "slapi-plugin.h"
Slapi_Value *slapi_valueset_find(const Slapi_Attr *a,
const Slapi_ValueSet *vs, const Slapi_Value *v);
Parameters This function takes the following parameters:
Pointer to the attribute. This is used to determine the syntax of the values and how to
match them.
a
Pointer to the Slapi_ValueSet structure from which you wish to get the value.vs
Address of the pointer to the Slapi_Value structure for the returned value.v
Returns This function returns one of the following values:
A pointer to the value in the valueset if the value was found.
NULL if the value was not found.
43.6 slapi_valueset_first_value()
Description Call this function when you wish to get the first value of a Slapi_ValueSet or
you wish to iterate through all the values. The returned value is the index of the value in the
Slapi_ValueSet structure and must be passed to call “slapi_valueset_next_value()” to get the
next value.
Syntax
#include "slapi-plugin.h"
int slapi_valueset_first_value( Slapi_ValueSet *vs,
Slapi_Value **v );
Parameters This function takes the following parameters:
Pointer to the Slapi_ValueSet structure from which you wish to get the value.vs
Address of the pointer to the Slapi_Value structure for the returned value.v
Returns This function returns one of the following values:
The index of the value in the Slapi_ValueSet.
-1 if there was no value.
Memory concerns This function gives a pointer to the actual value within the Slapi_ValueSet.
You should not free it from memory.
See also “slapi_valueset_next_value()”
43.7 slapi_valueset_free()
Description This function frees the Slapi_ValueSet structure and its members if it is not
NULL. Call this function when you are done working with the structure.
Syntax
#include "slapi-plugin.h"
void slapi_valueset_free(Slapi_ValueSet *vs)
43.5 slapi_valueset_find() 349