HP-UX Directory Server 8.1 plug-in reference

Table Of Contents
See also
“slapi_attr_new()”
“slapi_attr_init()”
“slapi_attr_free()”
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:
Attribute containing the desired value.
a
Holds the first value of the attribute.
v
Returns This function returns one of the following values:
0, which is the index of the first value.
-1 if NULL or if the value hint is not found.
See also “slapi_attr_next_value()”“slapi_attr_get_numvalues()”
19.5 slapi_attr_flag_is_set()
Description This function determines if certain flags are set for a particular attribute. These
flags can identify an attribute as a single-valued attribute, an operational attribute, or as a
read-only attribute.
Syntax
#include "slapi-plugin.h"
int slapi_attr_flag_is_set( const Slapi_Attr *attr,
unsigned long flag );
Parameters This function takes the following parameters:
Attribute that you want to check.
attr
Flag to check in the attribute.
flag
The value of the flag argument can be one of the following:
Flag that determines if the attribute is single-valued.
SLAPI_ATTR_FLAG_SINGLE
Flag that determines if the attribute is an operational attribute.
SLAPI_ATTR_FLAG_OPATTR
Flag that determines if the attribute is read-only.
SLAPI_ATTR_FLAG_READONLY
Returns This function returns one of the following values:
1 if the specified flag is set.
0 if the specified flag is not set.
See also “slapi_attr_get_flags()”
19.4 slapi_attr_first_value() 173