OSF DCE Application Development Guide--Core Components
The Extended Attribute API
is a tagged union of the actual value assigned (or to be assigned to the attribute instance)
and a data type of sec_attr_encoding_t that specifies the encoding tags that define the
attribute type characteristics. Figure 28-2 illustrates the structure of a sec_attr_t data
type.
Figure 28-2. The sec_attr_t Data Type
sec_attr_t
sec_attr_value_t
sec_attr_encoding_t
attribute type UUID
encoding tags
tagged union: value of
the attribute instance in
the format indicated by
sec_attr_encoding_t
28.3.2 Creating and Managing Attribute Instances
This section describes the calls to create, modify, and delete the attribute instances.
28.3.2.1 The sec_rgy_attr_update( ) Call
The sec_rgy_attr_update( ) call creates new attribute instances and updates existing
attribute instances attached to an object specified by name and registry domain. The
instances to be created or updated are passed as an array of sec_attr_t data types.
Because the new values are passed in as an array, if the update of any attribute instance
in the array fails, all fail. However, to help pinpoint the cause of the failure, the call
identifies the first attribute whose update failed in a failure index by array element
number.
For existing attribute instances attached to the object, the values passed in the array
overwrite the existing values. In other words, if the UUID passed in the input array
matches the UUID of an existing instance, the values passed in overwrite the existing
values.
If the attribute instance does not exist, it is created. In other words, if the UUID passed
in in the array does not match any other attribute type UUID attached to the object, a
new attribute instance is created.
124245 Tandem Computers Incorporated 28− 15