PreviousNext

Data Types for XOM API Calls

The following code fragment from example.h shows how the data types are used to declare the variables that contain the input and output parameters for the XOM API function calls.

/*

* variables to extract the telephone number(s)

*/

OM_type entry_list[] = { DS_ENTRY, 0 };

OM_type attributes_list[] = { DS_ATTRIBUTES, 0 };

OM_type telephone_list[] = { DS_ATTRIBUTE_VALUES, 0 };

OM_public_object entry;

OM_public_object attributes;

OM_public_object telephones;

OM_descriptor *telephone; /* current phone number */

OM_value_position total_num; /* number of Attribute Descriptors */

The code fragment shows the following:

· The series of om_get( ) calls requires a list of OM attribute types that identifies the types of OM attributes to be included in the operation. The variables entry_list, attribute_list, and telephone_list are declared as type OM_type.

· The series of om_get( ) calls return pointers to variables of type OM_public_object. The om_get( ) call generates public objects that are accessible to the application program.

· Where the variable total_num is type OM_value_position and is used to hold the number of OM descriptors returned by om_get( ).

Information Syntaxes contains detailed descriptions of all the data types defined by XOM API.