OSI/MHS Gateway Programmatic Interface (GPI) Programming Guide

TAL Program Example
OSI/MHS Gateway Programmatic Interface (GPI) Programming Guide424822-001
A-45
BEGIN
printf (" MH_T_CONTENT dosen't exist");
END; -- else
END; -- then
RETURN (local_rc);
END; -- End print_message
?page
---------------------------------------------------------------------------
-- Function Name: print_root_object --
-- --
-- Arguments: root_id IN --
-- --
-- Return: Return code from the function call --
-- --
-- Description: This function uses GPI_OM_FETCH_ to determine the --
-- class of the received root object. If the class is --
-- MH_C_MESSAGE, it will call the function --
-- print_message to print the message. Probes and --
-- reports are ignored. --
---------------------------------------------------------------------------
INT PROC print_root_object ( root_id );
INT(32) root_id;
BEGIN
INT
local_rc; -- Return code from a function call
INT(32)
actual_string_len, -- Returns the actual string length in the
-- buffer
descriptor_count := 1D, -- Number of attributes in the descriptor list
message_class, -- Class of the message
total_string_len; -- Returns the total number of bytes
STRING
string_buffer[0:STRING_BUFFER_LEN]; -- Buffer for the strings
STRUCT
.EXT f_descriptor_list(OM_descriptor)[0:MAX_DESCRIPTORS];
-- Descriptor list for fetch
STRUCT
.EXT descriptor_list_out(OM_descriptor)[0:MAX_DESCRIPTORS];
-- Descriptor list for output form fetch
f_descriptor_list[0].type := OM_T_CLASS;
local_rc := GPI_OM_FETCH_ ( root_id, -- Root object identifier
OM_TRUE, -- Values returned
f_descriptor_list,
descriptor_count,
descriptor_list_out,
string_buffer,
STRING_BUFFER_LEN,
actual_string_len,
total_string_len);
IF (( local_rc = OM_RC_SUCCESS ) OR ( local_rc = ZGPI_RC_WARNING )) THEN
BEGIN