- Now splits paragraphs into multiple lines, with each line fitting the
[AROS.git] / compiler / include / dos / filehandler.h
blob7d7c74dc759262efea987e2c4222a07218b2e5e6
1 #ifndef DOS_FILEHANDLER_H
2 #define DOS_FILEHANDLER_H
4 /*
5 Copyright © 1995-2011, The AROS Development Team. All rights reserved.
6 $Id$
8 Constants for filehandlers.
9 */
11 #ifndef EXEC_PORTS_H
12 # include <exec/ports.h>
13 #endif
14 #ifndef EXEC_TYPES_H
15 # include <exec/types.h>
16 #endif
17 #ifndef DOS_BPTR_H
18 # include <dos/bptr.h>
19 #endif
20 #ifndef DOS_DOS_H
21 # include <dos/dos.h>
22 #endif
24 /* Disk environment array. The size of this structure is variable.
25 de_TableSize contains the size of the structure. This structure may
26 look different for different handlers. Most of the entries are in fact
27 ULONGs or LONGs, but because every entry must have the same size, we have
28 to use IPTRs instead. */
29 struct DosEnvec
31 IPTR de_TableSize; /* Size of this structure. Must be at least
32 11 (DE_NUMBUFFERS). */
33 IPTR de_SizeBlock; /* Size in longwords of a block on the disk. */
34 IPTR de_SecOrg; /* Unused. Must be 0 for now. */
35 IPTR de_Surfaces; /* Number of heads/surfaces in drive. */
36 IPTR de_SectorPerBlock; /* Unused. Must be 1 for now. */
37 IPTR de_BlocksPerTrack; /* Number of blocks on a track. */
38 IPTR de_Reserved; /* Number of reserved blocks at beginning of
39 volume. */
40 IPTR de_PreAlloc; /* Number of reserved blocks at end of volume. */
41 IPTR de_Interleave;
42 IPTR de_LowCyl; /* First cylinder. */
43 IPTR de_HighCyl; /* Last cylinder. */
44 IPTR de_NumBuffers; /* Number of buffers for drive. */
45 IPTR de_BufMemType; /* Type of memory for buffers. See <exec/memory.h>.
47 IPTR de_MaxTransfer; /* How many bytes may be transferred together? */
48 IPTR de_Mask; /* Memory address mask for DMA devices. */
49 SIPTR de_BootPri; /* Priority of Autoboot. */
50 IPTR de_DosType; /* Type of disk. See <dos/dos.h> for definitions.
52 IPTR de_Baud; /* Baud rate to use. */
53 IPTR de_Control; /* Control word. */
54 IPTR de_BootBlocks; /* Size of bootblock. */
57 /* The following constants are longword offsets, which point into a filehandler
58 structure (like the one above). For more information about the meaning
59 of these constants see the structure above. */
60 #define DE_TABLESIZE 0
61 #define DE_SIZEBLOCK 1
62 #define DE_BLOCKSIZE 2
63 #define DE_NUMHEADS 3
64 #define DE_SECSPERBLOCK 4
65 #define DE_BLKSPERTRACK 5
66 #define DE_RESERVEDBLKS 6
67 #define DE_PREFAC 7
68 #define DE_INTERLEAVE 8
69 #define DE_LOWCYL 9
70 #define DE_HIGHCYL 10
71 #define DE_UPPERCYL DE_HIGHCYL
72 #define DE_NUMBUFFERS 11
73 #define DE_BUFMEMTYPE 12
74 #define DE_MEMBUFTYPE DE_BUFMEMTYPE
75 #define DE_MAXTRANSFER 13
76 #define DE_MASK 14
77 #define DE_BOOTPRI 15
78 #define DE_DOSTYPE 16
79 #define DE_BAUD 17
80 #define DE_CONTROL 18
81 #define DE_BOOTBLOCKS 19
84 /* This is the message that is passed to a file handler during startup
85 in the DeviceNode->dn_Startup field.
87 struct FileSysStartupMsg
89 IPTR fssm_Unit; /* Unit number of device used. Can also be an STRPTR */
90 BSTR fssm_Device; /* Device name. */
91 BPTR fssm_Environ; /* Pointer to disk environment array, like the one
92 above. */
93 ULONG fssm_Flags; /* Flags to be passed to OpenDevice(). */
97 /* This is an unwound version of the DosList structure defined in
98 <dos/dosextens.h>. This is the version for a DOS "device" DLT_DEVICE.
99 It is essentially the same structure as DevInfo, defined in
100 <dos/dosextens.h>.
102 struct DeviceNode
104 /* PRIVATE pointer to next entry */
105 BPTR dn_Next;
106 /* Type of this node. Has to be DLT_DEVICE. */
107 ULONG dn_Type;
109 struct MsgPort * dn_Task; /* dol_Task field */
110 BPTR dn_Lock; /* dol_Lock field */
112 BSTR dn_Handler; /* Null-terminated device name for handler. */
113 LONG dn_StackSize; /* Initial stacksize for packet-handler task */
114 LONG dn_Priority; /* Initial priority for packet-handler task */
115 BPTR dn_Startup; /* (struct FileSysStartupMsg *) see above */
116 BPTR dn_SegList; /* SegList for the handler */
117 BPTR dn_GlobalVec; /* Global Vector, should be (BPTR)-1 */
119 BSTR dn_Name;
122 #endif /* DOS_FILEHANDLER_H */