Sun Java System Directory Server Enterprise Edition 6.2 Developer's Guide

slapi_valueset_next_value_const()

Gets the next value from a Slapi_ValueSet structure.

Syntax

#include "slapi-plugin.h"
int slapi_valueset_next_value_const(const Slapi_ValueSet *vs, int index,
    const Slapi_Value **v);

Parameters

This function takes the following parameters:

vs

Pointer to the Slapi_ValueSet structure from which you wish to get the value.

index

Value returned by the previous call to slapi_valueset_next_value_const() or slapi_valueset_first_value_const().

v

Address to the pointer to the Slapi_Value structure for the returned value.

Returns

This function returns the index of the value in the Slapi_ValueSet, or -1 if there was no more value or the input index is incorrect.

Description

Call this function when you wish to get the next value of a Slapi_ValueSet, after having first called slapi_valueset_first_value_const(). The returned value is the index of the value in the Slapi_ValueSet structure and must be passed to slapi_valueset_next_value_const().

Memory Concerns

This function gives a pointer to the actual value within the Slapi_ValueSet and you should not free it from memory.

See Also

slapi_valueset_first_value_const()