OSI/MHS P7 Application Programmatic Interface (P7 API) Manual
C Language Example Program
OSI/MHS P7 Application Programmatic Interface (P7 API) Manual—424825-001
E-15
/***************************************************************************/
void
mapSendFileNum( int sendFile,
 int *resultFile)
{
 int i;
 for ( i = 0 ; SendFileNum[i] != sendFile ; ++i)
 ;
 *resultFile = ResultFileNum[i];
 return;
}
/***************************************************************************/
/* Function name: mapResultFileNum */
/* */
/* Arguments: resultFile */
/* sendFile */
/* */
/* Description: This function gets the corresponding send file */
/* number given a result file number. */
/* */
/***************************************************************************/
void
mapResultFileNum( int resultFile,
 int *sendFile)
{
 int i;
 for ( i = 0 ; ResultFileNum[i] != resultFile ; ++i)
 ;
 *sendFile = SendFileNum[i];
 return;
}
/***************************************************************************/
/* Function name: informClient */
/* */
/* Arguments: dataType */
/* buffer */
/* */
/* Description: This function outputs the data received from a Send or */
/* Result completion. */
/* */
/***************************************************************************/
void
informClient( int dataType,
 zmhs_ddl_uapi_request_def *buffer)
{
 printf("\nThe Buffer contains:\n");
 printf("Common Fields: Version Number (%ld)\n",
 (long)buffer->zcommon_fields.zversion_number);
 printf("Common Fields: Association Number (%ld) \n",
 (long)buffer->zcommon_fields.zassoc_number);
 switch ( dataType )
 {
 case ZMHS_VAL_DT_MS_BIND_RESULT:
 printf("Bind Result : Sequence Number (%d)\n",
 buffer->u_zresult_reply.zresult_reply.zseq_number);
 printf("Bind Result : Continuation Marker (%ld)\n",
 (long)buffer-
>u_zresult_reply.zresult_reply.zcont_marker.zflag);
 printf("Bind Result : Length (%ld)\n",
 (long)buffer->u_zresult_reply.zresult_reply.zlength);
 printf("Bind Result : Total Length (%ld)\n",
 (long)buffer->u_zresult_reply.zresult_reply.ztotal_length);
 printf("Bind Result : Bind Indication (%ld)\n",










