design_pattern_for_c
V 1.00
|
#include "event_threadpool_data.h"
Go to the source code of this file.
Typedefs | |
event instance definition | |
typedef void * | EventInstance |
Event management instance which get from event_if_new. More... | |
typedef void * | EventHandler |
Event handler related to fd. More... | |
Functions | |
API for event if plugin interface | |
EventInstance | event_if_new (void) |
new event instance More... | |
EventHandler | event_if_add (EventInstance this, EventSubscriber subscriber, void *arg) |
add event handler related to fd More... | |
EventHandler | event_if_update (EventInstance this, EventHandler handler, EventSubscriber subscriber, void *arg) |
update event handler related to fd More... | |
void | event_if_del (EventInstance this, EventHandler handler) |
delete event handler related to fd More... | |
int | event_if_getfd (EventHandler handler) |
get fd related to handler More... | |
int | event_if_loop (EventInstance this) |
main loop, start to watch event More... | |
void | event_if_loopbreak (EventInstance this) |
break main loop More... | |
void | event_if_exit (EventInstance this) |
exit instances for loop, if plugin want. More... | |
void | event_if_free (EventInstance this) |
free instances More... | |
typedef void* EventHandler |
Event handler related to fd.
Definition is in plugin
Definition at line 15 of file tpool_event_if.h.
typedef void* EventInstance |
Event management instance which get from event_if_new.
Definition is in plugin
Definition at line 13 of file tpool_event_if.h.
EventHandler event_if_add | ( | EventInstance | this, |
EventSubscriber | subscriber, | ||
void * | arg | ||
) |
add event handler related to fd
[in] | this | EventInstance instance returned at event_if_new. |
[in] | subscriber | EventSubscriber |
[in] | arg | argument for event_callback |
!=NULL | event handler instance |
NULL | error |
add event handler related to fd
Definition at line 67 of file event_if_epoll.c.
void event_if_del | ( | EventInstance | this, |
EventHandler | handler | ||
) |
delete event handler related to fd
[in] | this | EventInstance instance returned at event_if_new. |
[in] | handler | EventHandler instance returned at event_if_add. |
delete event handler related to fd
Definition at line 128 of file event_if_epoll.c.
void event_if_exit | ( | EventInstance | this | ) |
exit instances for loop, if plugin want.
[in] | this | EventInstance instance returned at event_if_new. |
exit instances for loop, if plugin want.
Definition at line 190 of file event_if_epoll.c.
void event_if_free | ( | EventInstance | this | ) |
free instances
[in] | this | EventInstance instance returned at event_if_new. |
free instances
Definition at line 195 of file event_if_epoll.c.
int event_if_getfd | ( | EventHandler | handler | ) |
get fd related to handler
[in] | handler | EventHandler instance returned at event_if_add. |
Definition at line 139 of file event_if_epoll.c.
int event_if_loop | ( | EventInstance | this | ) |
main loop, start to watch event
[in] | this | EventInstance instance returned at event_if_new. |
0 | Normally stop |
!=0 | Error stop |
main loop, start to watch event
Definition at line 144 of file event_if_epoll.c.
void event_if_loopbreak | ( | EventInstance | this | ) |
break main loop
[in] | this | EventInstance instance returned at event_if_new. |
break main loop
Definition at line 184 of file event_if_epoll.c.
EventInstance event_if_new | ( | void | ) |
new event instance
[in] | none |
!=NULL | this class handle |
NULL | error |
new event instance
Definition at line 46 of file event_if_epoll.c.
EventHandler event_if_update | ( | EventInstance | this, |
EventHandler | handler, | ||
EventSubscriber | subscriber, | ||
void * | arg | ||
) |
update event handler related to fd
[in] | this | EventInstance instance returned at event_if_new. |
[in] | handler | EventHandler instance returned at event_if_add. |
[in] | subscriber | EventSubscriber |
[in] | arg | argument for event_callback |
!=NULL | new event handler instance |
NULL | error |
update event handler related to fd
Definition at line 105 of file event_if_epoll.c.