OSI/MHS Gateway Programmatic Interface (GPI) Programming Guide

C Program Example
OSI/MHS Gateway Programmatic Interface (GPI) Programming Guide424822-001
B-10
IM_T_USER_RELATIVE_IDENTIFIER,OM_S_PRINTABLE_STRING,{ 10 ,"MY-USER-ID"
}
};
printf (" Create the object\n");
local_rc = GPI_OM_CREATE_ ( IM_C_IPM_IDENTIFIER,/* Class of the object */
OM_FALSE, /* Without defined initial */
/* values */
&local_object,
root_id, /* Root object identifier */
); /* Session not necessary */
if (( local_rc == OM_RC_SUCCESS ) || ( local_rc == ZGPI_RC_WARNING ))
{
if ( local_rc == ZGPI_RC_WARNING )
printf (" WARNING! number: %d \n", local_rc );
printf (" Insert all the required
attributes\n");
local_rc = GPI_OM_INSERT_ ( local_object,
IGNORED_FOR_SINGLE_VALUED_ATT,
descriptor_list,
descriptor_count);
if (( local_rc == OM_RC_SUCCESS ) || ( local_rc == ZGPI_RC_WARNING ))
{
if ( local_rc == ZGPI_RC_WARNING )
printf (" WARNING! number: %d \n", local_rc );
printf (" ");
printf ("Insert the object into the IM_C_INTERPERONAL_MESSAGE ");
printf ("object\n");
descriptor_count = 1;
descriptor_list[0].type = IM_T_THIS_IPM;
descriptor_list[0].syntax = OM_S_OBJECT;
descriptor_list[0].value.object.padding = 0;
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);
} /* if */
} /* ir */
return (local_rc);
} /* build_and_insert_ipmid_object */
#pragma page
/**************************************************************************/
/* Function Name: build_and_insert_txtbody_object */
/* */
/* Arguments: root_id IN */
/* object_id IN */
/* */
/* Return: Return code from the function call */
/* */
/* Description: This function creates the im_c_ia5_text_body_part */
/* with the initial value parameter set to FALSE. The */
/* function then inserts all the required attributes */