design_pattern_for_c
V 1.00
|
Go to the source code of this file.
Data Structures | |
struct | event_libevent_handler_t |
Typedefs | |
typedef struct event_libevent_handler_t | event_libevent_handler_t |
typedef struct event_libevent_handler_t * | EventLibeventHandler |
Functions | |
static short | convert_etpoll_eveid2own (int eventflag) |
static int | convert_etpoll_own2eveid (short eventflag) |
static void | event_if_libevent_callback (evutil_socket_t fd, short eventflag, void *arg) |
API for event if | |
EventInstance | event_if_new (void) |
event new More... | |
EventHandler | event_if_add (EventInstance this, EventSubscriber subscriber, void *arg) |
add new event More... | |
void * | event_if_update (EventInstance this, EventHandler handler, EventSubscriber subscriber, void *arg) |
update registered event More... | |
void | event_if_del (EventInstance this, EventHandler handler) |
delete event More... | |
int | event_if_getfd (EventHandler handler) |
get fd related to handler More... | |
int | event_if_loop (EventInstance this) |
main loop of this event More... | |
void | event_if_loopbreak (EventInstance this) |
break event More... | |
void | event_if_exit (EventInstance this) |
exit after main loop More... | |
void | event_if_free (EventInstance this) |
free event if instance More... | |
typedef struct event_libevent_handler_t event_libevent_handler_t |
Definition at line 12 of file event_if_libevent.c.
typedef struct event_libevent_handler_t * EventLibeventHandler |
Definition at line 12 of file event_if_libevent.c.
|
inlinestatic |
|
inlinestatic |
EventHandler event_if_add | ( | EventInstance | this, |
EventSubscriber | subscriber, | ||
void * | arg | ||
) |
add new event
add event handler related to fd
Definition at line 48 of file event_if_libevent.c.
void event_if_del | ( | EventInstance | this, |
EventHandler | handler | ||
) |
delete event
delete event handler related to fd
Definition at line 94 of file event_if_libevent.c.
void event_if_exit | ( | EventInstance | this | ) |
exit after main loop
exit instances for loop, if plugin want.
Definition at line 118 of file event_if_libevent.c.
void event_if_free | ( | EventInstance | this | ) |
int event_if_getfd | ( | EventHandler | handler | ) |
get fd related to handler
[in] | handler | EventHandler instance returned at event_if_add. |
Definition at line 101 of file event_if_libevent.c.
|
static |
Definition at line 34 of file event_if_libevent.c.
int event_if_loop | ( | EventInstance | this | ) |
main loop of this event
main loop, start to watch event
Definition at line 107 of file event_if_libevent.c.
void event_if_loopbreak | ( | EventInstance | this | ) |
EventInstance event_if_new | ( | void | ) |
void* event_if_update | ( | EventInstance | this, |
EventHandler | handler, | ||
EventSubscriber | subscriber, | ||
void * | arg | ||
) |
update registered event
update event handler related to fd
Definition at line 77 of file event_if_libevent.c.