diff libpurple/protocols/qq/qq.h @ 24134:bdfcfd71449c

patch 20080922 from ccpaging <ccpaging(at)gmail.com>
author SHiNE CsyFeK <csyfek@gmail.com>
date Wed, 22 Oct 2008 14:33:20 +0000
parents d57928c9dd8f
children dbc7a9742f8d
line wrap: on
line diff
--- a/libpurple/protocols/qq/qq.h	Wed Oct 22 14:28:17 2008 +0000
+++ b/libpurple/protocols/qq/qq.h	Wed Oct 22 14:33:20 2008 +0000
@@ -41,6 +41,35 @@
 typedef struct _qq_interval qq_interval;
 typedef struct _qq_net_stat qq_net_stat;
 typedef struct _qq_add_request qq_add_request;
+typedef struct _qq_redirect_data qq_redirect_data;
+typedef struct _qq_login_data qq_login_data;
+typedef struct _qq_captcha_data qq_captcha_data;
+
+struct _qq_captcha_data {
+	guint8 *token;
+	guint16 token_len;
+	guint8 next_index;
+	guint8 *data;
+	guint16 data_len;
+};
+
+struct _qq_login_data {
+	guint8 init_key[QQ_KEY_LENGTH];			/* first encrypt key generated by client */
+	guint8 *token;		/* get from server*/
+	guint8 token_len;
+	guint8 *token_ex;		/* get from server*/
+	guint16 token_ex_len;
+	guint8 captcha_key[QQ_KEY_LENGTH];	/* encrypt key used in captcha generated by client */
+	guint8 pwd_twice_md5[QQ_KEY_LENGTH];			/* password in md5 (or md5' md5) */
+};
+
+struct _qq_redirect_data {
+	guint16 ret;
+	guint8 b1;
+	guint32 w1;
+	guint32 w2;
+	guint32 ip;
+};
 
 struct _qq_add_request {
 	guint32 uid;
@@ -111,8 +140,13 @@
 	GList *servers;
 	gchar *curr_server;		/* point to servers->data, do not free*/
 
+	guint16 client_version;
+	gboolean is_above_2007;
+
 	struct in_addr redirect_ip;
 	guint16 redirect_port;
+	qq_redirect_data redirect_data;
+
 	guint check_watcher;
 	guint connect_watcher;
 	gint connect_retry;
@@ -125,10 +159,10 @@
 	GList *transactions;	/* check ack packet and resend */
 
 	guint32 uid;			/* QQ number */
-	guint8 *token;		/* get from server*/
-	int token_len;
-	guint8 inikey[QQ_KEY_LENGTH];			/* initial key to encrypt login packet */
-	guint8 password_twice_md5[QQ_KEY_LENGTH];			/* password in md5 (or md5' md5) */
+	
+	qq_login_data ld;
+	qq_captcha_data captcha;
+	
 	guint8 session_key[QQ_KEY_LENGTH];		/* later use this as key in this session */
 	guint8 session_md5[QQ_KEY_LENGTH];		/* concatenate my uid with session_key and md5 it */
 
@@ -147,8 +181,8 @@
 	guint16 my_port;		/* my port detected by server */
 	guint16 my_icon;		/* my icon index */
 	guint16 my_level;		/* my level */
-	guint32 total_online;		/* the number of online QQ users */
-	time_t last_get_online;		/* last time send get_friends_online packet */
+	guint32 online_total;		/* the number of online QQ users */
+	time_t online_last_update;		/* last time send get_friends_online packet */
 
 	PurpleRoomlist *roomlist;
 	gint channel;			/* the id for opened chat conversation */