Don't copy DirectoryOpus.CFG because that file works
[AROS-Contrib.git] / dopus / Program / asyncio.h
blob77c3ce9ae7a72c2c6119dc70babfd26a7ea14fb9
1 /*
3 Directory Opus 4
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.
31 #ifndef ASYNCIO_H
32 #define ASYNCIO_H
35 /*****************************************************************************/
38 #ifndef EXEC_TYPES_H
39 #include <exec/types.h>
40 #endif
42 #ifndef EXEC_PORTS_H
43 #include <exec/ports.h>
44 #endif
46 #ifndef DOS_DOS_H
47 #include <dos/dos.h>
48 #endif
51 /*****************************************************************************/
54 /* This structure is public only by necessity, don't muck with it yourself, or
55 * you're looking for trouble
57 struct AsyncFile
59 BPTR af_File;
60 ULONG af_BlockSize;
61 struct MsgPort *af_Handler;
62 APTR af_Offset;
63 LONG af_BytesLeft;
64 ULONG af_BufferSize;
65 APTR af_Buffers[2];
66 struct StandardPacket af_Packet;
67 struct MsgPort af_PacketPort;
68 ULONG af_CurrentBuf;
69 ULONG af_SeekOffset;
70 UBYTE af_PacketPending;
71 UBYTE af_ReadMode;
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 /*****************************************************************************/
90 #ifdef __SASC_60
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);
98 #else
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);
108 #endif
110 /*****************************************************************************/
113 #endif /* ASYNCIO_H */