eventloop.h
Go to the documentation of this file.
1 
6 /* purple
7  *
8  * Purple is the legal property of its developers, whose names are too numerous
9  * to list here. Please refer to the COPYRIGHT file distributed with this
10  * source distribution.
11  *
12  * This program is free software; you can redistribute it and/or modify
13  * it under the terms of the GNU General Public License as published by
14  * the Free Software Foundation; either version 2 of the License, or
15  * (at your option) any later version.
16  *
17  * This program is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20  * GNU General Public License for more details.
21  *
22  * You should have received a copy of the GNU General Public License
23  * along with this program; if not, write to the Free Software
24  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
25  */
26 #ifndef _PURPLE_EVENTLOOP_H_
27 #define _PURPLE_EVENTLOOP_H_
28 
29 #include <glib.h>
30 
31 #ifdef __cplusplus
32 extern "C" {
33 #endif
34 
38 typedef enum
39 {
40  PURPLE_INPUT_READ = 1 << 0,
44 
50 typedef void (*PurpleInputFunction)(gpointer, gint, PurpleInputCondition);
51 
54 
61 {
85  guint (*timeout_add)(guint interval, GSourceFunc function, gpointer data);
86 
95  gboolean (*timeout_remove)(guint handle);
96 
112  guint (*input_add)(int fd, PurpleInputCondition cond,
113  PurpleInputFunction func, gpointer user_data);
114 
121  gboolean (*input_remove)(guint handle);
122 
123 
134  int (*input_get_error)(int fd, int *error);
135 
150  guint (*timeout_add_seconds)(guint interval, GSourceFunc function,
151  gpointer data);
152 
153  void (*_purple_reserved2)(void);
154  void (*_purple_reserved3)(void);
155  void (*_purple_reserved4)(void);
156 };
157 
158 /**************************************************************************/
160 /**************************************************************************/
178 guint purple_timeout_add(guint interval, GSourceFunc function, gpointer data);
179 
198 guint purple_timeout_add_seconds(guint interval, GSourceFunc function, gpointer data);
199 
207 gboolean purple_timeout_remove(guint handle);
208 
220 guint purple_input_add(int fd, PurpleInputCondition cond,
221  PurpleInputFunction func, gpointer user_data);
222 
229 gboolean purple_input_remove(guint handle);
230 
245 int
246 purple_input_get_error(int fd, int *error);
247 
248 
252 /**************************************************************************/
254 /**************************************************************************/
262 
269 
272 #ifdef __cplusplus
273 }
274 #endif
275 
276 #endif /* _PURPLE_EVENTLOOP_H_ */