Sun Microsystems, Inc.
spacerspacer
spacer   www.sun.com docs.sun.com | | |  
spacer
black dot
   
A   B   C   D   E   F   G   H   I   J   K   L   M   N   O   P   Q   R   S   T   U   V   W   X   Y   Z
    
 
XFN Interface Library FunctionsFN_attrmodlist_t(3XFN)


NAME

 FN_attrmodlist_t, fn_attrmodlist_create, fn_attrmodlist_destroy, fn_attrmodlist_copy, fn_attrmodlist_assign, fn_attrmodlist_count, fn_attrmodlist_first, fn_attrmodlist_next, fn_attrmodlist_add - a list of attribute modifications

SYNOPSIS

 
cc [ flag ... ] file ... -lxfn [ library ... ]
#include <xfn/xfn.h>
FN_attrmodlist_t *fn_attrmodlist_create(void);
 void fn_attrmodlist_destroy(FN_attrmodlist_t *modlist);
 FN_attrmodlist_t *fn_attrmodlist_copy(const FN_attrmodlist_t *modlist);
 FN_attrmodlist_t *fn_attrmodlist_assign(FN_attrmodlist_t *dst, const FN_attrmodlist_t *src);
 unsigned int fn_attrmodlist_count(const FN_attrmodlist_t *modlist);
 const FN_attribute_t *fn_attrmodlist_first(const FN_attrmodlist_t *modlist, void **iter_pos, unsigned int *first_mod_op);
 const FN_attribute_t *fn_attrmodlist_next(const FN_attrmodlist_t *modlist, void **iter_pos, unsigned int *mod_op);
 int fn_attrmodlist_add(FN_attrmodlist_t *modlist, unsigned int mod_op, const FN_attribute_t *attr);

DESCRIPTION

 

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

  • FN_ATTR_OP_REMOVE_VALUES

(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.

RETURN VALUES

 

fn_attrmodlist_first() returns 0 if the modification list is empty. fn_attrmodlist_next() returns 0 if there are no more items on the modification list to be enumerated or if the iteration marker is invalid.

fn_attrmodlist_add() returns 1 if the operation succeeds, 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 attributes:

ATTRIBUTE TYPEATTRIBUTE VALUE
MT-LevelMT-Safe

SEE ALSO

 

FN_attribute_t(3XFN), FN_attrset_t(3XFN), FN_identifier_t(3XFN), fn_attr_modify(3XFN), fn_attr_multi_modify(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.


SunOS 5.9Go To TopLast Changed 13 Dec 1996

 
      
      
Copyright 2002 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.