OSI/MHS Gateway Programmatic Interface (GPI) Programming Guide
C Program Example
OSI/MHS Gateway Programmatic Interface (GPI) Programming Guide—424822-001
B-27
printf (" Object OR NAME\n");
local_rc = build_and_insert_orname_object
(*root_id);
/* Create and insert the recipient descriptor */
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 (" Object MESSAGE RD\n");
local_rc = build_and_insert_messagerd_object
(*root_id);
} /* if */
} /* if */
} /* if */
} /* if */
} /* if */
} /* if */
} /* if */
} /* if */
return (local_rc);
} /* build_root_object */
#pragma page
/**************************************************************************/
/* Function Name: print_attributes */
/* */
/* Arguments: number_of_printdata IN */
/* print_data IN */
/* descriptor_list IN */
/* max_descriptors IN */
/* */
/* Description: This function takes in two arrays of structures. */
/* The first one, print_data, lists the attributes */
/* that will be printed. The second one, */
/* descriptor_list, contains the data values that */
/* were returned from a previous GPI function call */
/* (GPI_OM_EXAMINE or GPI_OM_FETCH). The function */
/* loops through the first array, and uses */
/* search_descriptor to find the value position in */
/* the descriptor_list. Then, depending on the type, */
/* it prints the value. */
/* */
/* NOTE: In the case of the IM_T_TEXT we use the GPI */
/* function GPI_OM_READ_ to demonstrate its */
/* usage. */
/**************************************************************************/
void print_attributes (unsigned long
number_of_printdata, /* Number of attributes in */
/* the array print_data */
PRINT_DEF
*print_data, /* Array with the type and */
/* print string for the */
/* attributes */
OM_descriptor
*descriptor_list, /* Descriptor list */
unsigned long