OSI/MHS Gateway Programmatic Interface (GPI) Programming Guide

Writing Your Program
OSI/MHS Gateway Programmatic Interface (GPI) Programming Guide424822-001
5-32
Retrieving Information From a Root Object
Inspecting values of a multivalued attribute (using GPI_OM_LIST_ )
Reading a long string from an attribute value (using GPI_OM_READ_ )
The sequence and nature of these tasks varies, depending on the client’s specific
objectives. Table 5-3 shows a typical example.
Inspecting an Object for Specific Attribute Types
You call the GPI_OM_FETCH_ procedure to check for one or more specific attribute
types within an object. Optionally, you can retrieve the syntax and value for a specific
type of single-valued attribute. To retrieve a value of a multivalued attribute, use the
GPI_OM_LIST_ procedure.
GPI_OM_FETCH_ typically is used as a sorting mechanism. For example, you might
call GPI_OM_FETCH_ to determine if an inbound root object is a message, probe,
report, or P1-encoded object.
Parameters for GPI_OM_FETCH_ are:
object (input)
values (input)
descriptor-list-in (input)
descriptor-count (input)
descriptor-list-out (output)
string-buffer (output; optional)
string-buffer-length (input; optional)
actual-string-length (output; optional)
total-string-length (output; optional)
object specifies the identifier of the object for which you want information.
values specifies whether or not to return the value and syntax of any single-valued
attributes, as follows:
OM-TRUE requests return of the syntax and value.
OM-FALSE requests return of the attribute type only.
Table 5-3. Sequence for Retrieving Information From a Root Object
Task Explanation Procedure(s) Used
1 Do initial inspection (sort for specific attributes) GPI_OM_FETCH_
1
2 Dump all attributes or groups of attributes GPI_OM_EXAMINE_
1
3 List values of multivalued attributes GPI_OM_LIST_
2
4 Read values that are long strings GPI_OM_READ_
1
Can only retrieve values that are short strings and retrieves syntax and values for single-valued attributes only
2
Retrieves syntax and values for single-valued attributes only