### OM Object Attributes

OM objects are composed of OM attributes. OM objects may contain zero or more OM attributes. Every OM attribute has zero or more values. An attribute comprises an integer that indicates the attribute's value. Each value is accompanied by an integer that indicates that value's syntax.

An OM attribute type is a category into which all the values of an OM attribute are placed on the basis of its purpose. Some OM attributes may either have zero, one, or multiple values. The OM attribute type is used as the name of the OM attribute.

A syntax is a category into which a value is placed on the basis of its form. OM_S_PRINTABLE_STRING is an example of a syntax.

An OM attribute value is an information item that can be viewed as a characteristic or property of the OM object of which it is a part.

OM attribute types and syntaxes have integer values and symbolic equivalents assigned to them for ease of use by naming authorities in the various API specifications. The integers that are assigned to the OM attribute type and syntax are fixed, but the attribute values may change. These OM attribute types and syntaxes are defined in the DCE implementation of XDS and XOM APIs in header files that are included with the software along with additional OM attributes specific to the GDS implementation.

The following figure shows the internal structure of an OM object.

The Internal Structure of an OM Object

The tables in the following figure show the OM attributes, syntax, and values for the OM class DS_C_ENTRY_INFO_SELECTION, and how the integer values are mapped to corresponding names in the xom.h and xds.h header files. The topics in Part 4 of this guide contain tables for every OM class supported by the directory service. Refer to XDS Class Definitions for a complete description of DS_C_ENTRY_INFO_SELECTION and the accompanying table.

DS_C_ENTRY_INFO_SELECTION is a subclass of OM_C_OBJECT. This information is supplied in the description of this OM class in Object Management Package. As such, DS_C_ENTRY_INFO_SELECTION inherits the OM attributes of OM_C_OBJECT. The only OM attribute of OM_C_OBJECT is OM_CLASS. OM_CLASS identifies the object's OM class, which in this case is DS_C_ENTRY_INFO_SELECTION. DS_C_ENTRY_INFO_SELECTION identifies information to be extracted from a directory entry and has the following OM attributes, in addition to those inherited from OM_C_OBJECT:

· DS_ALL_ATTRIBUTES

· DS_ATTRIBUTES_SELECTED

· DS_INFO_TYPE

As part of an XDS function call, DS_ALL_ATTRIBUTES specifies to the directory service whether all the attributes of a directory entry are relevant to the application program. It can take the values OM_TRUE or OM_FALSE. These values are defined to be of syntax OM_S_BOOLEAN. The value OM_TRUE indicates that information is requested on all attributes in the directory entry. The value OM_FALSE indicates that information is only requested on those attributes that are listed in the OM attribute DS_ATTRIBUTES_SELECTED.

DS_ATTRIBUTES_SELECTED lists the types of attributes in the entry from which information is to be extracted. The syntax of the value is specified as OM_S_OBJECT_IDENTIFIER_STRING .

OM_S_OBJECT_IDENTIFIER_STRING contains an octet string of integers that are BER encoded object identifiers of the types of OM attributes in the OM attribute list. The value of DS_ATTRIBUTES_SELECTED is significant only if the value of DS_ALL_ATTRIBUTES is OM_FALSE, as described previously.

DS_INFO_TYPE identifies what information is to be extracted from each OM attribute identified. The syntax of the value is specified as Enum(DS_Information_Type). DS_INFO_TYPE is an enumerated type that has two possible values: DS_TYPES_ONLY and DS_TYPES_AND_VALUES. DS_TYPES_ONLY indicates that only the attribute types in the entry are returned by the directory service operation. DS_TYPES_AND_VALUES indicates that both the types and the values of the attributes in the directory entry are returned.

A typical directory service operation, such as a read operation (ds_read( )), requires the entry_information_selection parameter to specify to the directory service the information to be extracted from the directory entry. This entry_information_selection parameter is built by the application program as a public object (Public Objects describes how to create a public object), and is included as a parameter to the ds_read( ) function call, as shown in the following code fragment from example.c:

/*

* Public Object ("Descriptor List") for

* Entry-Information-Selection

* parameter to ds_read().

*/

OM_descriptor selection[] = {

OM_OID_DESC(OM_CLASS,DS_C_ENTRY_INFO_SELECTION),

{ DS_ALL_ATTRIBUTES, OM_S_BOOLEAN, { OM_FALSE, NULL } },

OM_OID_DESC(DS_ATTRIBUTES_SELECTED, DS_A_PHONE_NBR),

{ DS_INFO_TYPE,OM_S_ENUMERATION,

{ DS_TYPES_AND_VALUES,NULL } },

OM_NULL_DESCRIPTOR

};

CHECK_DS_CALL(ds_read(session, DS_DEFAULT_CONTEXT,

name, selection, &result, &invoke_id));

Mapping the Class Definition of DS_C_ENTRY_INFO_SELECTION

###