18 #ifndef CRM_COMMON_MAINLOOP__H
19 # define CRM_COMMON_MAINLOOP__H
50 gboolean
crm_signal(
int sig,
void (*dispatch) (
int sig));
70 # include <qb/qbipcs.h>
73 int (*
dispatch) (
const char *buffer, ssize_t length, gpointer userdata);
78 struct qb_ipcs_service_handlers *callbacks);
107 void (*callback) (
mainloop_child_t * p, pid_t pid,
int core,
int signo,
int exitcode));
114 void (*callback) (
mainloop_child_t * p, pid_t pid,
int core,
int signo,
int exitcode));
124 # define G_PRIORITY_MEDIUM (G_PRIORITY_HIGH/2)
gboolean mainloop_add_signal(int sig, void(*dispatch)(int sig))
mainloop_io_t * mainloop_add_fd(const char *name, int priority, int fd, void *userdata, struct mainloop_fd_callbacks *callbacks)
void mainloop_timer_start(mainloop_timer_t *t)
guint mainloop_timer_set_period(mainloop_timer_t *t, guint period_ms)
void mainloop_timer_del(mainloop_timer_t *t)
gboolean mainloop_child_kill(pid_t pid)
struct mainloop_timer_s mainloop_timer_t
struct mainloop_io_s mainloop_io_t
void mainloop_child_add_with_flags(pid_t pid, int timeout, const char *desc, void *userdata, enum mainloop_child_flags, void(*callback)(mainloop_child_t *p, pid_t pid, int core, int signo, int exitcode))
struct mainloop_child_s mainloop_child_t
void mainloop_set_trigger(crm_trigger_t *source)
void mainloop_cleanup(void)
int(* dispatch)(gpointer userdata)
pid_t mainloop_child_pid(mainloop_child_t *child)
gboolean mainloop_destroy_trigger(crm_trigger_t *source)
void mainloop_timer_stop(mainloop_timer_t *t)
struct trigger_s crm_trigger_t
void(* destroy)(gpointer)
void * mainloop_child_userdata(mainloop_child_t *child)
struct crm_ipc_s crm_ipc_t
void(* destroy)(gpointer userdata)
gboolean crm_signal(int sig, void(*dispatch)(int sig))
crm_trigger_t * mainloop_add_trigger(int priority, int(*dispatch)(gpointer user_data), gpointer userdata)
void mainloop_del_ipc_client(mainloop_io_t *client)
bool mainloop_timer_running(mainloop_timer_t *t)
void mainloop_child_add(pid_t pid, int timeout, const char *desc, void *userdata, void(*callback)(mainloop_child_t *p, pid_t pid, int core, int signo, int exitcode))
void mainloop_trigger_complete(crm_trigger_t *trig)
crm_ipc_t * mainloop_get_ipc_client(mainloop_io_t *client)
void mainloop_clear_child_userdata(mainloop_child_t *child)
Wrappers for and extensions to libqb IPC.
void mainloop_del_fd(mainloop_io_t *client)
void mainloop_del_ipc_server(qb_ipcs_service_t *server)
mainloop_timer_t * mainloop_timer_add(const char *name, guint period_ms, bool repeat, GSourceFunc cb, void *userdata)
gboolean mainloop_destroy_signal(int sig)
mainloop_io_t * mainloop_add_ipc_client(const char *name, int priority, size_t max_size, void *userdata, struct ipc_client_callbacks *callbacks)
qb_ipcs_service_t * mainloop_add_ipc_server(const char *name, enum qb_ipc_type type, struct qb_ipcs_service_handlers *callbacks)
const char * mainloop_child_name(mainloop_child_t *child)
int(* dispatch)(const char *buffer, ssize_t length, gpointer userdata)
enum crm_ais_msg_types type
int mainloop_child_timeout(mainloop_child_t *child)