libpurple/protocols/qq/qq.h

changeset 23950
a974649cdb89
parent 23193
384ba35bfa8f
child 24018
91f0294f2377
--- a/libpurple/protocols/qq/qq.h	Sat Aug 02 02:40:46 2008 +0000
+++ b/libpurple/protocols/qq/qq.h	Sat Aug 02 15:00:46 2008 +0000
@@ -34,7 +34,6 @@
 #include "proxy.h"
 #include "roomlist.h"
 
-#define QQ_FACES	    100
 #define QQ_KEY_LENGTH       16
 #define QQ_DEBUG            1	/* whether we are doing DEBUG */
 
@@ -45,6 +44,13 @@
 
 typedef struct _qq_data qq_data;
 typedef struct _qq_buddy qq_buddy;
+typedef struct _qq_interval qq_interval;
+
+struct _qq_interval {
+	gint resend;
+	gint keep_alive;
+	gint update; 
+};
 
 struct _qq_buddy {
 	guint32 uid;
@@ -52,10 +58,10 @@
 	guint8 age;
 	guint8 gender;
 	gchar *nickname;
-	guint8 ip[4];
+	struct in_addr ip;
 	guint16 port;
 	guint8 status;
-	guint8 flag1;
+	guint8 ext_flag;
 	guint8 comm_flag;	/* details in qq_buddy_list.c */
 	guint16 client_version;
 	guint8 onlineTime;
@@ -88,12 +94,12 @@
 	gint fd;				/* socket file handler */
 	gint tx_handler; 	/* socket can_write handle, use in udp connecting and tcp send out */
 
-	GList *send_trans;	/* check ack packet and resend */
-	guint resend_timeout;
+	qq_interval itv_config;
+	qq_interval itv_count;
+	guint network_timeout;
+	
+	GList *transactions;	/* check ack packet and resend */
 
-	guint8 rcv_window[1 << 13];		/* windows for check duplicate packet */
-	GQueue *rcv_trans;		/* queue to store packet can not process before login */
-	
 	/* tcp related */
 	PurpleCircBuffer *tcp_txbuf;
 	guint8 *tcp_rxqueue;
@@ -103,10 +109,12 @@
 	PurpleDnsQueryData *udp_query_data;
 
 	guint32 uid;			/* QQ number */
-	guint8 *inikey;			/* initial key to encrypt login packet */
-	guint8 *pwkey;			/* password in md5 (or md5' md5) */
-	guint8 *session_key;		/* later use this as key in this session */
-	guint8 *session_md5;		/* concatenate my uid with session_key and md5 it */
+	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) */
+	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 */
 
 	guint16 send_seq;		/* send sequence number */
 	guint8 login_mode;		/* online of invisible */
@@ -119,11 +127,11 @@
 	time_t last_login_time;
 	gchar *last_login_ip;
 	/* get from keep_alive packet */
-	gchar *my_ip;			/* my ip address detected by server */
+	struct in_addr my_ip;			/* my ip address detected by server */
 	guint16 my_port;		/* my port detected by server */
 	guint16 my_icon;		/* my icon index */
 	guint16 my_level;		/* my level */
-	guint32 all_online;		/* the number of online QQ users */
+	guint32 total_online;		/* the number of online QQ users */
 	time_t last_get_online;		/* last time send get_friends_online packet */
 
 	PurpleRoomlist *roomlist;

mercurial