summaryrefslogtreecommitdiff
path: root/src/IO/iowatch.hh
blob: e2d497f105980e7350d6349847c00b9f5ac39dfb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#ifndef __IO_WATCH_H__
#define __IO_WATCH_H__

/*
 * BUG: enum {READ = 1, WRITE = 4, EXCEPT = 8} borrowed from FL/Enumerations.H
 */
#define DIO_READ    1
#define DIO_WRITE   4
#define DIO_EXCEPT  8

typedef void (*CbFunction_t)(int fd, void *data);

#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */

void a_IOwatch_add_fd(int fd,int when,CbFunction_t Callback,void *usr_data);
void a_IOwatch_remove_fd(int fd,int when);

#ifdef __cplusplus
}
#endif /* __cplusplus */

#endif /* __IO_WATCH_H__ */