Mercurial > pidgin
diff 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 |
line wrap: on
line diff
--- a/libpurple/util.h Fri May 29 20:56:46 2009 +0000 +++ b/libpurple/util.h Sat May 30 00:07:50 2009 +0000 @@ -1106,9 +1106,33 @@ * @param max_len The maximum number of bytes to retrieve (-1 for unlimited) * @param callback The callback function. * @param data The user data to pass to the callback function. + * @deprecated In 3.0.0, this will go away. + */ +PurpleUtilFetchUrlData *purple_util_fetch_url_request_len(const gchar *url, + gboolean full, const gchar *user_agent, gboolean http11, + const gchar *request, gboolean include_headers, gssize max_len, + PurpleUtilFetchUrlCallback callback, gpointer data); + +/** + * Fetches the data from a URL, and passes it to a callback function. + * + * @param account The account for which the request is needed, or NULL. + * @param url The URL. + * @param full TRUE if this is the full URL, or FALSE if it's a + * partial URL. + * @param user_agent The user agent field to use, or NULL. + * @param http11 TRUE if HTTP/1.1 should be used to download the file. + * @param request A HTTP request to send to the server instead of the + * standard GET + * @param include_headers + * If TRUE, include the HTTP headers in the response. + * @param max_len The maximum number of bytes to retrieve (-1 for unlimited) + * @param callback The callback function. + * @param data The user data to pass to the callback function. * @deprecated In 3.0.0, we'll rename this to "purple_util_fetch_url_request" and get rid of the old one */ -PurpleUtilFetchUrlData *purple_util_fetch_url_request_len(const gchar *url, +PurpleUtilFetchUrlData *purple_util_fetch_url_request_len_with_account( + PurpleAccount *account, const gchar *url, gboolean full, const gchar *user_agent, gboolean http11, const gchar *request, gboolean include_headers, gssize max_len, PurpleUtilFetchUrlCallback callback, gpointer data);