--- libev/event.h 2011/02/16 08:02:51 1.24 +++ libev/event.h 2012/04/02 23:14:41 1.25 @@ -1,7 +1,7 @@ /* * libevent compatibility header, only core events supported * - * Copyright (c) 2007,2008,2010 Marc Alexander Lehmann + * Copyright (c) 2007,2008,2010,2012 Marc Alexander Lehmann * All rights reserved. * * Redistribution and use in source and binary forms, with or without modifica- @@ -98,6 +98,7 @@ #define EV_READ EV_READ #define EV_WRITE EV_WRITE #define EV_PERSIST 0x10 +#define EV_ET 0x20 /* nop */ #define EVENT_SIGNAL(ev) ((int) (ev)->ev_fd) #define EVENT_FD(ev) ((int) (ev)->ev_fd) @@ -140,6 +141,9 @@ typedef void (*event_log_cb)(int severity, const char *msg); void event_set_log_callback(event_log_cb cb); +typedef void (*event_callback_fn)(int, short, void *); +event_callback_fn event_get_callback (const struct event *ev); + void event_set (struct event *ev, int fd, short events, void (*cb)(int, short, void *), void *arg); int event_once (int fd, short events, void (*cb)(int, short, void *), void *arg, struct timeval *tv); @@ -152,6 +156,8 @@ int event_priority_init (int npri); int event_priority_set (struct event *ev, int pri); +struct event_base *event_base_new (void); +const char *event_base_get_method (const struct event_base *); int event_base_set (struct event_base *base, struct event *ev); int event_base_loop (struct event_base *base, int); int event_base_loopexit (struct event_base *base, struct timeval *tv);