comparison libgaim/protocols/qq/qq_proxy.h @ 14195:902c3aa4950a

[gaim-migrate @ 16867] Revamped the QQ proxy code. Fixed an infinite loop that was occurring if we hit qq_input_pending() with an unexpected value of cond. Rewrote part of qq_proxy.c so that we use Gaim's non-blocking dns lookups. Quieted some warnings created by new code in proxy.c and passed appropriate error messages to _qq_got_login(). Added some extra error handling to qq_proxy_write(). I was beginning to do major clean-up on this this code when I realized that once that clean-up is done, I will have duplicated a very large amount of code from proxy.c. Therefore, I am submitting this working code now and will later submit a patch to gaim-devel that will add support for UDP proxying in proxy.c, thus eliminating the need for such code in the individual prpls. committer: Tailor Script <tailor@pidgin.im>
author Mark Huetsch <markhuetsch>
date Sat, 19 Aug 2006 02:32:55 +0000
parents 60b1bc8dbf37
children c039c920e11c
comparison
equal deleted inserted replaced
14194:ebe83aee29d2 14195:902c3aa4950a
23 23
24 #ifndef _QQ_PROXY_H 24 #ifndef _QQ_PROXY_H
25 #define _QQ_PROXY_H 25 #define _QQ_PROXY_H
26 26
27 #include <glib.h> 27 #include <glib.h>
28 #include "dnsquery.h"
28 #include "proxy.h" 29 #include "proxy.h"
30
29 #include "qq.h" 31 #include "qq.h"
30 32
31 #define QQ_CONNECT_STEPS 2 /* steps in connection */ 33 #define QQ_CONNECT_STEPS 2 /* steps in connection */
32 34
33 struct PHB { 35 struct PHB {
46 gint qq_proxy_write(qq_data *qd, guint8 *data, gint len); 48 gint qq_proxy_write(qq_data *qd, guint8 *data, gint len);
47 49
48 gint qq_connect(GaimAccount *account, const gchar *host, guint16 port, gboolean use_tcp, gboolean is_redirect); 50 gint qq_connect(GaimAccount *account, const gchar *host, guint16 port, gboolean use_tcp, gboolean is_redirect);
49 void qq_disconnect(GaimConnection *gc); 51 void qq_disconnect(GaimConnection *gc);
50 52
51 gint _qq_fill_host(struct sockaddr_in *addr, const gchar *host, guint16 port);
52
53 void _qq_show_packet(const gchar *desc, const guint8 *buf, gint len); 53 void _qq_show_packet(const gchar *desc, const guint8 *buf, gint len);
54 54
55 #endif 55 #endif