ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/libev/event.h
(Generate patch)

Comparing libev/event.h (file contents):
Revision 1.4 by root, Fri Nov 2 13:08:51 2007 UTC vs.
Revision 1.14 by root, Fri Nov 9 17:07:59 2007 UTC

29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 */ 30 */
31#ifndef _EVENT_H_ 31#ifndef _EVENT_H_
32#define _EVENT_H_ 32#define _EVENT_H_
33 33
34#ifdef EV_H
35# include EV_H
36#else
37# include <ev.h>
38#endif
39
34#ifdef __cplusplus 40#ifdef __cplusplus
35extern "C" { 41extern "C" {
36#endif 42#endif
37 43
38#include "ev.h" 44struct event_base;
39 45
40struct event 46struct event
41{ 47{
42 /* lib watchers we map to */ 48 /* libev watchers we map onto */
43 union { 49 union {
44 struct ev_io io; 50 struct ev_io io;
45 struct ev_signal sig; 51 struct ev_signal sig;
46 } iosig; 52 } iosig;
47 struct ev_timer to; 53 struct ev_timer to;
102void event_set (struct event *ev, int fd, short events, void (*cb)(int, short, void *), void *arg); 108void event_set (struct event *ev, int fd, short events, void (*cb)(int, short, void *), void *arg);
103int event_once (int fd, short events, void (*cb)(int, short, void *), void *arg, struct timeval *tv); 109int event_once (int fd, short events, void (*cb)(int, short, void *), void *arg, struct timeval *tv);
104 110
105int event_add (struct event *ev, struct timeval *tv); 111int event_add (struct event *ev, struct timeval *tv);
106int event_del (struct event *ev); 112int event_del (struct event *ev);
113void event_active (struct event *ev, int res, short ncalls); /* ncalls is being ignored */
107 114
108int event_pending (struct event *ev, short, struct timeval *tv); 115int event_pending (struct event *ev, short, struct timeval *tv);
109 116
110int event_priority_init (int npri); 117int event_priority_init (int npri);
111int event_priority_set (struct event *ev, int pri); 118int event_priority_set (struct event *ev, int pri);
112
113struct event_base;
114 119
115int event_base_set (struct event_base *base, struct event *ev); 120int event_base_set (struct event_base *base, struct event *ev);
116int event_base_loop (struct event_base *base, int); 121int event_base_loop (struct event_base *base, int);
117int event_base_loopexit (struct event_base *base, struct timeval *tv); 122int event_base_loopexit (struct event_base *base, struct timeval *tv);
118int event_base_dispatch (struct event_base *base); 123int event_base_dispatch (struct event_base *base);
119int event_base_once (struct event_base *base, int fd, short events, void (*cb)(int, short, void *), void *arg, struct timeval *tv); 124int event_base_once (struct event_base *base, int fd, short events, void (*cb)(int, short, void *), void *arg, struct timeval *tv);
120int event_base_priority_init (struct event_base *base, int fd); 125int event_base_priority_init (struct event_base *base, int fd);
121 126
127#ifndef EV_STANDALONE
128# include <event_compat.h>
122#endif 129#endif
130
131#ifdef __cplusplus
132}
133#endif
134
135#endif
136

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines