OSI/MHS P7 Application Programmatic Interface (P7 API) Manual

C Language Example Program
OSI/MHS P7 Application Programmatic Interface (P7 API) Manual424825-001
E-3
#define TRUE ((boolean)1)
#define FALSE ((boolean)0)
/* Define procedure name type for MHS manager name for LOS_OPEN_ */
typedef struct s_ProcName
{
short int length;
char name[36];
}ProcName;
/* Predeclaration of functions in this file */
void awaitCompletion ();
void sendCompletion ( short int fileNum,
char *buffer );
void resultCompletion ( short int fileNum,
char *buffer );
void sendData ( char *buffer,
int connection,
int dataType);
boolean isResultFile( int fileNum);
boolean isSendFile( int fileNum);
void mapSendFileNum( int sendFile,
int *resultFile);
void mapResultFileNum( int resultFile,
int *sendFile);
void getData ( char *buffer,
int dataType,
long int *dataLen);
void reportError( char *string);
void statusError( char *string,
long int status);
void reportFileError ( int function,
int error);
void informClient ( int dataType,
zmhs_ddl_uapi_request_def *buffer);
/* Defines for this program */
#define MAX_CONNECTIONS ZMHS_VAL_LOUAPI_MAX_NUM_SESS
#define RECEIVE_FLAGS 040001 /* Values for $receive open call */
/* All I/O operations on $RECEIVE are nowaited */
/* Only 1 outstanding I/O allowed at a time */
#define RECEIVE_DEPTH 1 /* " " " " " */
#define P7_SUCCESS 0 /* Status return value for P7 */
/* successful function return. */
#define EXIT_PROGRAM 4 /* User menu selection to exit */
/* this program. */
/* Global Variables */
/* These variables hold the */
int SendFileNum[MAX_CONNECTIONS], /* various file numbers used */