home *** CD-ROM | disk | FTP | other *** search
/ The Fred Fish Collection 1.5 / ffcollection-1-5-1992-11.iso / ff_disks / 200-299 / ff226.lzh / Vlt / xprlib / library / xproto.h < prev   
C/C++ Source or Header  |  1989-06-25  |  4KB  |  85 lines

  1. /** xproto.h
  2. *
  3. *   Include file for External Protocol Handling
  4. *
  5. **/
  6. /*
  7. *   The structure
  8. */
  9. struct XPR_IO {
  10.                   char  *xpr_filename;      /* File name(s)             */
  11.                   long (*xpr_fopen)();      /* Open file                */
  12.                   long (*xpr_fclose)();     /* Close file               */
  13.                   long (*xpr_fread)();      /* Get char from file       */
  14.                   long (*xpr_fwrite)();     /* Put string to file       */
  15.                   long (*xpr_sread)();      /* Get char from serial     */
  16.                   long (*xpr_swrite)();     /* Put string to serial     */
  17.                   long (*xpr_sflush)();     /* Flush serial input buffer*/
  18.                   long (*xpr_update)();     /* Print stuff              */
  19.                   long (*xpr_chkabort)();   /* Check for abort          */
  20.                   long (*xpr_chkmisc)();    /* Check misc. stuff        */
  21.                   long (*xpr_gets)();       /* Get string interactively */
  22.                   long (*xpr_setserial)();  /* Set and Get serial info  */
  23.                   long (*xpr_ffirst)();     /* Find first file name     */
  24.                   long (*xpr_fnext)();      /* Find next file name      */
  25.                   long (*xpr_finfo)();      /* Return file info         */
  26.                   long  *xpr_reserved1;     /* Reserved                 */
  27.                   long  *xpr_reserved2;     /* Reserved                 */
  28.                   long  *xpr_data;          /* Initialized by Setup.    */
  29.               };
  30.  
  31. /*
  32. *   The functions
  33. */
  34. extern long XProtocolSend(),  XProtocolReceive(),
  35.             XProtocolSetup(), XProtocolCleanup();
  36. /*
  37. *   The update structure
  38. */
  39. struct XPR_UPDATE {     long  xpru_updatemask;
  40.                         char *xpru_protocol;
  41.                         char *xpru_filename;
  42.                         long  xpru_filesize;
  43.                         char *xpru_msg;
  44.                         char *xpru_errormsg;
  45.                         long  xpru_blocks;
  46.                         long  xpru_blocksize;
  47.                         long  xpru_bytes;
  48.                         long  xpru_errors;
  49.                         long  xpru_timeouts;
  50.                         long  xpru_packettype;
  51.                         long  xpru_packetdelay;
  52.                         long  xpru_chardelay;
  53.                         char *xpru_blockcheck;
  54.                         char *xpru_expecttime;
  55.                         char *xpru_elapsedtime;
  56.                         long  xpru_datarate;
  57.                         long  xpru_reserved1;
  58.                         long  xpru_reserved2;
  59.                         long  xpru_reserved3;
  60.                         long  xpru_reserved4;
  61.                         long  xpru_reserved5;
  62.                    };
  63. /*
  64. *   The possible bit values for the xpru_updatemask are:
  65. */
  66. #define XPRU_PROTOCOL           0x00000001L
  67. #define XPRU_FILENAME           0x00000002L
  68. #define XPRU_FILESIZE           0x00000004L
  69. #define XPRU_MSG                0x00000008L
  70. #define XPRU_ERRORMSG           0x00000010L
  71. #define XPRU_BLOCKS             0x00000020L
  72. #define XPRU_BLOCKSIZE          0x00000040L
  73. #define XPRU_BYTES              0x00000080L
  74. #define XPRU_ERRORS             0x00000100L
  75. #define XPRU_TIMEOUTS           0x00000200L
  76. #define XPRU_PACKETTYPE         0x00000400L
  77. #define XPRU_PACKETDELAY        0x00000800L
  78. #define XPRU_CHARDELAY          0x00001000L
  79. #define XPRU_BLOCKCHECK         0x00002000L
  80. #define XPRU_EXPECTTIME         0x00004000L
  81. #define XPRU_ELAPSEDTIME        0x00008000L
  82. #define XPRU_DATARATE           0x00010000L
  83.  
  84.  
  85.