NAME FN_attrset_t, fn_attrset_create, fn_attrset_destroy, fn_attrset_copy, fn_attrset_assign, fn_attrset_get, fn_attrset_count, fn_attrset_first, fn_attrset_next, fn_attrset_add, fn_attrset_remove - a set of XFN attributes SYNOPSIS cc [ flag ... ] file ... -lxfn [ library ... ] #include <xfn/xfn.h> FN_attrset_t *fn_attrset_create(void); void fn_attrset_destroy(FN_attrset_t *aset); FN_attrset_t *fn_attrset_copy(constFN_attrset_t *aset); FN_attrset_t *fn_attrset_assign(FN_attrset_t *dst, const FN_attrset_t *src); const FN_attribute_t *fn_attrset_get(constconst FN_attrset_t *aset, const FN_identifier_t *attr_id); unsigned int fn_attrset_count(constFN_attrset_t *aset); const FN_attribute_t *fn_attrset_first(constFN_attrset_t *aset, void **iter_pos); const FN_attribute_t *fn_attrset_next(constFN_attrset_t *aset, void **iter_pos); int fn_attrset_add(FN_attrset_t *aset, const FN_attribute_t *attr, unsigned int exclusive); int fn_attrset_remove(FN_attrset_t *aset, const FN_identifier_t *attr_id); DESCRIPTION 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 iden- tifier 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 follow- ing 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 dis- tinct in aset, the operation fails. fn_attrset_remove() removes the attribute with the identif- ier attr_id from aset. The operation succeeds even if no such attribute occurs in aset. RETURN VALUES fn_attrset_first() returns 0 if the attribute set is empty. fn_attrset_next() returns 0 if there are no more attributes in the set. fn_attrset_add() and fn_attrset_remove() return 1 if the operation succeeds, and 0 if the operation fails. USAGE Manipulation of attributes using the operations described in this manual page does not affect their representation in the underlying naming system. Changes to attributes in the underlying naming system can only be effected through the use of the interfaces described in xfn_attributes(3XFN). ATTRIBUTES See attributes(5) for descriptions of the following attri- butes: ____________________________________________________________ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | |_____________________________|_____________________________| | MT-Level | MT-Safe | |_____________________________|_____________________________| SEE ALSO FN_attribute_t(3XFN), FN_attrvalue_t(3XFN), FN_identifier_t(3XFN), fn_attr_get_ids(3XFN), fn_attr_multi_get(3XFN), xfn(3XFN), xfn_attributes(3XFN), attributes(5) NOTES The implementation of XFN in this Solaris release is based on the X/Open preliminary specification. It is likely that there will be minor changes to these interfaces to reflect changes in the final version of this specification. The next minor release of Solaris will offer binary compatibility for applications developed using the current interfaces. As the interfaces evolve toward standardization, it is possible that future releases of Solaris will require minor source code changes to applications that have been developed against the preliminary specification.
Закладки на сайте Проследить за страницей |
Created 1996-2024 by Maxim Chirkov Добавить, Поддержать, Вебмастеру |