Mercurial > dovecot > original-hg > dovecot-1.2
annotate src/lib/ioloop-internal.h @ 953:411006be3c66 HEAD
Naming change for function typedefs.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Sat, 11 Jan 2003 21:55:56 +0200 |
parents | fd8888f6f037 |
children | f782b3319553 |
rev | line source |
---|---|
0 | 1 #ifndef __IOLOOP_INTERNAL_H |
2 #define __IOLOOP_INTERNAL_H | |
3 | |
4 #include "ioloop.h" | |
5 | |
6 #include <sys/time.h> | |
7 | |
903
fd8888f6f037
Naming style changes, finally got tired of most of the typedefs. Also the
Timo Sirainen <tss@iki.fi>
parents:
10
diff
changeset
|
8 struct ioloop { |
fd8888f6f037
Naming style changes, finally got tired of most of the typedefs. Also the
Timo Sirainen <tss@iki.fi>
parents:
10
diff
changeset
|
9 struct ioloop *prev; |
0 | 10 |
903
fd8888f6f037
Naming style changes, finally got tired of most of the typedefs. Also the
Timo Sirainen <tss@iki.fi>
parents:
10
diff
changeset
|
11 pool_t pool; |
0 | 12 int highest_fd; |
13 | |
903
fd8888f6f037
Naming style changes, finally got tired of most of the typedefs. Also the
Timo Sirainen <tss@iki.fi>
parents:
10
diff
changeset
|
14 struct io *ios; /* sorted by priority */ |
fd8888f6f037
Naming style changes, finally got tired of most of the typedefs. Also the
Timo Sirainen <tss@iki.fi>
parents:
10
diff
changeset
|
15 struct timeout *timeouts; /* sorted by next_run */ |
0 | 16 |
903
fd8888f6f037
Naming style changes, finally got tired of most of the typedefs. Also the
Timo Sirainen <tss@iki.fi>
parents:
10
diff
changeset
|
17 struct ioloop_handler_data *handler_data; |
0 | 18 |
19 unsigned int running:1; | |
20 }; | |
21 | |
903
fd8888f6f037
Naming style changes, finally got tired of most of the typedefs. Also the
Timo Sirainen <tss@iki.fi>
parents:
10
diff
changeset
|
22 struct io { |
fd8888f6f037
Naming style changes, finally got tired of most of the typedefs. Also the
Timo Sirainen <tss@iki.fi>
parents:
10
diff
changeset
|
23 struct io *prev, *next; |
0 | 24 |
25 int fd; | |
26 int priority; | |
27 int condition; | |
28 | |
29 unsigned int destroyed:1; | |
30 unsigned int invalid:1; | |
31 | |
953
411006be3c66
Naming change for function typedefs.
Timo Sirainen <tss@iki.fi>
parents:
903
diff
changeset
|
32 io_callback_t callback; |
10
82b7de533f98
s/user_data/context/ and some s/Data/Context/
Timo Sirainen <tss@iki.fi>
parents:
0
diff
changeset
|
33 void *context; |
0 | 34 }; |
35 | |
903
fd8888f6f037
Naming style changes, finally got tired of most of the typedefs. Also the
Timo Sirainen <tss@iki.fi>
parents:
10
diff
changeset
|
36 struct timeout { |
fd8888f6f037
Naming style changes, finally got tired of most of the typedefs. Also the
Timo Sirainen <tss@iki.fi>
parents:
10
diff
changeset
|
37 struct timeout *next; |
0 | 38 |
39 struct timeval next_run; | |
40 int msecs; | |
41 int run_now; | |
42 int destroyed; | |
43 | |
953
411006be3c66
Naming change for function typedefs.
Timo Sirainen <tss@iki.fi>
parents:
903
diff
changeset
|
44 timeout_callback_t callback; |
10
82b7de533f98
s/user_data/context/ and some s/Data/Context/
Timo Sirainen <tss@iki.fi>
parents:
0
diff
changeset
|
45 void *context; |
0 | 46 }; |
47 | |
903
fd8888f6f037
Naming style changes, finally got tired of most of the typedefs. Also the
Timo Sirainen <tss@iki.fi>
parents:
10
diff
changeset
|
48 int io_loop_get_wait_time(struct timeout *timeout, struct timeval *tv, |
0 | 49 struct timeval *tv_now); |
903
fd8888f6f037
Naming style changes, finally got tired of most of the typedefs. Also the
Timo Sirainen <tss@iki.fi>
parents:
10
diff
changeset
|
50 void io_loop_handle_timeouts(struct ioloop *ioloop); |
0 | 51 |
52 /* call only when io->destroyed is TRUE */ | |
903
fd8888f6f037
Naming style changes, finally got tired of most of the typedefs. Also the
Timo Sirainen <tss@iki.fi>
parents:
10
diff
changeset
|
53 void io_destroy(struct ioloop *ioloop, struct io *io); |
0 | 54 /* call only when timeout->destroyed is TRUE */ |
903
fd8888f6f037
Naming style changes, finally got tired of most of the typedefs. Also the
Timo Sirainen <tss@iki.fi>
parents:
10
diff
changeset
|
55 void timeout_destroy(struct ioloop *ioloop, struct timeout *timeout); |
0 | 56 |
57 /* I/O handler calls */ | |
903
fd8888f6f037
Naming style changes, finally got tired of most of the typedefs. Also the
Timo Sirainen <tss@iki.fi>
parents:
10
diff
changeset
|
58 void io_loop_handle_add(struct ioloop *ioloop, int fd, int condition); |
fd8888f6f037
Naming style changes, finally got tired of most of the typedefs. Also the
Timo Sirainen <tss@iki.fi>
parents:
10
diff
changeset
|
59 void io_loop_handle_remove(struct ioloop *ioloop, int fd, int condition); |
0 | 60 |
903
fd8888f6f037
Naming style changes, finally got tired of most of the typedefs. Also the
Timo Sirainen <tss@iki.fi>
parents:
10
diff
changeset
|
61 void io_loop_handler_init(struct ioloop *ioloop); |
fd8888f6f037
Naming style changes, finally got tired of most of the typedefs. Also the
Timo Sirainen <tss@iki.fi>
parents:
10
diff
changeset
|
62 void io_loop_handler_deinit(struct ioloop *ioloop); |
0 | 63 |
64 #endif |