|
ekg2
GIT master
|
#include <glib.h>

Idź do kodu źródłowego tego pliku.
Struktury danych | |
| struct | watch |
Definicje | |
| #define | TIMER(x) gint x(gint type, gpointer data) |
| #define | TIMER_SESSION(x) gint x(gint type, session_t *s) |
| #define | WATCHER(x) int x(int type, int fd, watch_type_t watch, void *data) |
| #define | WATCHER_LINE(x) int x(int type, int fd, const char *watch, void *data) |
| #define | WATCHER_SESSION(x) int x(int type, int fd, watch_type_t watch, session_t *s) |
| #define | WATCHER_SESSION_LINE(x) int x(int type, int fd, const char *watch, session_t *s) |
| #define | watch_add_line(p, fd, type, handler, data) watch_add(p, fd, type, (watcher_handler_func_t *) (handler), data) |
| #define | watch_add_session_line(s, fd, type, handler) watch_add_session(s, fd, type, (watcher_session_handler_func_t *) (handler)) |
Definicje typów | |
| typedef struct ekg_source * | ekg_source_t |
| typedef ekg_source_t | ekg_child_t |
| typedef ekg_source_t | ekg_timer_t |
| typedef int | watcher_handler_func_t(int type, int fd, watch_type_t watch, void *data) |
| typedef int | watcher_session_handler_func_t(int type, int fd, watch_type_t watch, session_t *s) |
| typedef struct watch | watch_t |
| typedef void * | watch_handler_func_t |
Wyliczenia | |
| enum | watch_type_t { WATCH_NONE = 0, WATCH_WRITE = 1, WATCH_READ = 2, WATCH_READ_LINE = 4, WATCH_WRITE_LINE = 8, WATCH_NONE = 0, WATCH_WRITE = 1, WATCH_READ = 2, WATCH_READ_LINE = 4, WATCH_WRITE_LINE = 8 } |
Funkcje | |
| void | ekg_source_remove (ekg_source_t s) |
| gboolean | ekg_source_remove_by_handler (gpointer handler, const gchar *name) |
| gboolean | ekg_source_remove_by_data (gpointer priv_data, const gchar *name) |
| gboolean | ekg_source_remove_by_plugin (plugin_t *plugin, const gchar *name) |
| ekg_child_t | ekg_child_add (plugin_t *plugin, const gchar *name_format, GPid pid, GChildWatchFunc handler, gpointer data, GDestroyNotify destr,...) G_GNUC_PRINTF(2 |
| ekg_timer_t | ekg_timer_add (plugin_t *plugin, const gchar *name_format, guint64 interval, GSourceFunc handler, gpointer data, GDestroyNotify destr,...) G_GNUC_PRINTF(2 |
| ekg_timer_t | timer_add (plugin_t *plugin, const gchar *name, guint period, gboolean persist, gint(*function)(gint, gpointer), gpointer data) |
| ekg_timer_t | timer_add_ms (plugin_t *plugin, const gchar *name, guint period, gboolean persist, gint(*function)(gint, gpointer), gpointer data) |
| ekg_timer_t | timer_add_session (session_t *session, const gchar *name, guint period, gboolean persist, gint(*function)(gint, session_t *)) |
| ekg_timer_t | timer_find_session (session_t *session, const gchar *name) |
| gint | timer_remove (plugin_t *plugin, const gchar *name) |
| gint | timer_remove_session (session_t *session, const gchar *name) |
| int | watch_write (watch_t *w, const char *format,...) |
| int | watch_write_data (watch_t *w, const char *buf, int len) |
| watch_t * | watch_find (plugin_t *plugin, int fd, watch_type_t type) |
| void | watch_free (watch_t *w) |
| int | watch_timeout_set (watch_t *w, time_t timeout) |
| watch_t * | watch_add (plugin_t *plugin, int fd, watch_type_t type, watcher_handler_func_t *handler, void *data) |
| watch_t * | watch_add_session (session_t *session, int fd, watch_type_t type, watcher_session_handler_func_t *handler) |
| int | watch_remove (plugin_t *plugin, int fd, watch_type_t type) |
Zmienne | |
| ekg_child_t | G_GNUC_MALLOC |
| list_t | watches |
| #define TIMER | ( | x | ) | gint x(gint type, gpointer data) |
| #define watch_add_line | ( | p, | |
| fd, | |||
| type, | |||
| handler, | |||
| data | |||
| ) | watch_add(p, fd, type, (watcher_handler_func_t *) (handler), data) |
| #define watch_add_session_line | ( | s, | |
| fd, | |||
| type, | |||
| handler | |||
| ) | watch_add_session(s, fd, type, (watcher_session_handler_func_t *) (handler)) |
| #define WATCHER | ( | x | ) | int x(int type, int fd, watch_type_t watch, void *data) |
| #define WATCHER_LINE | ( | x | ) | int x(int type, int fd, const char *watch, void *data) |
| #define WATCHER_SESSION | ( | x | ) | int x(int type, int fd, watch_type_t watch, session_t *s) |
| typedef ekg_source_t ekg_child_t |
| typedef struct ekg_source* ekg_source_t |
| typedef ekg_source_t ekg_timer_t |
| typedef void* watch_handler_func_t |
| typedef int watcher_handler_func_t(int type, int fd, watch_type_t watch, void *data) |
| typedef int watcher_session_handler_func_t(int type, int fd, watch_type_t watch, session_t *s) |
| enum watch_type_t |
| ekg_child_t ekg_child_add | ( | plugin_t * | plugin, |
| const gchar * | name_format, | ||
| GPid | pid, | ||
| GChildWatchFunc | handler, | ||
| gpointer | data, | ||
| GDestroyNotify | destr, | ||
| ... | |||
| ) |
| void ekg_source_remove | ( | ekg_source_t | s | ) |
Remove a particular source (which can be ekg_child_t, ekg_timer_t...).
| s | - the source identifier. |
| gboolean ekg_source_remove_by_data | ( | gpointer | priv_data, |
| const gchar * | name | ||
| ) |
| gboolean ekg_source_remove_by_handler | ( | gpointer | handler, |
| const gchar * | name | ||
| ) |
| gboolean ekg_source_remove_by_plugin | ( | plugin_t * | plugin, |
| const gchar * | name | ||
| ) |
| ekg_timer_t ekg_timer_add | ( | plugin_t * | plugin, |
| const gchar * | name_format, | ||
| guint64 | interval, | ||
| GSourceFunc | handler, | ||
| gpointer | data, | ||
| GDestroyNotify | destr, | ||
| ... | |||
| ) |
| ekg_timer_t timer_add | ( | plugin_t * | plugin, |
| const gchar * | name, | ||
| guint | period, | ||
| gboolean | persist, | ||
| gint(*)(gint, gpointer) | function, | ||
| gpointer | data | ||
| ) |
| ekg_timer_t timer_add_ms | ( | plugin_t * | plugin, |
| const gchar * | name, | ||
| guint | period, | ||
| gboolean | persist, | ||
| gint(*)(gint, gpointer) | function, | ||
| gpointer | data | ||
| ) |
| ekg_timer_t timer_add_session | ( | session_t * | session, |
| const gchar * | name, | ||
| guint | period, | ||
| gboolean | persist, | ||
| gint(*)(gint, session_t *) | function | ||
| ) |
| ekg_timer_t timer_find_session | ( | session_t * | session, |
| const gchar * | name | ||
| ) |
| gint timer_remove | ( | plugin_t * | plugin, |
| const gchar * | name | ||
| ) |
| gint timer_remove_session | ( | session_t * | session, |
| const gchar * | name | ||
| ) |
| watch_t* watch_add | ( | plugin_t * | plugin, |
| int | fd, | ||
| watch_type_t | type, | ||
| watcher_handler_func_t * | handler, | ||
| void * | data | ||
| ) |
Create new watch_t and add it on the beginning of watches list.
| plugin | - plugin |
| fd | - fd to watch data for. |
| type | - type of watch. |
| handler | - handler of watch. |
| data | - data which be passed to handler. |
| watch_t* watch_add_session | ( | session_t * | session, |
| int | fd, | ||
| watch_type_t | type, | ||
| watcher_session_handler_func_t * | handler | ||
| ) |
Create new session watch_t and add it on the beginning of watches list.
| session | - session |
| fd | - fd to watch data for |
| type | - type of watch. |
| handler | - handler of watch. |
| watch_t* watch_find | ( | plugin_t * | plugin, |
| int | fd, | ||
| watch_type_t | type | ||
| ) |
| void watch_free | ( | watch_t * | w | ) |
| int watch_remove | ( | plugin_t * | plugin, |
| int | fd, | ||
| watch_type_t | type | ||
| ) |
| int watch_timeout_set | ( | watch_t * | w, |
| time_t | timeout | ||
| ) |
| int watch_write | ( | watch_t * | w, |
| const char * | format, | ||
| ... | |||
| ) |
| int watch_write_data | ( | watch_t * | w, |
| const char * | buf, | ||
| int | len | ||
| ) |
| ekg_timer_t G_GNUC_MALLOC |
| list_t watches |
1.8.13