Wed, 13 May 2009 20:29:03 +0000
Support custom smileys in MUCs (when all participants support BoB and a maximum
of 10 participants are in the chat).
Always announce support for BoB, since disable custom smileys will still turn
off fetching them, and BoB can be used for other purposes further on.
|
5034
077678f7b048
[gaim-migrate @ 5377]
Christian Hammond <chipx86@chipx86.com>
parents:
4634
diff
changeset
|
1 | /** |
|
5681
514fbc5374dc
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5572
diff
changeset
|
2 | * @file proxy.h Proxy API |
|
5034
077678f7b048
[gaim-migrate @ 5377]
Christian Hammond <chipx86@chipx86.com>
parents:
4634
diff
changeset
|
3 | * @ingroup core |
|
20147
66f05a854eee
applied changes from 8a731bbd0197fbcc91a705c2d8f528154216defa
Richard Laager <rlaager@pidgin.im>
parents:
19859
diff
changeset
|
4 | */ |
|
66f05a854eee
applied changes from 8a731bbd0197fbcc91a705c2d8f528154216defa
Richard Laager <rlaager@pidgin.im>
parents:
19859
diff
changeset
|
5 | |
|
66f05a854eee
applied changes from 8a731bbd0197fbcc91a705c2d8f528154216defa
Richard Laager <rlaager@pidgin.im>
parents:
19859
diff
changeset
|
6 | /* purple |
| 1 | 7 | * |
| 15884 | 8 | * Purple is the legal property of its developers, whose names are too numerous |
| 8046 | 9 | * to list here. Please refer to the COPYRIGHT file distributed with this |
| 10 | * source distribution. | |
| 1 | 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 | |
|
19859
71d37b57eff2
The FSF changed its address a while ago; our files were out of date.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
16262
diff
changeset
|
24 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA |
| 1 | 25 | */ |
| 15884 | 26 | #ifndef _PURPLE_PROXY_H_ |
| 27 | #define _PURPLE_PROXY_H_ | |
| 1 | 28 | |
|
2090
bab8b7e309db
[gaim-migrate @ 2100]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
1881
diff
changeset
|
29 | #include <glib.h> |
| 8273 | 30 | #include "eventloop.h" |
| 1 | 31 | |
|
5681
514fbc5374dc
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5572
diff
changeset
|
32 | /** |
|
514fbc5374dc
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5572
diff
changeset
|
33 | * A type of proxy connection. |
|
514fbc5374dc
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5572
diff
changeset
|
34 | */ |
|
514fbc5374dc
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5572
diff
changeset
|
35 | typedef enum |
|
514fbc5374dc
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5572
diff
changeset
|
36 | { |
| 15884 | 37 | PURPLE_PROXY_USE_GLOBAL = -1, /**< Use the global proxy information. */ |
| 38 | PURPLE_PROXY_NONE = 0, /**< No proxy. */ | |
| 39 | PURPLE_PROXY_HTTP, /**< HTTP proxy. */ | |
| 40 | PURPLE_PROXY_SOCKS4, /**< SOCKS 4 proxy. */ | |
| 41 | PURPLE_PROXY_SOCKS5, /**< SOCKS 5 proxy. */ | |
| 42 | PURPLE_PROXY_USE_ENVVAR /**< Use environmental settings. */ | |
|
5681
514fbc5374dc
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5572
diff
changeset
|
43 | |
| 15884 | 44 | } PurpleProxyType; |
| 1 | 45 | |
|
5681
514fbc5374dc
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5572
diff
changeset
|
46 | /** |
|
514fbc5374dc
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5572
diff
changeset
|
47 | * Information on proxy settings. |
|
514fbc5374dc
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5572
diff
changeset
|
48 | */ |
|
514fbc5374dc
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5572
diff
changeset
|
49 | typedef struct |
|
514fbc5374dc
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5572
diff
changeset
|
50 | { |
| 15884 | 51 | PurpleProxyType type; /**< The proxy type. */ |
|
1881
bcd5d457cdbb
[gaim-migrate @ 1891]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
1843
diff
changeset
|
52 | |
|
5681
514fbc5374dc
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5572
diff
changeset
|
53 | char *host; /**< The host. */ |
|
514fbc5374dc
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5572
diff
changeset
|
54 | int port; /**< The port number. */ |
|
514fbc5374dc
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5572
diff
changeset
|
55 | char *username; /**< The username. */ |
|
514fbc5374dc
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5572
diff
changeset
|
56 | char *password; /**< The password. */ |
|
514fbc5374dc
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5572
diff
changeset
|
57 | |
| 15884 | 58 | } PurpleProxyInfo; |
|
5681
514fbc5374dc
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5572
diff
changeset
|
59 | |
| 15884 | 60 | typedef struct _PurpleProxyConnectData PurpleProxyConnectData; |
|
14151
34427f138b1f
[gaim-migrate @ 16712]
Mark Doliner <markdoliner@pidgin.im>
parents:
13515
diff
changeset
|
61 | |
| 15884 | 62 | typedef void (*PurpleProxyConnectFunction)(gpointer data, gint source, const gchar *error_message); |
|
14151
34427f138b1f
[gaim-migrate @ 16712]
Mark Doliner <markdoliner@pidgin.im>
parents:
13515
diff
changeset
|
63 | |
|
5872
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5717
diff
changeset
|
64 | |
|
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5717
diff
changeset
|
65 | #include "account.h" |
|
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5717
diff
changeset
|
66 | |
|
5944
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
67 | #ifdef __cplusplus |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
68 | extern "C" { |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
69 | #endif |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
70 | |
|
5681
514fbc5374dc
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5572
diff
changeset
|
71 | /**************************************************************************/ |
|
514fbc5374dc
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5572
diff
changeset
|
72 | /** @name Proxy structure API */ |
|
514fbc5374dc
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5572
diff
changeset
|
73 | /**************************************************************************/ |
|
514fbc5374dc
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5572
diff
changeset
|
74 | /*@{*/ |
|
514fbc5374dc
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5572
diff
changeset
|
75 | |
|
514fbc5374dc
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5572
diff
changeset
|
76 | /** |
|
514fbc5374dc
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5572
diff
changeset
|
77 | * Creates a proxy information structure. |
|
514fbc5374dc
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5572
diff
changeset
|
78 | * |
|
514fbc5374dc
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5572
diff
changeset
|
79 | * @return The proxy information structure. |
|
514fbc5374dc
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5572
diff
changeset
|
80 | */ |
| 15884 | 81 | PurpleProxyInfo *purple_proxy_info_new(void); |
|
5681
514fbc5374dc
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5572
diff
changeset
|
82 | |
|
514fbc5374dc
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5572
diff
changeset
|
83 | /** |
|
514fbc5374dc
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5572
diff
changeset
|
84 | * Destroys a proxy information structure. |
|
514fbc5374dc
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5572
diff
changeset
|
85 | * |
|
6720
cdc5348dd848
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6621
diff
changeset
|
86 | * @param info The proxy information structure to destroy. |
|
5681
514fbc5374dc
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5572
diff
changeset
|
87 | */ |
| 15884 | 88 | void purple_proxy_info_destroy(PurpleProxyInfo *info); |
|
5681
514fbc5374dc
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5572
diff
changeset
|
89 | |
|
514fbc5374dc
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5572
diff
changeset
|
90 | /** |
|
514fbc5374dc
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5572
diff
changeset
|
91 | * Sets the type of proxy. |
|
514fbc5374dc
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5572
diff
changeset
|
92 | * |
|
6720
cdc5348dd848
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6621
diff
changeset
|
93 | * @param info The proxy information. |
|
cdc5348dd848
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6621
diff
changeset
|
94 | * @param type The proxy type. |
|
5681
514fbc5374dc
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5572
diff
changeset
|
95 | */ |
| 15884 | 96 | void purple_proxy_info_set_type(PurpleProxyInfo *info, PurpleProxyType type); |
|
5681
514fbc5374dc
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5572
diff
changeset
|
97 | |
|
514fbc5374dc
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5572
diff
changeset
|
98 | /** |
|
514fbc5374dc
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5572
diff
changeset
|
99 | * Sets the proxy host. |
|
514fbc5374dc
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5572
diff
changeset
|
100 | * |
|
6720
cdc5348dd848
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6621
diff
changeset
|
101 | * @param info The proxy information. |
|
cdc5348dd848
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6621
diff
changeset
|
102 | * @param host The host. |
|
5681
514fbc5374dc
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5572
diff
changeset
|
103 | */ |
| 15884 | 104 | void purple_proxy_info_set_host(PurpleProxyInfo *info, const char *host); |
|
5681
514fbc5374dc
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5572
diff
changeset
|
105 | |
|
514fbc5374dc
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5572
diff
changeset
|
106 | /** |
|
514fbc5374dc
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5572
diff
changeset
|
107 | * Sets the proxy port. |
|
514fbc5374dc
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5572
diff
changeset
|
108 | * |
|
6720
cdc5348dd848
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6621
diff
changeset
|
109 | * @param info The proxy information. |
|
cdc5348dd848
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6621
diff
changeset
|
110 | * @param port The port. |
|
5681
514fbc5374dc
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5572
diff
changeset
|
111 | */ |
| 15884 | 112 | void purple_proxy_info_set_port(PurpleProxyInfo *info, int port); |
|
5681
514fbc5374dc
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5572
diff
changeset
|
113 | |
|
514fbc5374dc
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5572
diff
changeset
|
114 | /** |
|
514fbc5374dc
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5572
diff
changeset
|
115 | * Sets the proxy username. |
|
514fbc5374dc
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5572
diff
changeset
|
116 | * |
|
6720
cdc5348dd848
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6621
diff
changeset
|
117 | * @param info The proxy information. |
|
5681
514fbc5374dc
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5572
diff
changeset
|
118 | * @param username The username. |
|
514fbc5374dc
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5572
diff
changeset
|
119 | */ |
| 15884 | 120 | void purple_proxy_info_set_username(PurpleProxyInfo *info, const char *username); |
|
5681
514fbc5374dc
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5572
diff
changeset
|
121 | |
|
514fbc5374dc
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5572
diff
changeset
|
122 | /** |
|
514fbc5374dc
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5572
diff
changeset
|
123 | * Sets the proxy password. |
|
514fbc5374dc
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5572
diff
changeset
|
124 | * |
|
6720
cdc5348dd848
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6621
diff
changeset
|
125 | * @param info The proxy information. |
|
5681
514fbc5374dc
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5572
diff
changeset
|
126 | * @param password The password. |
|
514fbc5374dc
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5572
diff
changeset
|
127 | */ |
| 15884 | 128 | void purple_proxy_info_set_password(PurpleProxyInfo *info, const char *password); |
|
5681
514fbc5374dc
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5572
diff
changeset
|
129 | |
|
514fbc5374dc
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5572
diff
changeset
|
130 | /** |
|
514fbc5374dc
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5572
diff
changeset
|
131 | * Returns the proxy's type. |
|
514fbc5374dc
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5572
diff
changeset
|
132 | * |
|
6720
cdc5348dd848
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6621
diff
changeset
|
133 | * @param info The proxy information. |
|
5681
514fbc5374dc
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5572
diff
changeset
|
134 | * |
|
514fbc5374dc
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5572
diff
changeset
|
135 | * @return The type. |
|
514fbc5374dc
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5572
diff
changeset
|
136 | */ |
| 15884 | 137 | PurpleProxyType purple_proxy_info_get_type(const PurpleProxyInfo *info); |
|
5681
514fbc5374dc
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5572
diff
changeset
|
138 | |
|
514fbc5374dc
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5572
diff
changeset
|
139 | /** |
|
514fbc5374dc
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5572
diff
changeset
|
140 | * Returns the proxy's host. |
|
514fbc5374dc
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5572
diff
changeset
|
141 | * |
|
6720
cdc5348dd848
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6621
diff
changeset
|
142 | * @param info The proxy information. |
|
5681
514fbc5374dc
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5572
diff
changeset
|
143 | * |
|
514fbc5374dc
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5572
diff
changeset
|
144 | * @return The host. |
|
514fbc5374dc
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5572
diff
changeset
|
145 | */ |
| 15884 | 146 | const char *purple_proxy_info_get_host(const PurpleProxyInfo *info); |
|
5681
514fbc5374dc
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5572
diff
changeset
|
147 | |
|
514fbc5374dc
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5572
diff
changeset
|
148 | /** |
|
514fbc5374dc
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5572
diff
changeset
|
149 | * Returns the proxy's port. |
|
514fbc5374dc
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5572
diff
changeset
|
150 | * |
|
6720
cdc5348dd848
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6621
diff
changeset
|
151 | * @param info The proxy information. |
|
5681
514fbc5374dc
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5572
diff
changeset
|
152 | * |
|
514fbc5374dc
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5572
diff
changeset
|
153 | * @return The port. |
|
514fbc5374dc
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5572
diff
changeset
|
154 | */ |
| 15884 | 155 | int purple_proxy_info_get_port(const PurpleProxyInfo *info); |
|
2090
bab8b7e309db
[gaim-migrate @ 2100]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
1881
diff
changeset
|
156 | |
|
5681
514fbc5374dc
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5572
diff
changeset
|
157 | /** |
|
514fbc5374dc
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5572
diff
changeset
|
158 | * Returns the proxy's username. |
|
514fbc5374dc
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5572
diff
changeset
|
159 | * |
|
6720
cdc5348dd848
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6621
diff
changeset
|
160 | * @param info The proxy information. |
|
5681
514fbc5374dc
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5572
diff
changeset
|
161 | * |
|
514fbc5374dc
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5572
diff
changeset
|
162 | * @return The username. |
|
514fbc5374dc
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5572
diff
changeset
|
163 | */ |
| 15884 | 164 | const char *purple_proxy_info_get_username(const PurpleProxyInfo *info); |
|
5681
514fbc5374dc
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5572
diff
changeset
|
165 | |
|
514fbc5374dc
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5572
diff
changeset
|
166 | /** |
|
514fbc5374dc
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5572
diff
changeset
|
167 | * Returns the proxy's password. |
|
514fbc5374dc
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5572
diff
changeset
|
168 | * |
|
6720
cdc5348dd848
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6621
diff
changeset
|
169 | * @param info The proxy information. |
|
5681
514fbc5374dc
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5572
diff
changeset
|
170 | * |
|
514fbc5374dc
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5572
diff
changeset
|
171 | * @return The password. |
|
514fbc5374dc
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5572
diff
changeset
|
172 | */ |
| 15884 | 173 | const char *purple_proxy_info_get_password(const PurpleProxyInfo *info); |
|
5681
514fbc5374dc
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5572
diff
changeset
|
174 | |
|
514fbc5374dc
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5572
diff
changeset
|
175 | /*@}*/ |
|
514fbc5374dc
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5572
diff
changeset
|
176 | |
|
514fbc5374dc
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5572
diff
changeset
|
177 | /**************************************************************************/ |
|
514fbc5374dc
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5572
diff
changeset
|
178 | /** @name Global Proxy API */ |
|
514fbc5374dc
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5572
diff
changeset
|
179 | /**************************************************************************/ |
|
514fbc5374dc
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5572
diff
changeset
|
180 | /*@{*/ |
|
514fbc5374dc
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5572
diff
changeset
|
181 | |
|
514fbc5374dc
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5572
diff
changeset
|
182 | /** |
| 15884 | 183 | * Returns purple's global proxy information. |
|
5681
514fbc5374dc
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5572
diff
changeset
|
184 | * |
|
514fbc5374dc
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5572
diff
changeset
|
185 | * @return The global proxy information. |
|
514fbc5374dc
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5572
diff
changeset
|
186 | */ |
| 15884 | 187 | PurpleProxyInfo *purple_global_proxy_get_info(void); |
|
5681
514fbc5374dc
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5572
diff
changeset
|
188 | |
|
25858
ec60fbe5a4ab
Patch from fqueze to add API for setting the global proxy settings. Fixes #7610.
Daniel Atallah <datallah@pidgin.im>
parents:
23449
diff
changeset
|
189 | /** |
|
ec60fbe5a4ab
Patch from fqueze to add API for setting the global proxy settings. Fixes #7610.
Daniel Atallah <datallah@pidgin.im>
parents:
23449
diff
changeset
|
190 | * Set purple's global proxy information. |
|
ec60fbe5a4ab
Patch from fqueze to add API for setting the global proxy settings. Fixes #7610.
Daniel Atallah <datallah@pidgin.im>
parents:
23449
diff
changeset
|
191 | * |
|
ec60fbe5a4ab
Patch from fqueze to add API for setting the global proxy settings. Fixes #7610.
Daniel Atallah <datallah@pidgin.im>
parents:
23449
diff
changeset
|
192 | * @param info The proxy information. |
|
25885
5b5e2ca316b2
Add @since 2.6.0 doxygen comments to some of our new functions, and
Mark Doliner <markdoliner@pidgin.im>
parents:
25858
diff
changeset
|
193 | * @since 2.6.0 |
|
25858
ec60fbe5a4ab
Patch from fqueze to add API for setting the global proxy settings. Fixes #7610.
Daniel Atallah <datallah@pidgin.im>
parents:
23449
diff
changeset
|
194 | */ |
|
ec60fbe5a4ab
Patch from fqueze to add API for setting the global proxy settings. Fixes #7610.
Daniel Atallah <datallah@pidgin.im>
parents:
23449
diff
changeset
|
195 | void purple_global_proxy_set_info(PurpleProxyInfo *info); |
|
ec60fbe5a4ab
Patch from fqueze to add API for setting the global proxy settings. Fixes #7610.
Daniel Atallah <datallah@pidgin.im>
parents:
23449
diff
changeset
|
196 | |
|
5681
514fbc5374dc
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5572
diff
changeset
|
197 | /*@}*/ |
|
514fbc5374dc
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5572
diff
changeset
|
198 | |
|
514fbc5374dc
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5572
diff
changeset
|
199 | /**************************************************************************/ |
|
514fbc5374dc
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5572
diff
changeset
|
200 | /** @name Proxy API */ |
|
514fbc5374dc
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5572
diff
changeset
|
201 | /**************************************************************************/ |
|
514fbc5374dc
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5572
diff
changeset
|
202 | /*@{*/ |
|
514fbc5374dc
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5572
diff
changeset
|
203 | |
|
514fbc5374dc
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5572
diff
changeset
|
204 | /** |
|
14151
34427f138b1f
[gaim-migrate @ 16712]
Mark Doliner <markdoliner@pidgin.im>
parents:
13515
diff
changeset
|
205 | * Returns the proxy subsystem handle. |
|
34427f138b1f
[gaim-migrate @ 16712]
Mark Doliner <markdoliner@pidgin.im>
parents:
13515
diff
changeset
|
206 | * |
|
34427f138b1f
[gaim-migrate @ 16712]
Mark Doliner <markdoliner@pidgin.im>
parents:
13515
diff
changeset
|
207 | * @return The proxy subsystem handle. |
|
34427f138b1f
[gaim-migrate @ 16712]
Mark Doliner <markdoliner@pidgin.im>
parents:
13515
diff
changeset
|
208 | */ |
| 15884 | 209 | void *purple_proxy_get_handle(void); |
|
14151
34427f138b1f
[gaim-migrate @ 16712]
Mark Doliner <markdoliner@pidgin.im>
parents:
13515
diff
changeset
|
210 | |
|
34427f138b1f
[gaim-migrate @ 16712]
Mark Doliner <markdoliner@pidgin.im>
parents:
13515
diff
changeset
|
211 | /** |
|
5681
514fbc5374dc
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5572
diff
changeset
|
212 | * Initializes the proxy subsystem. |
|
514fbc5374dc
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5572
diff
changeset
|
213 | */ |
| 15884 | 214 | void purple_proxy_init(void); |
|
5681
514fbc5374dc
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5572
diff
changeset
|
215 | |
|
514fbc5374dc
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5572
diff
changeset
|
216 | /** |
|
14151
34427f138b1f
[gaim-migrate @ 16712]
Mark Doliner <markdoliner@pidgin.im>
parents:
13515
diff
changeset
|
217 | * Uninitializes the proxy subsystem. |
|
34427f138b1f
[gaim-migrate @ 16712]
Mark Doliner <markdoliner@pidgin.im>
parents:
13515
diff
changeset
|
218 | */ |
| 15884 | 219 | void purple_proxy_uninit(void); |
|
14151
34427f138b1f
[gaim-migrate @ 16712]
Mark Doliner <markdoliner@pidgin.im>
parents:
13515
diff
changeset
|
220 | |
|
34427f138b1f
[gaim-migrate @ 16712]
Mark Doliner <markdoliner@pidgin.im>
parents:
13515
diff
changeset
|
221 | /** |
| 13515 | 222 | * Returns configuration of a proxy. |
| 223 | * | |
| 224 | * @param account The account for which the configuration is needed. | |
| 225 | * | |
| 226 | * @return The configuration of a proxy. | |
| 227 | */ | |
| 15884 | 228 | PurpleProxyInfo *purple_proxy_get_setup(PurpleAccount *account); |
| 13515 | 229 | |
| 230 | /** | |
|
14151
34427f138b1f
[gaim-migrate @ 16712]
Mark Doliner <markdoliner@pidgin.im>
parents:
13515
diff
changeset
|
231 | * Makes a connection to the specified host and port. Note that this |
|
34427f138b1f
[gaim-migrate @ 16712]
Mark Doliner <markdoliner@pidgin.im>
parents:
13515
diff
changeset
|
232 | * function name can be misleading--although it is called "proxy |
|
34427f138b1f
[gaim-migrate @ 16712]
Mark Doliner <markdoliner@pidgin.im>
parents:
13515
diff
changeset
|
233 | * connect," it is used for establishing any outgoing TCP connection, |
|
34427f138b1f
[gaim-migrate @ 16712]
Mark Doliner <markdoliner@pidgin.im>
parents:
13515
diff
changeset
|
234 | * whether through a proxy or not. |
|
5681
514fbc5374dc
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5572
diff
changeset
|
235 | * |
|
14930
dd103a8ee615
[gaim-migrate @ 17637]
Mark Doliner <markdoliner@pidgin.im>
parents:
14899
diff
changeset
|
236 | * @param handle A handle that should be associated with this |
|
dd103a8ee615
[gaim-migrate @ 17637]
Mark Doliner <markdoliner@pidgin.im>
parents:
14899
diff
changeset
|
237 | * connection attempt. The handle can be used |
|
dd103a8ee615
[gaim-migrate @ 17637]
Mark Doliner <markdoliner@pidgin.im>
parents:
14899
diff
changeset
|
238 | * to cancel the connection attempt using the |
| 15884 | 239 | * purple_proxy_connect_cancel_with_handle() |
|
14930
dd103a8ee615
[gaim-migrate @ 17637]
Mark Doliner <markdoliner@pidgin.im>
parents:
14899
diff
changeset
|
240 | * function. |
|
14151
34427f138b1f
[gaim-migrate @ 16712]
Mark Doliner <markdoliner@pidgin.im>
parents:
13515
diff
changeset
|
241 | * @param account The account making the connection. |
|
34427f138b1f
[gaim-migrate @ 16712]
Mark Doliner <markdoliner@pidgin.im>
parents:
13515
diff
changeset
|
242 | * @param host The destination host. |
|
34427f138b1f
[gaim-migrate @ 16712]
Mark Doliner <markdoliner@pidgin.im>
parents:
13515
diff
changeset
|
243 | * @param port The destination port. |
|
34427f138b1f
[gaim-migrate @ 16712]
Mark Doliner <markdoliner@pidgin.im>
parents:
13515
diff
changeset
|
244 | * @param connect_cb The function to call when the connection is |
|
14170
f611621bc8a0
[gaim-migrate @ 16742]
Mark Doliner <markdoliner@pidgin.im>
parents:
14165
diff
changeset
|
245 | * established. If the connection failed then |
|
f611621bc8a0
[gaim-migrate @ 16742]
Mark Doliner <markdoliner@pidgin.im>
parents:
14165
diff
changeset
|
246 | * fd will be -1 and error message will be set |
|
f611621bc8a0
[gaim-migrate @ 16742]
Mark Doliner <markdoliner@pidgin.im>
parents:
14165
diff
changeset
|
247 | * to something descriptive (hopefully). |
|
14151
34427f138b1f
[gaim-migrate @ 16712]
Mark Doliner <markdoliner@pidgin.im>
parents:
13515
diff
changeset
|
248 | * @param data User-defined data. |
|
5681
514fbc5374dc
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5572
diff
changeset
|
249 | * |
|
23449
e53cb7727888
Documentation: Use the word opaque to describe the data structure
Mark Doliner <markdoliner@pidgin.im>
parents:
20147
diff
changeset
|
250 | * @return NULL if there was an error, or a reference to an |
|
e53cb7727888
Documentation: Use the word opaque to describe the data structure
Mark Doliner <markdoliner@pidgin.im>
parents:
20147
diff
changeset
|
251 | * opaque data structure that can be used to cancel |
|
e53cb7727888
Documentation: Use the word opaque to describe the data structure
Mark Doliner <markdoliner@pidgin.im>
parents:
20147
diff
changeset
|
252 | * the pending connection, if needed. |
|
5681
514fbc5374dc
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5572
diff
changeset
|
253 | */ |
| 15884 | 254 | PurpleProxyConnectData *purple_proxy_connect(void *handle, |
| 255 | PurpleAccount *account, | |
|
14151
34427f138b1f
[gaim-migrate @ 16712]
Mark Doliner <markdoliner@pidgin.im>
parents:
13515
diff
changeset
|
256 | const char *host, int port, |
| 15884 | 257 | PurpleProxyConnectFunction connect_cb, gpointer data); |
|
5681
514fbc5374dc
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5572
diff
changeset
|
258 | |
| 8262 | 259 | /** |
| 260 | * Makes a connection through a SOCKS5 proxy. | |
| 261 | * | |
|
16262
1d9b65303dfc
Doxygen updates. This eliminated all the warnings from Doxygen.
Richard Laager <rlaager@pidgin.im>
parents:
15884
diff
changeset
|
262 | * @param handle A handle that should be associated with this |
|
1d9b65303dfc
Doxygen updates. This eliminated all the warnings from Doxygen.
Richard Laager <rlaager@pidgin.im>
parents:
15884
diff
changeset
|
263 | * connection attempt. The handle can be used |
|
1d9b65303dfc
Doxygen updates. This eliminated all the warnings from Doxygen.
Richard Laager <rlaager@pidgin.im>
parents:
15884
diff
changeset
|
264 | * to cancel the connection attempt using the |
|
1d9b65303dfc
Doxygen updates. This eliminated all the warnings from Doxygen.
Richard Laager <rlaager@pidgin.im>
parents:
15884
diff
changeset
|
265 | * purple_proxy_connect_cancel_with_handle() |
|
1d9b65303dfc
Doxygen updates. This eliminated all the warnings from Doxygen.
Richard Laager <rlaager@pidgin.im>
parents:
15884
diff
changeset
|
266 | * function. |
| 15884 | 267 | * @param gpi The PurpleProxyInfo specifying the proxy settings |
|
14151
34427f138b1f
[gaim-migrate @ 16712]
Mark Doliner <markdoliner@pidgin.im>
parents:
13515
diff
changeset
|
268 | * @param host The destination host. |
|
34427f138b1f
[gaim-migrate @ 16712]
Mark Doliner <markdoliner@pidgin.im>
parents:
13515
diff
changeset
|
269 | * @param port The destination port. |
|
34427f138b1f
[gaim-migrate @ 16712]
Mark Doliner <markdoliner@pidgin.im>
parents:
13515
diff
changeset
|
270 | * @param connect_cb The function to call when the connection is |
|
14170
f611621bc8a0
[gaim-migrate @ 16742]
Mark Doliner <markdoliner@pidgin.im>
parents:
14165
diff
changeset
|
271 | * established. If the connection failed then |
|
f611621bc8a0
[gaim-migrate @ 16742]
Mark Doliner <markdoliner@pidgin.im>
parents:
14165
diff
changeset
|
272 | * fd will be -1 and error message will be set |
|
f611621bc8a0
[gaim-migrate @ 16742]
Mark Doliner <markdoliner@pidgin.im>
parents:
14165
diff
changeset
|
273 | * to something descriptive (hopefully). |
|
14151
34427f138b1f
[gaim-migrate @ 16712]
Mark Doliner <markdoliner@pidgin.im>
parents:
13515
diff
changeset
|
274 | * @param data User-defined data. |
| 8262 | 275 | * |
|
23449
e53cb7727888
Documentation: Use the word opaque to describe the data structure
Mark Doliner <markdoliner@pidgin.im>
parents:
20147
diff
changeset
|
276 | * @return NULL if there was an error, or a reference to an |
|
e53cb7727888
Documentation: Use the word opaque to describe the data structure
Mark Doliner <markdoliner@pidgin.im>
parents:
20147
diff
changeset
|
277 | * opaque data structure that can be used to cancel |
|
e53cb7727888
Documentation: Use the word opaque to describe the data structure
Mark Doliner <markdoliner@pidgin.im>
parents:
20147
diff
changeset
|
278 | * the pending connection, if needed. |
| 8262 | 279 | */ |
| 15884 | 280 | PurpleProxyConnectData *purple_proxy_connect_socks5(void *handle, |
| 281 | PurpleProxyInfo *gpi, | |
|
14151
34427f138b1f
[gaim-migrate @ 16712]
Mark Doliner <markdoliner@pidgin.im>
parents:
13515
diff
changeset
|
282 | const char *host, int port, |
| 15884 | 283 | PurpleProxyConnectFunction connect_cb, gpointer data); |
| 8262 | 284 | |
|
11428
b3a4026f2811
[gaim-migrate @ 13665]
Thomas Butter <tbutter@users.sourceforge.net>
parents:
11211
diff
changeset
|
285 | /** |
|
14165
0f09ac2220f4
[gaim-migrate @ 16734]
Mark Doliner <markdoliner@pidgin.im>
parents:
14152
diff
changeset
|
286 | * Cancel an in-progress connection attempt. This should be called |
|
0f09ac2220f4
[gaim-migrate @ 16734]
Mark Doliner <markdoliner@pidgin.im>
parents:
14152
diff
changeset
|
287 | * by the PRPL if the user disables an account while it is still |
|
0f09ac2220f4
[gaim-migrate @ 16734]
Mark Doliner <markdoliner@pidgin.im>
parents:
14152
diff
changeset
|
288 | * performing the initial sign on. Or when establishing a file |
|
0f09ac2220f4
[gaim-migrate @ 16734]
Mark Doliner <markdoliner@pidgin.im>
parents:
14152
diff
changeset
|
289 | * transfer, if we attempt to connect to a remote user but they |
|
0f09ac2220f4
[gaim-migrate @ 16734]
Mark Doliner <markdoliner@pidgin.im>
parents:
14152
diff
changeset
|
290 | * are behind a firewall then the PRPL can cancel the connection |
|
0f09ac2220f4
[gaim-migrate @ 16734]
Mark Doliner <markdoliner@pidgin.im>
parents:
14152
diff
changeset
|
291 | * attempt early rather than just letting the OS's TCP/IP stack |
|
0f09ac2220f4
[gaim-migrate @ 16734]
Mark Doliner <markdoliner@pidgin.im>
parents:
14152
diff
changeset
|
292 | * time-out the connection. |
|
0f09ac2220f4
[gaim-migrate @ 16734]
Mark Doliner <markdoliner@pidgin.im>
parents:
14152
diff
changeset
|
293 | */ |
| 15884 | 294 | void purple_proxy_connect_cancel(PurpleProxyConnectData *connect_data); |
|
14165
0f09ac2220f4
[gaim-migrate @ 16734]
Mark Doliner <markdoliner@pidgin.im>
parents:
14152
diff
changeset
|
295 | |
|
14899
c65f0b4fb351
[gaim-migrate @ 17606]
Mark Doliner <markdoliner@pidgin.im>
parents:
14324
diff
changeset
|
296 | /* |
|
c65f0b4fb351
[gaim-migrate @ 17606]
Mark Doliner <markdoliner@pidgin.im>
parents:
14324
diff
changeset
|
297 | * Closes all proxy connections registered with the specified handle. |
|
c65f0b4fb351
[gaim-migrate @ 17606]
Mark Doliner <markdoliner@pidgin.im>
parents:
14324
diff
changeset
|
298 | * |
|
c65f0b4fb351
[gaim-migrate @ 17606]
Mark Doliner <markdoliner@pidgin.im>
parents:
14324
diff
changeset
|
299 | * @param handle The handle. |
|
c65f0b4fb351
[gaim-migrate @ 17606]
Mark Doliner <markdoliner@pidgin.im>
parents:
14324
diff
changeset
|
300 | */ |
| 15884 | 301 | void purple_proxy_connect_cancel_with_handle(void *handle); |
|
14899
c65f0b4fb351
[gaim-migrate @ 17606]
Mark Doliner <markdoliner@pidgin.im>
parents:
14324
diff
changeset
|
302 | |
|
5681
514fbc5374dc
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5572
diff
changeset
|
303 | /*@}*/ |
|
514fbc5374dc
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5572
diff
changeset
|
304 | |
|
5944
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
305 | #ifdef __cplusplus |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
306 | } |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
307 | #endif |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
308 | |
| 15884 | 309 | #endif /* _PURPLE_PROXY_H_ */ |