Mercurial > pidgin
comparison libpurple/util.h @ 26969:f303787f144d
Add yet another URL fetching function. This one takes an account as a
parameter. It's needed because the Yahoo 16 code uses URL fetching as part
of its login process, and without giving the account to purple_proxy_connect
(which wass called in purple_util_fetch_url_request_len), we ignore account-
specific proxy configurations. This is a bad thing, as evidenced by Adium's
ticket 12231. In adding this function, I deprecated
purple_util_fetch_url_request_len and made it a shell that calls this new
function with a NULL account parameter. This maintains the previous behavior
without a mountain of duplicated code.
author | John Bailey <rekkanoryo@rekkanoryo.org> |
---|---|
date | Sat, 30 May 2009 00:07:50 +0000 |
parents | ab31daf1c1ee |
children | e5d7c957ed53 |
comparison
equal
deleted
inserted
replaced
26968:fd7dc5cc0310 | 26969:f303787f144d |
---|---|
1104 * @param include_headers | 1104 * @param include_headers |
1105 * If TRUE, include the HTTP headers in the response. | 1105 * If TRUE, include the HTTP headers in the response. |
1106 * @param max_len The maximum number of bytes to retrieve (-1 for unlimited) | 1106 * @param max_len The maximum number of bytes to retrieve (-1 for unlimited) |
1107 * @param callback The callback function. | 1107 * @param callback The callback function. |
1108 * @param data The user data to pass to the callback function. | 1108 * @param data The user data to pass to the callback function. |
1109 * @deprecated In 3.0.0, we'll rename this to "purple_util_fetch_url_request" and get rid of the old one | 1109 * @deprecated In 3.0.0, this will go away. |
1110 */ | 1110 */ |
1111 PurpleUtilFetchUrlData *purple_util_fetch_url_request_len(const gchar *url, | 1111 PurpleUtilFetchUrlData *purple_util_fetch_url_request_len(const gchar *url, |
1112 gboolean full, const gchar *user_agent, gboolean http11, | 1112 gboolean full, const gchar *user_agent, gboolean http11, |
1113 const gchar *request, gboolean include_headers, gssize max_len, | 1113 const gchar *request, gboolean include_headers, gssize max_len, |
1114 PurpleUtilFetchUrlCallback callback, gpointer data); | 1114 PurpleUtilFetchUrlCallback callback, gpointer data); |
1115 | 1115 |
1116 /** | 1116 /** |
1117 * Fetches the data from a URL, and passes it to a callback function. | |
1118 * | |
1119 * @param account The account for which the request is needed, or NULL. | |
1120 * @param url The URL. | |
1121 * @param full TRUE if this is the full URL, or FALSE if it's a | |
1122 * partial URL. | |
1123 * @param user_agent The user agent field to use, or NULL. | |
1124 * @param http11 TRUE if HTTP/1.1 should be used to download the file. | |
1125 * @param request A HTTP request to send to the server instead of the | |
1126 * standard GET | |
1127 * @param include_headers | |
1128 * If TRUE, include the HTTP headers in the response. | |
1129 * @param max_len The maximum number of bytes to retrieve (-1 for unlimited) | |
1130 * @param callback The callback function. | |
1131 * @param data The user data to pass to the callback function. | |
1132 * @deprecated In 3.0.0, we'll rename this to "purple_util_fetch_url_request" and get rid of the old one | |
1133 */ | |
1134 PurpleUtilFetchUrlData *purple_util_fetch_url_request_len_with_account( | |
1135 PurpleAccount *account, const gchar *url, | |
1136 gboolean full, const gchar *user_agent, gboolean http11, | |
1137 const gchar *request, gboolean include_headers, gssize max_len, | |
1138 PurpleUtilFetchUrlCallback callback, gpointer data); | |
1139 | |
1140 /** | |
1117 * Cancel a pending URL request started with either | 1141 * Cancel a pending URL request started with either |
1118 * purple_util_fetch_url_request() or purple_util_fetch_url(). | 1142 * purple_util_fetch_url_request() or purple_util_fetch_url(). |
1119 * | 1143 * |
1120 * @param url_data The data returned when you initiated the URL fetch. | 1144 * @param url_data The data returned when you initiated the URL fetch. |
1121 */ | 1145 */ |