home *** CD-ROM | disk | FTP | other *** search
/ Amiga MA Magazine 1998 #6 / amigamamagazinepolishissue1998.iso / coders / biblioteki / c_library / asyncio / include / libraries / asyncio.h
C/C++ Source or Header  |  1977-12-31  |  2KB  |  78 lines

  1. #ifndef LIBRARIES_ASYNCIO_H
  2. #define LIBRARIES_ASYNCIO_H
  3.  
  4.  
  5. /*****************************************************************************/
  6.  
  7.  
  8. #ifndef EXEC_TYPES_H
  9. #include <exec/types.h>
  10. #endif
  11.  
  12. #ifndef EXEC_PORTS_H
  13. #include <exec/ports.h>
  14. #endif
  15.  
  16. #ifndef DOS_DOS_H
  17. #include <dos/dos.h>
  18. #endif
  19.  
  20. #ifndef DOS_DOSEXTENS_H
  21. #include <dos/dosextens.h>
  22. #endif
  23.  
  24.  
  25. /*****************************************************************************/
  26.  
  27.  
  28. /* This structure is public only by necessity, don't muck with it yourself, or
  29.  * you're looking for trouble
  30.  */
  31. typedef struct AsyncFile
  32. {
  33.     BPTR            af_File;
  34.     ULONG            af_BlockSize;
  35.     struct MsgPort        *af_Handler;
  36.     UBYTE            *af_Offset;
  37.     LONG            af_BytesLeft;
  38.     ULONG            af_BufferSize;
  39.     UBYTE            *af_Buffers[2];
  40.     struct StandardPacket    af_Packet;
  41.     struct MsgPort        af_PacketPort;
  42.     ULONG            af_CurrentBuf;
  43.     ULONG            af_SeekOffset;
  44. #ifdef ASIO_NOEXTERNALS
  45.     struct ExecBase        *af_SysBase;
  46.     struct DosLibrary    *af_DOSBase;
  47. #endif
  48.     UBYTE            af_PacketPending;
  49.     UBYTE            af_ReadMode;
  50.     UBYTE            af_CloseFH;
  51.  
  52. } AsyncFile;
  53.  
  54.  
  55. /*****************************************************************************/
  56.  
  57.  
  58. typedef enum OpenModes
  59. {
  60.     MODE_READ,    /* read an existing file                             */
  61.     MODE_WRITE,    /* create a new file, delete existing file if needed */
  62.     MODE_APPEND    /* append to end of existing file, or create new     */
  63. } OpenModes;
  64.  
  65.  
  66. typedef enum SeekModes
  67. {
  68.     MODE_START = -1,    /* relative to start of file         */
  69.     MODE_CURRENT,        /* relative to current file position */
  70.     MODE_END        /* relative to end of file           */
  71. } SeekModes;
  72.  
  73.  
  74. /*****************************************************************************/
  75.  
  76.  
  77. #endif /* ASYNCIO_H */
  78.