Get values from a list of the real and virtual attributes for an entry.
#include "slapi-plugin.h" int slapi_vattr_values_type_thang_get(Slapi_Entry *e, vattr_type_thang *type_thang, Slapi_ValueSet** results, int *type_name_disposition, char **actual_type_name, int flags, int *buffer_flags);
This function takes the following parameters:
Entry the attributes belong to
Real or virtual attribute type
Values for the attribute, set by the server
Set by the server to reflect how type name matched; one of SLAPI_VIRTUALATTRS_TYPE_NAME_MATCHED_EXACTLY_OR_ALIAS, SLAPI_VIRTUALATTRS_TYPE_NAME_MATCHED_SUBTYPE , SLAPI_VIRTUALATTRS_NOT_FOUND (type matched no real or virtual attribute on the entry), or SLAPI_VIRTUALATTRS_LOOP_DETECTED (could not evaluate the virtual attribute)
Set by the server to the actual type name found
Bitmask of SLAPI_REALATTRS_ONLY, SLAPI_VIRTUALATTRS_ONLY , SLAPI_VIRTUALATTRS_REQUEST_POINTERS, SLAPI_VIRTUALATTRS_LIST_OPERATIONAL_ATTRS applied when obtaining the list using slapi_vattr_list_attrs()
Set by the server to a bitmask of SLAPI_VIRTUALATTRS_RETURNED_POINTERS , SLAPI_VIRTUALATTRS_RETURNED_COPIES, SLAPI_VIRTUALATTRS_REALATTRS_ONLY , SLAPI_VIRTUALATTRS_RETURNED_TYPENAME_ONLY, useful for freeing the list
This function offers optimized access to values of attributes in a list set by slapi_vattr_list_attrs().
This function returns 0 for success, in which case:
results contains the current values for type all of the subtypes in e.
type_name_disposition contains information on how each type was matched. Valid values are
SLAPI_VIRTUALATTRS_TYPE_NAME_MATCHED_EXACTLY_OR_ALIAS
SLAPI_VIRTUALATTRS_TYPE_NAME_MATCHED_SUBTYPE
actual_type_name contains the type name as found.
buffer_flags contains the bit mask to be used as input flags for slapi_vattr_values_free().
subtype_count contains the number of subtypes matched.
Otherwise, this function returns the following
SLAPI_VIRTUALATTRS_LOOP_DETECTED (failed to evaluate a virtual attribute).
SLAPI_VIRTUAL_NOT_FOUND (type not recognized by any virtual attribute and not a real attr in entry).
ENOMEM (memory error).