An attribute modification list allows for multiple modification operations to be made on the attributes associated with a single named object. It is used in the fn_attr_multi_modify(3XFN) operation.
An attribute modification list is a list of attribute modification specifiers. An attribute modification specifier consists of an attribute object and an operation specifier. The attribute's identifier
indicates the attribute that is to be operated upon. The attribute's values are used in a manner depending on the operation. The operation specifier is an unsigned int that must have
one of the values:
-
FN_ATTR_OP_ADD
-
FN_ATTR_OP_ADD_EXCLUSIVE
-
FN_ATTR_OP_REMOVE
-
FN_ATTR_OP_ADD_VALUES
or
(See fn_attr_modify(3XFN) for detailed descriptions of these specifiers.) The
operations are to be performed in the order in which they appear in the modification list.
fn_attrmodlist_create() creates an empty attribute modification list. fn_attrmodlist_destroy() releases the storage associated with modlist. fn_attrmodlist_copy() returns a copy of the attribute modification list modlist. fn_attrmodlist_assign() makes a copy of src
and assigns it to dst, releasing any old contents of dst. It returns a pointer to the same object as dst.
fn_attrmodlist_count() returns the number attribute modification items in the attribute modification list.
The iterators fn_attrmodlist_first() and fn_attrmodlist_next() return a handle to the attribute part of the modification and return the operation specifier part
through an unsigned int * parameter. fn_attrmodlist_first() returns the attribute of the first modification item from modlist and sets mod_op to be the code of the modification operation of that item; iter_pos is set after the first modification item.
fn_attrmodlist_next() returns the attribute of the next modification item from modlist after iter_pos and advances iter_pos; mod_op is set to the code of the modification operation of that item. The order of the items returned during an enumeration is the same as the order by
which the items were added to the modification list.
fn_attrmodlist_add() adds a new item consisting of the given modification operation code mod_op and attribute attr to the
end of the modification list modlist. attr's identifier indicates the attribute that is to be operated upon. attr's values
are used in a manner depending on the operation.
|