4 Original GPL release version 4.12
5 Copyright 1993-2000 Jonathan Potter
7 This program is free software; you can redistribute it and/or
8 modify it under the terms of the GNU General Public License
9 as published by the Free Software Foundation; either version 2
10 of the License, or (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
21 All users of Directory Opus 4 (including versions distributed
22 under the GPL) are entitled to upgrade to the latest version of
23 Directory Opus version 5 at a reduced price. Please see
24 http://www.gpsoft.com.au for more information.
26 The release of Directory Opus 4 under the GPL in NO WAY affects
27 the existing commercial status of Directory Opus 5.
35 /*****************************************************************************/
39 #include <exec/types.h>
43 #include <exec/ports.h>
51 /*****************************************************************************/
54 /* This structure is public only by necessity, don't muck with it yourself, or
55 * you're looking for trouble
61 struct MsgPort
*af_Handler
;
66 struct StandardPacket af_Packet
;
67 struct MsgPort af_PacketPort
;
70 UBYTE af_PacketPending
;
75 /*****************************************************************************/
78 #define MODE_READ 0 /* read an existing file */
79 #define MODE_WRITE 1 /* create a new file, delete existing file if needed */
80 #define MODE_APPEND 2 /* append to end of existing file, or create new */
82 #define MODE_START -1 /* relative to start of file */
83 #define MODE_CURRENT 0 /* relative to current file position */
84 #define MODE_END 1 /* relative to end of file */
87 /*****************************************************************************/
91 __stdargs
struct AsyncFile
*OpenAsync(const STRPTR fileName
, UBYTE accessMode
, LONG bufferSize
);
92 __stdargs LONG
CloseAsync(struct AsyncFile
*file
);
93 __stdargs LONG
ReadAsync(struct AsyncFile
*file
, APTR buffer
, LONG numBytes
);
94 __stdargs LONG
ReadCharAsync(struct AsyncFile
*file
);
95 __stdargs LONG
WriteAsync(struct AsyncFile
*file
, APTR buffer
, LONG numBytes
);
96 __stdargs LONG
WriteCharAsync(struct AsyncFile
*file
, UBYTE ch
);
97 __stdargs LONG
SeekAsync(struct AsyncFile
*file
, LONG position
, BYTE mode
);
100 /* AROS: We have no __stdargs keyword */
101 struct AsyncFile
* /* __stdargs */ OpenAsync(const STRPTR fileName
, UBYTE accessMode
, LONG bufferSize
);
102 LONG
/* __stdargs */ CloseAsync(struct AsyncFile
*file
);
103 LONG
/* __stdargs */ ReadAsync(struct AsyncFile
*file
, APTR buffer
, LONG numBytes
);
104 LONG
/* __stdargs */ ReadCharAsync(struct AsyncFile
*file
);
105 LONG
/* __stdargs */ WriteAsync(struct AsyncFile
*file
, APTR buffer
, LONG numBytes
);
106 LONG
/* __stdargs */ WriteCharAsync(struct AsyncFile
*file
, UBYTE ch
);
107 LONG
/* __stdargs */ SeekAsync(struct AsyncFile
*file
, LONG position
, BYTE mode
);
110 /*****************************************************************************/
113 #endif /* ASYNCIO_H */