Mercurial > pidgin
diff src/proxy.h @ 14108:7a205b430d19
[gaim-migrate @ 16742]
Removing the "error_cb" parameter for gaim_proxy_connect(), changing it
back to how it was. As I started making changes to oscar to support
canceling connection attempts, I realized that having a separate callback
for errors would result in more code duplication than was needed.
Originally I thought the separate callback would make things cleaner.
Anyway, sorry for the noise.
committer: Tailor Script <tailor@pidgin.im>
| author | Mark Doliner <mark@kingant.net> |
|---|---|
| date | Mon, 14 Aug 2006 04:43:38 +0000 |
| parents | eec0c7fd8529 |
| children | c3167a1dd817 |
line wrap: on
line diff
--- a/src/proxy.h Mon Aug 14 02:16:58 2006 +0000 +++ b/src/proxy.h Mon Aug 14 04:43:38 2006 +0000 @@ -58,8 +58,7 @@ typedef struct _GaimProxyConnectInfo GaimProxyConnectInfo; -typedef void (*GaimProxyConnectFunction)(gpointer data, gint source); -typedef void (*GaimProxyErrorFunction)(gpointer dat, const gchar *error_message); +typedef void (*GaimProxyConnectFunction)(gpointer data, gint source, const gchar *error_message); /** * The "hosts" parameter is a linked list containing pairs of @@ -235,9 +234,9 @@ * @param host The destination host. * @param port The destination port. * @param connect_cb The function to call when the connection is - * established. - * @param error_cb The function to call if there is an error while - * establishing the connection. + * established. If the connection failed then + * fd will be -1 and error message will be set + * to something descriptive (hopefully). * @param data User-defined data. * * @return NULL if there was an error, or a reference to a data @@ -246,8 +245,7 @@ */ GaimProxyConnectInfo *gaim_proxy_connect(GaimAccount *account, const char *host, int port, - GaimProxyConnectFunction connect_cb, - GaimProxyErrorFunction error_cb, gpointer data); + GaimProxyConnectFunction connect_cb, gpointer data); /** * Makes a connection through a SOCKS5 proxy. @@ -256,9 +254,9 @@ * @param host The destination host. * @param port The destination port. * @param connect_cb The function to call when the connection is - * established. - * @param error_cb The function to call if there is an error while - * establishing the connection. + * established. If the connection failed then + * fd will be -1 and error message will be set + * to something descriptive (hopefully). * @param data User-defined data. * * @return NULL if there was an error, or a reference to a data @@ -267,8 +265,7 @@ */ GaimProxyConnectInfo *gaim_proxy_connect_socks5(GaimProxyInfo *gpi, const char *host, int port, - GaimProxyConnectFunction connect_cb, - GaimProxyErrorFunction error_cb, gpointer data); + GaimProxyConnectFunction connect_cb, gpointer data); /** * Cancel an in-progress connection attempt. This should be called
