design_pattern_for_c
V 1.00
|
#include "tpool_event_if.h"
#include "dp_util.h"
#include <sys/time.h>
#include <sys/types.h>
#include <unistd.h>
#include <stdlib.h>
#include <errno.h>
Go to the source code of this file.
Data Structures | |
struct | event_select_handler_t |
struct | event_select_fds_t |
struct | event_select_t |
Macros | |
#define | EVENT_SELECT_TIMEOUT (50000) |
#define | event_select_handler_pull(this, data) dputil_list_pull((DPUtilList)(this), (DPUtilListData)(data)) |
#define | event_select_handler_insert(this, prev, data) dputil_list_insert((DPUtilList)(this),(DPUtilListData)(prev), (DPUtilListData)(data)) |
Typedefs | |
typedef struct event_select_handler_t | event_select_handler_t |
typedef struct event_select_handler_t * | EventSelectHandler |
typedef struct event_select_fds_t | event_select_fds_t |
typedef struct event_select_t | event_select_t |
typedef struct event_select_t * | EventSelect |
#define event_select_handler_insert | ( | this, | |
prev, | |||
data | |||
) | dputil_list_insert((DPUtilList)(this),(DPUtilListData)(prev), (DPUtilListData)(data)) |
Definition at line 49 of file event_if_select.c.
#define event_select_handler_pull | ( | this, | |
data | |||
) | dputil_list_pull((DPUtilList)(this), (DPUtilListData)(data)) |
Definition at line 48 of file event_if_select.c.
#define EVENT_SELECT_TIMEOUT (50000) |
Definition at line 10 of file event_if_select.c.
typedef struct event_select_fds_t event_select_fds_t |
typedef struct event_select_handler_t event_select_handler_t |
Definition at line 13 of file event_if_select.c.
typedef struct event_select_t event_select_t |
Definition at line 46 of file event_if_select.c.
typedef struct event_select_t * EventSelect |
Definition at line 46 of file event_if_select.c.
typedef struct event_select_handler_t * EventSelectHandler |
Definition at line 13 of file event_if_select.c.
EventHandler event_if_add | ( | EventInstance | this, |
EventSubscriber | subscriber, | ||
void * | arg | ||
) |
add new event
add event handler related to fd
Definition at line 93 of file event_if_select.c.
void event_if_del | ( | EventInstance | this, |
EventHandler | handler | ||
) |
delete event
delete event handler related to fd
Definition at line 151 of file event_if_select.c.
void event_if_exit | ( | EventInstance | this | ) |
exit after main loop
exit instances for loop, if plugin want.
Definition at line 231 of file event_if_select.c.
void event_if_free | ( | EventInstance | this | ) |
free event if instance
free instances
Definition at line 236 of file event_if_select.c.
int event_if_getfd | ( | EventHandler | handler | ) |
get fd related to handler
[in] | handler | EventHandler instance returned at event_if_add. |
Definition at line 173 of file event_if_select.c.
int event_if_loop | ( | EventInstance | this | ) |
main loop of this event
main loop, start to watch event
Definition at line 178 of file event_if_select.c.
void event_if_loopbreak | ( | EventInstance | this | ) |
EventInstance event_if_new | ( | void | ) |
event new
new event instance
Definition at line 76 of file event_if_select.c.
void* event_if_update | ( | EventInstance | this, |
EventHandler | handler, | ||
EventSubscriber | subscriber, | ||
void * | arg | ||
) |
update registered event
update event handler related to fd
Definition at line 131 of file event_if_select.c.
|
static |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |