OSI/MHS Gateway Programmatic Interface (GPI) Programming Guide

C Program Example
OSI/MHS Gateway Programmatic Interface (GPI) Programming Guide424822-001
B-18
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 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 (" Insert the object into the root
object\n");
descriptor_count = 1;
descriptor_list[0].type = MH_T_ORIGINAL_EITS;
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_ ( root_id, /* Root object */
IGNORED_FOR_SINGLE_VALUED_ATT,
descriptor_list,
descriptor_count);
} /* if */
} /* if */
return (local_rc);
} /* build_and_insert_eits_object */
#pragma page
/**************************************************************************/
/* Function Name: build_and_insert_orname_object */
/* */
/* Arguments: root_id IN */
/* */
/* Return: Return code from the function call */
/* */
/* Description: This function creates the mh_c_or_name 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 root object. */
/**************************************************************************/
unsigned short build_and_insert_orname_object (unsigned long root_id)
{
unsigned short
local_rc; /* Return code from the function call */
unsigned long
descriptor_count = 6, /* Count of the elements */
local_object; /* Local object identifier */
/********************************************************************/
/* NOTE: The values below are hardcoded. We recommend using the */
/* values passed back in the environment object returned from */
/* the GPI_OPEN_ call. */
/********************************************************************/