Mercurial > pidgin
comparison src/proxy.h @ 8273:f24172f53650
[gaim-migrate @ 8997]
This is Scott Lamb's eventloop abstraction patch. If it breaks things,
Scott Lamb will be glad to take the punishment. If it doesn't, it should
make integration into other event loops easier. Well, no, not easier,
harder actually, but it'll be done more appropriately and less hackily..
er, hacky. Is hackily a word?
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Tue, 17 Feb 2004 02:17:48 +0000 |
parents | b5dbd1839716 |
children | 9fdbfe832fac |
comparison
equal
deleted
inserted
replaced
8272:9af78e73f0b2 | 8273:f24172f53650 |
---|---|
24 */ | 24 */ |
25 #ifndef _GAIM_PROXY_H_ | 25 #ifndef _GAIM_PROXY_H_ |
26 #define _GAIM_PROXY_H_ | 26 #define _GAIM_PROXY_H_ |
27 | 27 |
28 #include <glib.h> | 28 #include <glib.h> |
29 #include "eventloop.h" | |
29 | 30 |
30 /** | 31 /** |
31 * A type of proxy connection. | 32 * A type of proxy connection. |
32 */ | 33 */ |
33 typedef enum | 34 typedef enum |
40 GAIM_PROXY_USE_ENVVAR /**< Use environmental settings. */ | 41 GAIM_PROXY_USE_ENVVAR /**< Use environmental settings. */ |
41 | 42 |
42 } GaimProxyType; | 43 } GaimProxyType; |
43 | 44 |
44 /** | 45 /** |
45 * An input condition. | |
46 */ | |
47 typedef enum | |
48 { | |
49 GAIM_INPUT_READ = 1 << 0, /**< A read condition. */ | |
50 GAIM_INPUT_WRITE = 1 << 1 /**< A write condition. */ | |
51 | |
52 } GaimInputCondition; | |
53 | |
54 /** | |
55 * Information on proxy settings. | 46 * Information on proxy settings. |
56 */ | 47 */ |
57 typedef struct | 48 typedef struct |
58 { | 49 { |
59 GaimProxyType type; /**< The proxy type. */ | 50 GaimProxyType type; /**< The proxy type. */ |
63 char *username; /**< The username. */ | 54 char *username; /**< The username. */ |
64 char *password; /**< The password. */ | 55 char *password; /**< The password. */ |
65 | 56 |
66 } GaimProxyInfo; | 57 } GaimProxyInfo; |
67 | 58 |
68 typedef void (*GaimInputFunction)(gpointer, gint, GaimInputCondition); | |
69 | |
70 | 59 |
71 #include "account.h" | 60 #include "account.h" |
72 | 61 |
73 #ifdef __cplusplus | 62 #ifdef __cplusplus |
74 extern "C" { | 63 extern "C" { |
201 | 190 |
202 /** | 191 /** |
203 * Initializes the proxy subsystem. | 192 * Initializes the proxy subsystem. |
204 */ | 193 */ |
205 void gaim_proxy_init(void); | 194 void gaim_proxy_init(void); |
206 | |
207 /** | |
208 * Adds an input handler. | |
209 * | |
210 * @param source The input source. | |
211 * @param cond The condition type. | |
212 * @param func The callback function for data. | |
213 * @param user_data User-specified data. | |
214 * | |
215 * @return The resulting handle. | |
216 */ | |
217 gint gaim_input_add(int source, GaimInputCondition cond, | |
218 GaimInputFunction func, gpointer user_data); | |
219 | |
220 /** | |
221 * Removes an input handler. | |
222 * | |
223 * @param handle The handle of the input handler. | |
224 */ | |
225 void gaim_input_remove(gint handle); | |
226 | 195 |
227 /** | 196 /** |
228 * Makes a connection to the specified host and port. | 197 * Makes a connection to the specified host and port. |
229 * | 198 * |
230 * @param account The account making the connection. | 199 * @param account The account making the connection. |