OSI/MHS Gateway Programmatic Interface (GPI) Programming Guide
C Program Example
OSI/MHS Gateway Programmatic Interface (GPI) Programming Guide—424822-001
B-7
 while (counter < number )
 {
 if ( att_list[counter].type == type )
 {
 position = counter;
 counter = (short) number; /* Leave the loop; type was found */
 } /* if */
 counter++;
 } /* while */
 return (position);
} /* search_descriptor */
#pragma page
/**************************************************************************/
/* Function Name: insert_root_attributes */
/* */
/* Arguments: root_id IN */
/* */
/* Return: Return code from the function call */
/* */
/* Description: When the root object identifer has been created, */
/* this function is called to insert the desired root- */
/* level attributes into the object. Only the required */
/* attributes are inserted. */
/**************************************************************************/
unsigned short insert_root_attributes (unsigned long root_id)
{
 unsigned short
 local_rc; /* Return code from the function call */
 unsigned long
 descriptor_count = 7; /* Count of the elements to insert */
 OM_descriptor
 descriptor_list[] =
 {
 MH_T_ALTERNATE_RECIP_ALLOWED, OM_S_BOOLEAN, { OM_FALSE },
 MH_T_CONTENT_IDENTIFIER, OM_S_PRINTABLE_STRING,{ 1 , "-" },
 MH_T_CONTENT_RETURN_REQUESTED,OM_S_BOOLEAN, { OM_FALSE },
 MH_T_CONTENT_TYPE, OM_S_INTEGER, { MH_CTI_P2_1988 },
 MH_T_CONVERSION_PROHIBITED, OM_S_BOOLEAN, { OM_FALSE },
 MH_T_DISCLOSURE_ALLOWED, OM_S_BOOLEAN, { OM_FALSE },
 MH_T_PRIORITY, OM_S_ENUMERATION, { MH_PTY_NORMAL }
 };
 local_rc = GPI_OM_INSERT_ ( root_id, /* Root object identifier */
 IGNORED_FOR_SINGLE_VALUED_ATT,
 descriptor_list,
 descriptor_count);
 return (local_rc);
} /* insert_root_attributes */
#pragma page
/**************************************************************************/
/* Function Name: build_and_insert_bilateral_object */
/* */
/* Arguments: root_id IN */
/* */










