NAME

om_get - Creates a public copy of all or particular parts of a private object

SYNOPSIS

#include <xom.h>

OM_return_code om_get(
        OM_private_object original,
        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 *copy,
        OM_value_position *total_number);

PARAMETERS

Input

original
The original that remains accessible.

exclusions
Explicit requests for zero or more exclusions, each of which reduces the copy to a prescribed portion of the original. The exclusions apply to the attributes of the object, but not to those of its subobjects.

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.

The OM_EXCLUDE_ALL_BUT_THESE_VALUES exclusion affects the choice of descriptors, while the OM_EXCLUDE_VALUES exclusion affects the composition of descriptors.

included_types
This parameter is present if and only if the OM_EXCLUDE_ALL_BUT_THESE_TYPES exclusion is requested; it identifies the types of the attributes to be included in the copy (provided that they are displayed in the original).

local_strings
This Boolean parameter indicates whether conversion to local string format should be carried out or not. For further information on local strings please refer to Chapter 10 of the OSF DCE Application Development Guide.

initial_value
This parameter is present if and only if the OM_EXCLUDE_ALL_BUT_THESE_VALUES exclusion is requested; it specifies the position within each attribute of the first value to be included in the copy.

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.

limiting_value
This parameter is present if and only if the OM_EXCLUDE_ALL_BUT_THESE_VALUES exclusion is requested; it specifies the position within each attribute one beyond that of the last value to be included in the copy. If this parameter is not greater than the initial_value parameter, no values are included (and no descriptors are returned).

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.

Output

copy
The copy parameter is only present if the return value from OM_return_code is OM_SUCCESS and the OM_EXCLUDE_DESCRIPTORS exclusion is not specified.

The space occupied by the public object and every attribute value that is a string is service provided. If the client alters any part of that space, the effect upon the service's subsequent behavior is unspecified.

total_number
The number of attribute descriptors returned in the public object, but not in any of its subobjects, based on the inclusion and exclusion parameters specified. If the OM_EXCLUDE_DESCRIPTORS exclusion is specified, no copy result is returned and the total_number result reflects the actual number of attribute descriptors that would be returned based on the remaining inclusion and exclusion values.

Note that the total includes only the attribute descriptors in the copy parameter. It excludes the special descriptor signaling the end of a public object.

DESCRIPTION

The om_get() function creates a new public object (the copy) that is an exact, but independent, copy of an existing private object, the original parameter. 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 copy 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.

Note that the client can access long values by means of om_read().

RETURN VALUES

OM_return_code
Indicates whether the function succeeded and, if not, why not. If the function is successful, the value of OM_return_code is set to OM_SUCCESS; if the function fails, it has one of the error values listed in this reference page.

The exact constants for OM_return_code are defined in the xom.h header file (see the xom.h(4xom) reference page).

ERRORS


© 1990-1996, Transarc Corporation