libpurple/protocols/qq/qq.h

changeset 24019
c0801ae3c886
parent 24018
91f0294f2377
child 24020
fe90d74977b6
--- a/libpurple/protocols/qq/qq.h	Sun Aug 10 04:32:14 2008 +0000
+++ b/libpurple/protocols/qq/qq.h	Mon Sep 15 02:59:23 2008 +0000
@@ -68,45 +68,46 @@
 	guint16 timeRemainder;
 	time_t signon;
 	time_t idle;
-	time_t last_refresh;
+	time_t last_update;
 
 	gint8  role;		/* role in group, used only in group->members list */
 };
 
+typedef struct _qq_connection qq_connection;
+struct _qq_connection {
+	int fd;				/* socket file handler */
+	int input_handler;
+
+	/* tcp related */
+	int can_write_handler; 	/* use in tcp_send_out */
+	PurpleCircBuffer *tcp_txbuf;
+	guint8 *tcp_rxqueue;
+	int tcp_rxlen;
+};
+
 struct _qq_data {
 	PurpleConnection *gc;
 
-	/* common network resource */
+	GSList *openconns;
+	gboolean use_tcp;		/* network in tcp or udp */
+	PurpleProxyConnectData *conn_data;
+	gint fd;							/* socket file handler */
+
 	GList *servers;
-	gchar *user_server;
-	gint user_port;
-	gboolean use_tcp;		/* network in tcp or udp */
+	gchar *curr_server;		/* point to servers->data, do not free*/
 	
-	gchar *server_name;
-	gboolean is_redirect;
-	gchar *real_hostname;	/* from real connction */
-	guint16 real_port;
-	guint reconnect_timeout;
-	gint reconnect_times;
-
-	PurpleProxyConnectData *connect_data;
-	gint fd;				/* socket file handler */
-	gint tx_handler; 	/* socket can_write handle, use in udp connecting and tcp send out */
+	struct in_addr redirect_ip;
+	guint16 redirect_port;
+	guint check_watcher;
+	guint connect_watcher;
+	gint connect_retry;
 
 	qq_interval itv_config;
 	qq_interval itv_count;
-	guint network_timeout;
+	guint network_watcher;
 	
 	GList *transactions;	/* check ack packet and resend */
 
-	/* tcp related */
-	PurpleCircBuffer *tcp_txbuf;
-	guint8 *tcp_rxqueue;
-	int tcp_rxlen;
-	
-	/* udp related */
-	PurpleDnsQueryData *udp_query_data;
-
 	guint32 uid;			/* QQ number */
 	guint8 *token;		/* get from server*/
 	int token_len;
@@ -117,7 +118,8 @@
 
 	guint16 send_seq;		/* send sequence number */
 	guint8 login_mode;		/* online of invisible */
-	gboolean logged_in;		/* used by qq-add_buddy */
+	gboolean is_login;		/* used by qq-add_buddy */
+	gboolean is_finish_update;
 
 	PurpleXfer *xfer;			/* file transfer handler */
 
@@ -148,6 +150,9 @@
 	/* TODO pass qq_send_packet_get_info() a callback and use signals to get rid of these */
 	gboolean modifying_info;
 	gboolean modifying_face;
+
+	gboolean is_show_notice;
+	gboolean is_show_news;
 };
 
 #endif

mercurial