19.4. slapi_attr_first_value()

Description

Use this function to get the first value of an attribute. This is part of a set of functions to enumerate over an Slapi_Attr structure.

Syntax

#include "slapi-plugin.h"
int slapi_attr_first_value( Slapi_Attr *a, Slapi_Value **v );

Parameters

This function takes the following parameters:

a Attribute containing the desired value.
v Holds the first value of the attribute.
Returns

This function returns one of the following values:

  • 0, which is the index of the first value.
  • -1 if the attribute (a) is NULL or if the value (v) parameter has no value.