PreviousNext

OM_descriptor

The OM_descriptor data type is used to describe an attribute type and value. Its C declaration is as follows:

typedef struct OM_descriptor_struct

{

OM_type type;

OM_syntax syntax;

union OM_value_union value;

} OM_descriptor;

Note: Other components are encoded in high bits of the syntax member.

See the OM_value data type described in OM_Value or the xom.h(4xom) reference page for a description of the OM_value_union structure.

A data value of this type is a descriptor, which embodies an attribute value. An array of descriptors can represent all the values of all the attributes of an object, and is the representation called OM_public_object. A descriptor has the following components:

· type

An OM_type data type. It identifies the data type of the attribute value.

· syntax

An OM_syntax data type. It identifies the syntax of the attribute value. Components 3 to 7 (that is, the components long-string through private that follow) are encoded in the high-order bits of this structure member. Therefore, the syntax always needs to be masked with the constant OM_S_SYNTAX. An example is the following:

my_syntax = my_public_object[3].syntax &

OM_S_SYNTAX;

my_public_object[4].syntax =

my_syntax + (my_public_object[4].syntax &

~OM_S_SYNTAX);

· long-string

An OM_boolean data type. It is OM_TRUE only if the descriptor is a service-generated descriptor and the length of the value is greater than an implementation-defined limit.

This component occupies bit 15 (0x8000) of the syntax and is represented by the constant OM_S_LONG_STRING.

· no-value

An OM_boolean data type. It is OM_TRUE only if the descriptor is a service-generated descriptor and the value is not present because OM_EXCLUDE_VALUES or OM_EXCLUDE_MULTIPLES is set in om_get( ).

This component occupies bit 14 (0x4000) of the syntax and is represented by the constant OM_S_NO_VALUE.

· local-string

An OM_boolean data type, significant only if the syntax is one of the string syntaxes. It is OM_TRUE only if the string is represented in an implementation-defined local character set. The local character set may be more amenable for use as keyboard input or display output than the nonlocal character set, and it can include specific treatment of line termination sequences. Certain interface functions can convert information in string syntaxes to or from the local representation, which may result in a loss of information.

This component occupies bit 13 (0x2000) of the syntax and is represented by the constant OM_S_LOCAL_STRING. The DCE XOM implementation does not support translation of strings to a local character set.

· service-generated

An OM_boolean data type. It is OM_TRUE only if the descriptor is a service-generated descriptor and the first descriptor of a public object, or the defined part of a private object (see the *(3xom) reference pages).

This component occupies bit 12 (0x1000) of the syntax and is represented by the constant OM_S_SERVICE_GENERATED.

· private

An OM_boolean data type. It is OM_TRUE only if the descriptor in the service-generated public object contains a reference to the handle of a private subobject, or in the defined part of a private object.

Note: This applies only when the descriptor is a service-generated descriptor. The client need not set this bit in a client-generated descriptor that contains a reference to a private object.

In the C interface, this component occupies bit 11 (0x0800) of the syntax and is represented by the constant OM_S_PRIVATE.

· value

An OM_value data type. It identifies the attribute value.