5 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
8 Desc: Unix filedescriptor/socket IO Include File
13 # include <hidd/hidd.h>
15 #ifndef EXEC_LIBRARIES_H
16 # include <exec/libraries.h>
19 # include <exec/ports.h>
21 #ifndef EXEC_EXECBASE_H
22 # include <exec/execbase.h>
25 #define CLID_Hidd_UnixIO "unixio.hidd"
26 #define IID_Hidd_UnixIO "I_Hidd_UnixIO"
30 struct Message Message
;
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
,
55 STACKULONG um_MethodID
;
56 STACKULONG um_Filedesc
;
57 STACKULONG um_Filedesc_Type
;
65 STACKULONG um_MethodID
;
66 STACKULONG um_Filedesc
;
67 STACKULONG um_Filedesc_Type
;
69 struct MsgPort
* um_ReplyPort
;
72 struct uioMsgAbortAsyncIO
74 STACKULONG um_MethodID
;
75 STACKULONG um_Filedesc
;
80 STACKULONG um_MethodID
;
87 struct uioMsgCloseFile
89 STACKULONG um_MethodID
;
94 struct uioMsgWriteFile
96 STACKULONG um_MethodID
;
103 struct uioMsgIOControlFile
105 STACKULONG um_MethodID
;
107 STACKULONG um_Request
;
112 struct uioMsgReadFile
114 STACKULONG um_MethodID
;
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
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 */