OSI/MHS Gateway Programmatic Interface (GPI) Programming Guide
C Program Example
OSI/MHS Gateway Programmatic Interface (GPI) Programming Guide—424822-001
B-2
* object.
***************************************************************************/
/* Standard include files from the C run-time library */
#pragma nolist
#include <stdioh>
#include <stddefh>
#include <talh>
#include <stringh>
#pragma list
/* Defines */
#define FIRST 1 /* Flag for the multivalued attribute */
#define SECOND 2 /* Flag for the multivalued attribute */
#define MAX_DESCRIPTORS 20 /* Maximum number of elements in the */
/* descriptor list */
#define STRING_BUFFER_LEN 100 /* Length of the string buffer */
#define IGNORED_FOR_SINGLE_VALUED_ATT 0L /* This parameter is ignored for */
/* GPI_OM_INSERT_ for single valued */
/* attributes */
#define FIRST_LINE_LEN 35 /* Length of the 1st line of the IM_T_TEXT */
#define SECOND_LINE_LEN 24 /* Length of the 2nd line of the IM_T_TEXT */
/* Include files for the GPI */
#pragma nolist
#include "gpidefsh"
#include "gpiexth"
#pragma list
/* Typedefs */
/*
* This typedef is used for all print_* functions. It contains the
* attribute type and a pointer to the attribute name in ASCII.
*
*/
typedef struct
{
OM_type type;
char *text;
} PRINT_DEF;
typedef union
{
long structure_type; /* Type of the info buffer */
char info_buffer[ZGPI_MAX_STATUS_BUF_LEN];
/* Buffer for additional error information */
zgpi_info_1_def info_struc_1;
zgpi_info_2_def info_struc_2;
zgpi_info_3_def info_struc_3;
zgpi_info_4_def info_struc_4;
zgpi_info_5_def info_struc_5;
} ERROR_INFO;
/* Global variables */
Note. A sample of program output appears at the end of this appendix.