HP-UX Directory Server 8.1 plug-in reference

Table Of Contents
To determine which flags have been set, you can bitwise AND the value of the flags argument
with one or more 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 0 if successful.
See also “slapi_attr_flag_is_set()”
19.9 slapi_attr_get_numvalues()
Description This function counts the number of values in an attribute and places that count in
an integer.
Syntax
#include "slapi-plugin.h"
int slapi_attr_get_numvalues( const Slapi_Attr *a, int *numValues);
Parameters This function takes the following parameters:
Attribute containing the values to be counted.
a
Integer to hold the counted values.
numValues
Returns This function always returns 0.
See also
“slapi_attr_first_value()”
“slapi_attr_next_value()”
19.10 slapi_attr_get_oid_copy()
Description This function replaces the deprecated function, slapi_attr_get_oid. Use this
function to search the syntaxes for an attribute type's OID and return a copy of its OID string.
Syntax
#include "slapi-plugin.h"
int slapi_attr_get_oid_copy( const Slapi_Attr *attr, char **oidp );
Parameters This function takes the following parameters:
Attribute that contains the desired type.
attr
Destination string of the copied attribute type OID.
oidp
Returns This function returns one of the following values:
0 if the attribute type is found.
-1 if it is not.
Memory concerns You should free this string using “slapi_ch_free()”.
19.11 slapi_attr_get_type()
Description Gets the name of the attribute type from a specified attribute.
Syntax
19.9 slapi_attr_get_numvalues() 175