summaryrefslogtreecommitdiff
path: root/watch.h
blob: eb69c9e35e72dfc6b5c8da4cfaccee6819abfae7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include <glib.h>

/*
 * Watching file descriptors
 */
typedef void (* WatchCallback) (gpointer data);

void     fd_add_watch             (gint             fd,
				   gpointer         data);
void     fd_set_read_callback     (gint             fd,
				   WatchCallback read_cb);
void     fd_set_write_callback    (gint             fd,
				   WatchCallback write_cb);
void     fd_set_hangup_callback   (gint             fd,
				   WatchCallback hangup_cb);
void     fd_set_error_callback    (gint             fd,
				   WatchCallback error_cb);
void     fd_set_priority_callback (gint             fd,
				   WatchCallback priority_cb);
void     fd_remove_watch          (gint             fd);
gboolean fd_is_watched            (gint             fd);