comparison src/proxy.h @ 4634:d19872836812

[gaim-migrate @ 4941] This will let you set up different proxy settings for different accounts. Mainly useful to the corporate users that need to connect to an internal jabber server, and still want to connect to "external" stuff through a proxy, or something along those lines. I'm sure someone will come up with another use for it. committer: Tailor Script <tailor@pidgin.im>
author Nathan Walp <nwalp@pidgin.im>
date Sun, 02 Mar 2003 18:48:02 +0000
parents 7ba9b56a8796
children 4691c5936c01
comparison
equal deleted inserted replaced
4633:812148fb2e2f 4634:d19872836812
37 #include <winsock.h> 37 #include <winsock.h>
38 #endif 38 #endif
39 39
40 #include <glib.h> 40 #include <glib.h>
41 41
42 #include "core.h"
43
42 typedef enum { 44 typedef enum {
45 PROXY_USE_GLOBAL = -1,
43 PROXY_NONE = 0, 46 PROXY_NONE = 0,
44 PROXY_HTTP, 47 PROXY_HTTP,
45 PROXY_SOCKS4, 48 PROXY_SOCKS4,
46 PROXY_SOCKS5, 49 PROXY_SOCKS5,
47 } proxytype_t; 50 } proxytype_t;
48 51
49 extern char proxyhost[128]; 52 struct gaim_proxy_info {
50 extern int proxyport; 53 int proxytype;
51 extern proxytype_t proxytype; 54 char proxyhost[128];
52 extern char proxyuser[128]; 55 proxytype_t proxyport;
53 extern char proxypass[128]; 56 char proxyuser[128];
57 char proxypass[128];
58 };
59
60 extern struct gaim_proxy_info global_proxy_info;
54 extern guint proxy_info_is_from_gaimrc; 61 extern guint proxy_info_is_from_gaimrc;
55 62
56 typedef enum { 63 typedef enum {
57 GAIM_INPUT_READ = 1 << 0, 64 GAIM_INPUT_READ = 1 << 0,
58 GAIM_INPUT_WRITE = 1 << 1 65 GAIM_INPUT_WRITE = 1 << 1
60 typedef void (*GaimInputFunction)(gpointer, gint, GaimInputCondition); 67 typedef void (*GaimInputFunction)(gpointer, gint, GaimInputCondition);
61 68
62 extern gint gaim_input_add(int, GaimInputCondition, GaimInputFunction, gpointer); 69 extern gint gaim_input_add(int, GaimInputCondition, GaimInputFunction, gpointer);
63 extern void gaim_input_remove(gint); 70 extern void gaim_input_remove(gint);
64 71
65 extern int proxy_connect(char *host, int port, GaimInputFunction func, gpointer data); 72 extern int proxy_connect(struct gaim_account *account, char *host, int port, GaimInputFunction func, gpointer data);
66 73
67 #endif /* _PROXY_H_ */ 74 #endif /* _PROXY_H_ */