Updated PCI IDs to latest snapshot.
[tangerine.git] / arch / all-unix / hidd / unixio / include / unixio.h
blob3aa40802e9f1d8282f49fac28d37f6f26cebfdf4
1 #ifndef HIDD_UNIXIO_H
2 #define HIDD_UNIXIO_H
4 /*
5 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
6 $Id$
8 Desc: Unix filedescriptor/socket IO Include File
9 Lang: english
12 #ifndef HIDD_HIDD_H
13 # include <hidd/hidd.h>
14 #endif
15 #ifndef EXEC_LIBRARIES_H
16 # include <exec/libraries.h>
17 #endif
18 #ifndef EXEC_PORTS_H
19 # include <exec/ports.h>
20 #endif
21 #ifndef EXEC_EXECBASE_H
22 # include <exec/execbase.h>
23 #endif
25 #define CLID_Hidd_UnixIO "unixio.hidd"
26 #define IID_Hidd_UnixIO "I_Hidd_UnixIO"
28 struct uioMessage
30 struct Message Message;
31 int fd;
32 int fd_type;
33 int mode;
34 int result;
35 void *callback;
36 void *callbackdata;
40 enum {
41 moHidd_UnixIO_Wait = 0, /* LONG M ( uioMsg *) */
42 moHidd_UnixIO_AsyncIO, /* */
43 moHidd_UnixIO_AbortAsyncIO,
44 moHidd_UnixIO_OpenFile,
45 moHidd_UnixIO_CloseFile,
46 moHidd_UnixIO_WriteFile,
47 moHidd_UnixIO_IOControlFile,
48 moHidd_UnixIO_ReadFile,
49 num_Hidd_UnixIO_Attrs
53 struct uioMsg
55 STACKULONG um_MethodID;
56 STACKULONG um_Filedesc;
57 STACKULONG um_Filedesc_Type;
58 STACKULONG um_Mode;
59 APTR um_CallBack;
60 APTR um_CallBackData;
63 struct uioMsgAsyncIO
65 STACKULONG um_MethodID;
66 STACKULONG um_Filedesc;
67 STACKULONG um_Filedesc_Type;
68 STACKULONG um_Mode;
69 struct MsgPort * um_ReplyPort;
72 struct uioMsgAbortAsyncIO
74 STACKULONG um_MethodID;
75 STACKULONG um_Filedesc;
78 struct uioMsgOpenFile
80 STACKULONG um_MethodID;
81 STRPTR um_FileName;
82 STACKULONG um_Flags;
83 STACKULONG um_Mode;
84 int *um_ErrNoPtr;
87 struct uioMsgCloseFile
89 STACKULONG um_MethodID;
90 APTR um_FD;
91 int *um_ErrNoPtr;
94 struct uioMsgWriteFile
96 STACKULONG um_MethodID;
97 APTR um_FD;
98 APTR um_Buffer;
99 STACKULONG um_Count;
100 int *um_ErrNoPtr;
103 struct uioMsgIOControlFile
105 STACKULONG um_MethodID;
106 APTR um_FD;
107 STACKULONG um_Request;
108 APTR um_Param;
109 int *um_ErrNoPtr;
112 struct uioMsgReadFile
114 STACKULONG um_MethodID;
115 APTR um_FD;
116 APTR um_Buffer;
117 STACKULONG um_Count;
118 int *um_ErrNoPtr;
121 /* UnixIO HIDD Values */
122 #define vHidd_UnixIO_Read 0x1
123 #define vHidd_UnixIO_Write 0x2
124 #define vHidd_UnixIO_RW (vHidd_UnixIO_Read | vHidd_UnixIO_Write)
125 #define vHidd_UnixIO_Abort 0x4
126 #define vHidd_UnixIO_Keep 0x8
128 /* Types of Filedescriptors */
129 #define vHidd_UnixIO_Terminal 0x1
130 #define vHidd_UnixIO_Socket 0x2
132 /* Stubs */
133 IPTR Hidd_UnixIO_Wait(HIDD *h, ULONG fd, ULONG mode, APTR callback, APTR callbackdata, struct ExecBase *);
134 HIDD *New_UnixIO(struct Library * /* OOPBase */, struct ExecBase *);
135 IPTR Hidd_UnixIO_AsyncIO(HIDD *h, ULONG fd, ULONG fd_type, struct MsgPort *port, ULONG mode, struct ExecBase *);
136 VOID Hidd_UnixIO_AbortAsyncIO(HIDD *h, ULONG fd, struct ExecBase *);
138 int Hidd_UnixIO_OpenFile(HIDD *o, const char *filename, int flags, int mode, int *errno_ptr);
139 VOID Hidd_UnixIO_CloseFile(HIDD *o, int fd, int *errno_ptr);
140 int Hidd_UnixIO_ReadFile(HIDD *o, int fd, void *buffer, int count, int *errno_ptr);
141 int Hidd_UnixIO_WriteFile(HIDD *o, int fd, const void *buffer, int count, int *errno_ptr);
142 int Hidd_UnixIO_IOControlFile(HIDD *o, int fd, int request, void *param, int *errno_ptr);
146 #endif /* HIDD_UNIXIO_H */