OSI/MHS Gateway Programmatic Interface (GPI) Programming Guide

C Program Example
OSI/MHS Gateway Programmatic Interface (GPI) Programming Guide424822-001
B-38
print_arr[2].type = MH_T_PRMD_NAME;
print_arr[3].type = MH_T_ORGANIZATION_NAME;
print_arr[4].type = MH_T_ORGANIZATIONAL_UNIT_NME_1;
print_arr[5].type = MH_T_SURNAME;
print_arr[0].text = " Admd Name: ";
print_arr[1].text = " Country Name: ";
print_arr[2].text = " Prmd Name: ";
print_arr[3].text = " Organization Name: ";
print_arr[4].text = " Organization Unit Name:";
print_arr[5].text = " Surname: ";
printf (" OR Name\n");
print_object ( MH_T_RECIPIENT_NAME,
max_PRINT_DEF,
print_arr,
f_descriptor_list,
descriptor_list,
actual_number);
} /* if */
} /* for */
} /* if */
} /* if */
} /* if */
else
{
printf (" MH_T_CONTENT dosen't exist\n");
} /* else */
} /* if */
return (local_rc);
} /* print_message */
#pragma page
/**************************************************************************/
/* Function Name: print_root_object */
/* */
/* Arguments: root_id IN */
/* */
/* Return: Return code from the function call */
/* */
/* Description: This function uses GPI_OM_FETCH_ to determine the */
/* class of the received root object. If the class is */
/* MH_C_MESSAGE, it will call the function */
/* print_message to print the message. Probes and */
/* reports are ignored. */
/**************************************************************************/
unsigned short print_root_object ( unsigned long root_id )
{
unsigned short
local_rc; /* Return code from a function call */
unsigned long
actual_string_len, /* Returns the actual string length in the */
/* buffer */
descriptor_count = 1, /* Number of attributes in the descriptor */
/* list */
message_class, /* Class of the message */
total_string_len; /* Returns the total number of bytes */
char
string_buffer[STRING_BUFFER_LEN]; /* Buffer for the strings */