An attribute set is a set of attribute objects with distinct identifiers. The fn_attr_multi_get(3XFN) operation takes an attribute set as parameter and returns an attribute set. The fn_attr_get_ids(3XFN) operation returns an attribute set containing the identifiers of the attributes.
Attribute sets are represented by the type FN_attrset_t. The following operations are defined for manipulating attribute sets.
fn_attrset_create() creates an empty attribute set. fn_attrset_destroy() releases the storage associated with the attribute set aset. fn_attrset_copy() returns a copy of the attribute set aset. fn_attrset_assign() makes a copy of the attribute set src and assigns
it to dst, releasing any old contents of dst. A pointer to the same object as dst is returned.
fn_attrset_get() returns the attribute with the given identifier attr_id from aset. fn_attrset_count() returns the
number attributes found in the attribute set aset.
fn_attrset_first() and fn_attrset_next() are functions that can be used to return an enumeration of all the attributes in an attribute set. The attributes are
not ordered in any way. There is no guaranteed relation between the order in which items are added to an attribute set and the order of the enumeration. The specification does guarantee that any two enumerations
will return the members in the same order, provided that no fn_attrset_add() or fn_attrset_remove() operation was performed on the object in between or during the two
enumerations. fn_attrset_first() returns the first attribute from the set and sets iter_pos after the first attribute. fn_attrset_next ()
returns the attribute following iter_pos and advances iter_pos.
fn_attrset_add() adds the attribute attr to the attribute set aset, replacing the attribute's values if the identifier of attr is not distinct in aset and exclusive is 0. If exclusive is non-zero and the identifier of attr is not distinct in aset, the operation fails.
fn_attrset_remove() removes the attribute with the identifier attr_id from aset. The operation succeeds even if no such attribute occurs
in aset.
|