1 /* - Library for asynchronous communication
2 * Copyright (C) 2002 Søren Sandmann (sandmann@daimi.au.dk)
4 * This library is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this library; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 * Watching file descriptors
24 typedef void (* WatchCallback) (gpointer data);
26 void fd_add_watch (gint fd,
28 void fd_set_read_callback (gint fd,
29 WatchCallback read_cb);
30 void fd_set_write_callback (gint fd,
31 WatchCallback write_cb);
32 void fd_set_hangup_callback (gint fd,
33 WatchCallback hangup_cb);
34 void fd_set_error_callback (gint fd,
35 WatchCallback error_cb);
36 void fd_set_priority_callback (gint fd,
37 WatchCallback priority_cb);
38 void fd_remove_watch (gint fd);
39 gboolean fd_is_watched (gint fd);