HP-UX Directory Server 8.1 plug-in reference

Table Of Contents
44 Functions specific to virtual attribute service
This chapter contains reference information on routines that are specific to virtual attribute
services.
Table 44-1 Virtual attribute service routines
DescriptionFunction
Returns all the attribute types, both real and virtual, from an entry.“slapi_vattr_list_attrs()”
Frees the attribute list returned by “slapi_vattr_list_attrs()” .“slapi_vattr_attrs_free()”
Performs a schema check on the attribute types in the entry.“slapi_vattr_schema_check_type()”
Compares the attribute and the name in a given entry.“slapi_vattr_value_compare()”
Frees the attribute value and name in a given entry.“slapi_vattr_values_free()”
Returns the values of a virtual attribute for the given an entry and the
attribute-type name.
“slapi_vattr_values_get()”
Returns the values for an attribute type from an entry.“slapi_vattr_values_get_ex()”
Gets values for an attribute type in the list only if the results field for that
attribute type is NULL.
“slapi_vattr_values_type_thang_get()”
44.1 slapi_vattr_list_attrs()
Description This function returns all the attribute types, both real and virtual, from an entry.
You can call “slapi_vattr_values_type_thang_get()” and take the values present in the
vattr_type_thang list rather than calling “slapi_vattr_values_get()” to retrieve the value.
This function should be used to return both the real and virtual attributes for an entry.
Syntax
#include "slapi-plugin.h"
int slapi_vattr_list_attrs (Slapi_Entry *e, vattr_type_thang **types,
int flags, int *buffer_flags);
Parameters This function takes the following parameters:
The entry of interest.
e
Pointer to receive the list.
types
Bit mask of options. Valid values include:
SLAPI_VIRTUALATTRS_REQUEST_POINTERS
SLAPI_VIRTUALATTRS_ONLY SLAPI_REALATTRS_ONLY
flags
Bit mask of options. Valid values include:
SLAPI_VIRTUALATTRS_RETURNED_COPIES
SLAPI_VIRTUALATTRS_RETURNED_POINTERS
SLAPI_VIRTUALATTRS_REALATTRS_ONLY
buffer_flags
Memory concerns The list that is returned from this API should be freed by the user by calling
“slapi_vattr_attrs_free()” for that list.
See also
“slapi_vattr_values_type_thang_get()”
“slapi_vattr_values_free()”
44.1 slapi_vattr_list_attrs() 353