20 #ifndef __EKG_SOURCES_H 21 #define __EKG_SOURCES_H 45 #define TIMER(x) gint x(gint type, gpointer data) 46 #define TIMER_SESSION(x) gint x(gint type, session_t *s) 49 ekg_timer_t
timer_add(
plugin_t *plugin,
const gchar *
name, guint period, gboolean
persist, gint (*
function)(gint, gpointer), gpointer data);
50 ekg_timer_t
timer_add_ms(
plugin_t *plugin,
const gchar *name, guint period, gboolean persist, gint (*
function)(gint, gpointer), gpointer data);
69 #define WATCHER(x) int x(int type, int fd, watch_type_t watch, void *data) 70 #define WATCHER_LINE(x) int x(int type, int fd, const char *watch, void *data) 71 #define WATCHER_SESSION(x) int x(int type, int fd, watch_type_t watch, session_t *s) 72 #define WATCHER_SESSION_LINE(x) int x(int type, int fd, const char *watch, session_t *s) 102 #ifndef EKG2_WIN32_NOFUNCTION 119 #define watch_add_line(p, fd, type, handler, data) watch_add(p, fd, type, (watcher_handler_func_t *) (handler), data) 121 #define watch_add_session_line(s, fd, type, handler) watch_add_session(s, fd, type, (watcher_session_handler_func_t *) (handler)) ekg_child_t G_GNUC_MALLOC
Definition: sources.h:36
int is_session
Definition: sources.h:96
GString * string_t
Definition: dynstuff.h:147
string_t buf
Definition: sources.h:84
int watch_write(watch_t *w, const char *format,...)
Definition: sources.c:1374
Definition: sessions.h:127
void * data
Definition: sources.h:83
int fd
Definition: sources.h:79
ekg_timer_t timer_add_session(session_t *session, const gchar *name, guint period, gboolean persist, gint(*function)(gint, session_t *))
Definition: sources.c:369
gboolean ekg_source_remove_by_data(gpointer priv_data, const gchar *name)
Definition: sources.c:194
GIOChannel * f
Definition: sources.h:99
GPid pid
Definition: sources.c:57
guint64 interval
Definition: sources.c:63
watch_type_t type
Definition: sources.h:80
plugin_t * plugin
Definition: sources.h:81
ekg_timer_t timer_add_ms(plugin_t *plugin, const gchar *name, guint period, gboolean persist, gint(*function)(gint, gpointer), gpointer data)
Definition: sources.c:336
ekg_timer_t timer_find_session(session_t *session, const gchar *name)
Definition: sources.c:463
void watch_free(watch_t *w)
Definition: sources.c:1482
time_t timeout
Definition: sources.h:85
int watcher_session_handler_func_t(int type, int fd, watch_type_t watch, session_t *s)
Definition: sources.h:76
#define WATCHER_SESSION(x)
Definition: sources.h:71
gint timer_remove(plugin_t *plugin, const gchar *name)
Definition: sources.c:450
watch_t * watch_find(plugin_t *plugin, int fd, watch_type_t type)
Definition: sources.c:1187
struct ekg_source * ekg_source_t
Definition: sources.h:26
int watch_timeout_set(watch_t *w, time_t timeout)
Definition: plugins.c:787
#define WATCHER(x)
Definition: sources.h:69
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
watch_t * watch_add(plugin_t *plugin, int fd, watch_type_t type, watcher_handler_func_t *handler, void *data)
Definition: sources.c:1509
GDestroyNotify destr
Definition: sources.c:53
gboolean ekg_source_remove_by_plugin(plugin_t *plugin, const gchar *name)
Definition: sources.c:227
gboolean ekg_source_remove_by_handler(gpointer handler, const gchar *name)
Definition: sources.c:156
watch_type_t
Definition: sources.h:61
void ekg_source_remove(ekg_source_t s)
Definition: sources.c:113
gpointer priv_data
Definition: sources.c:52
gint timer_remove_session(session_t *session, const gchar *name)
Definition: sources.c:482
gboolean persist
Definition: sources.c:67
list_t watches
Definition: plugins.c:52
int watch_remove(plugin_t *plugin, int fd, watch_type_t type)
Definition: sources.c:1572
ekg_source_t ekg_child_t
Definition: sources.h:34
void * watch_handler_func_t
Definition: sources.h:114
int watch_write_data(watch_t *w, const char *buf, int len)
Definition: sources.c:1351
watch_t * watch_add_session(session_t *session, int fd, watch_type_t type, watcher_session_handler_func_t *handler)
Definition: sources.c:1560
const char * name
Definition: remote.c:88
void * handler
Definition: sources.h:82
Definition: ekg_hash_benchmark.c:14
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
int watcher_handler_func_t(int type, int fd, watch_type_t watch, void *data)
Definition: sources.h:74
ekg_timer_t timer_add(plugin_t *plugin, const gchar *name, guint period, gboolean persist, gint(*function)(gint, gpointer), gpointer data)
Definition: sources.c:365
abort_handler handler
Definition: abort.c:24
guint id
Definition: sources.h:98
int transfer_limit
Definition: sources.h:88
time_t started
Definition: sources.h:86