Chapter 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

Function Description
slapi_vattr_list_attrs() Returns all the attribute types, both real and virtual, from an entry.
slapi_vattr_attrs_free() Frees the attribute list returned by slapi_vattr_list_attrs() .
slapi_vattr_schema_check_type() Performs a schema check on the attribute types in the entry.
slapi_vattr_value_compare() Compares the attribute and the name in a given entry.
slapi_vattr_values_free() Frees the attribute value and name in a given entry.
slapi_vattr_values_get() Returns the values of a virtual attribute for the given an entry and the attribute-type name.
slapi_vattr_values_get_ex() Returns the values for an attribute type from an entry.
slapi_vattr_values_type_thang_get() Gets values for an attribute type in the list only if the results field for that attribute type is NULL.

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:

e
The entry of interest.
types
Pointer to receive the list.
flags
Bit mask of options. Valid values include:
  • SLAPI_VIRTUALATTRS_REQUEST_POINTERS
  • SLAPI_VIRTUALATTRS_ONLY SLAPI_REALATTRS_ONLY
buffer_flags
Bit mask of options. Valid values include:
  • SLAPI_VIRTUALATTRS_RETURNED_COPIES
  • SLAPI_VIRTUALATTRS_RETURNED_POINTERS
  • SLAPI_VIRTUALATTRS_REALATTRS_ONLY
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.