OSI/MHS Gateway Programmatic Interface (GPI) Reference Manual
Information Architecture and Data Structures
OSI/MHS Gateway Programmatic Interface (GPI) Reference Manual—522223-001
2-9
String Buffers
String Buffers
As shown in the preceding data structures, the descriptor of an attribute of syntax OM-S-
xxx-STRING contains a string length and pointer. The GPI always returns length-
specified strings. Strings are never terminated by a null character. You must use the
length to determine the location of the end of the string.
Figure 2-6
shows an example of how string values are returned in a string buffer by the
GPI_OM_EXAMINE_ , GPI_OM_FETCH_ , and GPI_OM_LIST_ procedures. If a
value does not fit, the pointer to the string element (in the descriptor) is
OM-ELEMENTS-UNSPECIFIED. The string length returned in the descriptor is the
actual length of the string. If a subsequent string fits in the buffer, the GPI returns that
value, even though the preceding one is not returned.
Figure 2-5. Descriptor List for Multivalued Attribute
Reserved Object
Attribute
Position 0
Attribute
Position 1
Attribute
Position 2
Value
Position 0
Value
Position 1
Value
Position 2
Attribute
Position 4
Value
Position 0
GPI_OM_LIST_
Descriptor-List
Buffer
Descriptor of
Single-Valued
Attribute
Descriptor of
Multivalued
Attribute
Descriptor of
Multivalued
Attribute
Descriptor of
Multivalued
Attribute
Descriptor of
Single-Valued
Attribute
Descriptor of
Single-Valued
Attribute
Descriptor of
Multivalued
Attribute
Descriptor of
Multivalued
Attribute
Descriptor of
Multivalued
Attribute
Descriptor of
Multivalued
Attribute
Attribute
Position 3
205VST .VSD