#include <xom.h>
#include <xomext.h>
OM_return_code omX_extract(
OM_private_object object,
OM_type_list navigation_path,
OM_exclusions exclusions,
OM_type_list included_types,
OM_boolean local_strings,
OM_value_position initial_value,
OM_value_position limiting_value,
OM_public_object *values,
OM_value_position *total_number);
Apart from OM_NO_EXCLUSIONS, each value is chosen from the following list. When multiple exclusions are specified, each is applied in the order in which it is displayed in the list with lower-numbered exclusions having precedence over higher-numbered exclusions. If, after the application of an exclusion, that portion of the object is not returned, no further exclusions need be applied to that portion.
Note that this exclusion provides a means for determining the values of specified attributes, as well as the syntaxes of those values.
If the attribute has values of two or more syntaxes, the descriptor identifies one of those syntaxes; however, the syntax identified is not specified.
Note that this exclusion provides a means for discerning the presence of multivalued attributes without simultaneously obtaining their values.
Note that, when this exclusion is used in conjunction with the OM_EXCLUDE_ALL_BUT_THESE_TYPES exclusion, it provides a means for determining the values of a specified attribute, as well as the syntaxes of those values, one or more but not all attributes at a time.
Note that this exclusion provides a means for determining an object's composition; that is, the type and syntax of each of its attribute values.
Note that this exclusion provides a means for examining an object one ``level'' at a time.
Note that this exclusion provides an attribute analysis capability. For instance, the total number of values in a multivalued attribute can be determined by specifying an inclusion of the specific attribute type, and exclusions of OM_EXCLUDE_DESCRIPTORS, OM_EXCLUDE_SUBOBJECTS, and OM_EXCLUDE_ALL_BUT_THESE_TYPES.
The OM_EXCLUDE_ALL_BUT_THESE_VALUES exclusion affects the choice of descriptors, while the OM_EXCLUDE_VALUES exclusion affects the composition of descriptors.
If it is OM_ALL_VALUES or exceeds the number of values present in an attribute, the parameter is taken to be equal to that number.
If it is OM_ALL_VALUES or exceeds the number of values present in an attribute, the parameter is taken to be equal to that number.
The memory space for values is provided by omX_extract(). It is the responsibility of the calling function to subsequently release this space through a call to om_delete().
Note that the total includes only the attribute descriptors in the values parameter. It excludes the special descriptor signaling the end of a public object.
The omX_extract() function creates a new public object that is an exact, but independent, copy of an existing subobject in a private object. It is similiar to the om_get() function but includes an additional parameter, navigation_path which contains directions to the required object to be extracted. The client can request certain exclusions, each of which reduces the copy to a part of the original.
One exclusion is always requested implicitly. For each attribute value in the original that is a string whose length exceeds an implementation-defined number, the values parameter includes a descriptor that omits the elements (but not the length) of the string. The elements component of the string component in the descriptor's value component is OM_ELEMENTS_UNSPECIFIED, and the OM_S_LONG_STRING bit of the syntax component is set to OM_TRUE.
The parameters exclusions, included_types, local_strings, initial_value, and limiting_value only apply to the target object being extracted.
Note that the client can access long values by means of om_read().
Refer to xom.h(4xom) for a list of the possible error values that can be returned in OM_return_code.