OSI/MHS Gateway Programmatic Interface (GPI) Programming Guide

TAL Program Example
OSI/MHS Gateway Programmatic Interface (GPI) Programming Guide424822-001
A-17
printf (" " &
"Insert the object into the " &
"IM_C_INTERPERSONAL_MESSAGE object");
descriptor_count := 1D;
descriptor_list[0].type := IM_T_BODY;
descriptor_list[0].syntax := OM_S_OBJECT;
descriptor_list[0].value.object.padding := 0D;
descriptor_list[0].value.object.object := local_object;
local_rc := GPI_OM_INSERT_ ( object_id, -- Object identifier
-- from the layer
-- above
IGNORED_FOR_SINGLE_VALUED_ATT,
descriptor_list,
descriptor_count);
END; -- then
END; -- then
END; -- then
END; -- then
RETURN (local_rc);
END; -- End build_and_insert_txtbody_object
?page
---------------------------------------------------------------------------
-- Function Name: build_and_insert_ipm_object --
-- --
-- Arguments: root_id IN --
-- --
-- Return: Return code from the function call --
-- --
-- Description: This function creates the im_c_interpersonal_message--
-- with the initial value parameter set to FALSE. The --
-- function then inserts all the required attributes --
-- into the object. It also calls the function --
-- build_and_insert_txtbody_object and the function --
-- build_and_insert_ipmid_object to create and insert --
-- these subobjects. After this, it then inserts the --
-- object into the root object. --
---------------------------------------------------------------------------
INT PROC build_and_insert_ipm_object (root_id);
INT(32) root_id;
BEGIN
INT
local_rc; -- Return code from the function call
INT(32)
descriptor_count := 4D, -- Count of the elements
local_object; -- Local object identifier
STRING .EXT data_buf_in[0:131]; -- Buffer for the string data
STRUCT
.EXT descriptor_list(OM_descriptor)[0:3]; -- Descriptor list
-- Initialize the descriptor list
descriptor_list[0].type := IM_T_AUTO_FORWARDED;
descriptor_list[0].syntax := OM_S_BOOLEAN;
descriptor_list[0].value.boolean := OM_FALSE ;
descriptor_list[1].type := IM_T_IMPORTANCE;
descriptor_list[1].syntax := OM_S_ENUMERATION;
descriptor_list[1].value.enumeration := IM_ROUTINE ;