OSI/MHS Gateway Programmatic Interface (GPI) Programming Guide
TAL Program Example
OSI/MHS Gateway Programmatic Interface (GPI) Programming Guide—424822-001
A-14
END; -- End build_and_insert_bilateral_obj
?page
---------------------------------------------------------------------------
-- Function Name: build_and_insert_ipmid_object --
-- --
-- Arguments: root_id IN --
-- object_id IN --
-- --
-- Return: Return code from the function call --
-- --
-- Description: This function creates the im_c_ipm_identifier object--
-- with the initial value parameter set to FALSE. The --
-- function then inserts all the required attributes --
-- into the object. It then inserts the object into --
-- the im_c_interpersonal_message object. --
---------------------------------------------------------------------------
INT PROC build_and_insert_ipmid_object ( root_id, object_id);
INT(32) root_id; -- Root object identifier
INT(32) object_id; -- Object identifier from
-- the layer above
BEGIN
INT local_rc; -- Return code from the function call
INT(32)
descriptor_count := 1D, -- 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:1]; -- Descriptor list
descriptor_list[0].type := IM_T_USER_RELATIVE_IDENTIFIER;
descriptor_list[0].syntax := OM_S_PRINTABLE_STRING;
descriptor_list[0].value.z_string.length := 10D ;
data_buf_in ':=' "MY-USER-ID" ;
@descriptor_list[0].value.z_string.elements := @data_buf_in;
printf (" Create the object");
local_rc := GPI_OM_CREATE_ ( IM_C_IPM_IDENTIFIER, -- Class of the object
OM_FALSE, -- Without defined intial
-- values
local_object,
root_id, -- Root object identifier
); -- Session not necessary
IF (( local_rc = OM_RC_SUCCESS ) or ( local_rc = ZGPI_RC_WARNING )) THEN
BEGIN
IF ( local_rc = ZGPI_RC_WARNING ) THEN
printfd (" WARNING! number: ", local_rc );
printf (" Insert all the required attributes");
local_rc := GPI_OM_INSERT_ ( local_object,
IGNORED_FOR_SINGLE_VALUED_ATT,
descriptor_list,
descriptor_count);
IF (( local_rc = OM_RC_SUCCESS ) or (local_rc = ZGPI_RC_WARNING)) THEN
BEGIN
IF ( local_rc = ZGPI_RC_WARNING ) THEN
printfd (" WARNING! number: ", local_rc );
printf (" " &
"Insert the object into the IM_C_INTERPERONAL_MESSAGE " &