changeset 24133:a3cd7c3d9da1

2008.10.03 - Flos Loniceare<lonicerae(at)gmail.com> * Rename header_info.c/header_info.h to qq_define.c/qq_define.h
author SHiNE CsyFeK <csyfek@gmail.com>
date Wed, 22 Oct 2008 14:28:17 +0000
parents 11de3fd58c59
children bdfcfd71449c
files libpurple/protocols/qq/header_info.c libpurple/protocols/qq/header_info.h libpurple/protocols/qq/qq_define.c libpurple/protocols/qq/qq_define.h
diffstat 4 files changed, 345 insertions(+), 345 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/qq/header_info.c	Fri Sep 19 14:48:00 2008 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,236 +0,0 @@
-/**
- * @file header_info.c
- *
- * purple
- *
- * Purple is the legal property of its developers, whose names are too numerous
- * to list here.  Please refer to the COPYRIGHT file distributed with this
- * source distribution.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02111-1301  USA
- */
-
-#include "internal.h"
-
-#include "header_info.h"
-
-#define QQ_CLIENT_062E 0x062e	/* GB QQ2000c build 0630 */
-#define QQ_CLIENT_072E 0x072e	/* EN QQ2000c build 0305 */
-#define QQ_CLIENT_0801 0x0801	/* EN QQ2000c build 0630 */
-#define QQ_CLIENT_0A1D 0x0a1d	/* GB QQ2003c build 0808 */
-#define QQ_CLIENT_0B07 0x0b07	/* GB QQ2003c build 0925 */
-#define QQ_CLIENT_0B2F 0x0b2f	/* GB QQ2003iii build 0117 */
-#define QQ_CLIENT_0B35 0x0b35	/* GB QQ2003iii build 0304 (offical release) */
-#define QQ_CLIENT_0B37 0x0b37	/* GB QQ2003iii build 0304 (April 05 updates) */
-#define QQ_CLIENT_0E1B 0x0e1b	/* QQ2005 ? */
-#define QQ_CLIENT_0E35 0x0e35	/* EN QQ2005 V05.0.200.020 */
-#define QQ_CLIENT_0F15 0x0f15	/* QQ2006 Spring Festival build */
-#define QQ_CLIENT_0F5F 0x0f5f	/* QQ2006 final build */
-
-#define QQ_CLIENT_0C0B 0x0C0B	/* QQ2004 */
-#define QQ_CLIENT_0C0D 0x0C0D	/* QQ2004 preview*/
-#define QQ_CLIENT_0C21 0x0C21	/* QQ2004 */
-#define QQ_CLIENT_0C49 0x0C49	/* QQ2004II */
-#define QQ_CLIENT_0D05 0x0D05	/* QQ2005 beta1 */
-#define QQ_CLIENT_0D51 0x0D51	/* QQ2005 beta2 */
-#define QQ_CLIENT_0D61 0x0D61	/* QQ2005 */
-#define QQ_CLIENT_05A5 0x05A5	/* ? */
-#define QQ_CLIENT_05F1 0x0F15	/* QQ2006 Spring Festival */
-#define QQ_CLIENT_0F4B 0x0F4B	/* QQ2006 Beta 3  */
-
-#define QQ_CLIENT_1105 0x1105	/* QQ2007 beta4*/
-#define QQ_CLIENT_111D 0x111D	/* QQ2007 */
-#define QQ_CLIENT_115B 0x115B	/* QQ2008 */
-#define QQ_CLIENT_1203 0x1203	/* QQ2008 */
-#define QQ_CLIENT_1205 0x1205	/* QQ2008 */
-#define QQ_CLIENT_120B 0x120B	/* QQ2008 July 8.0.978.400 */
-#define QQ_CLIENT_1412 0x1412	/* QQMac 1.0 preview1 build 670 */
-#define QQ_CLIENT_1441 0x1441	/* QQ2009 preview2 */
-
-#define QQ_SERVER_0100 0x0100	/* server */
-
-
-/* given source tag, return its description accordingly */
-const gchar *qq_get_ver_desc(gint source)
-{
-	switch (source) {
-	case QQ_CLIENT_062E:
-		return "GB QQ2000c build 0630";
-	case QQ_CLIENT_072E:
-		return "En QQ2000c build 0305";
-	case QQ_CLIENT_0801:
-		return "En QQ2000c build 0630";
-	case QQ_CLIENT_0A1D:
-		return "GB QQ2003ii build 0808";
-	case QQ_CLIENT_0B07:
-		return "GB QQ2003ii build 0925";
-	case QQ_CLIENT_0B2F:
-		return "GB QQ2003iii build 0117";
-	case QQ_CLIENT_0B35:
-		return "GB QQ2003iii build 0304";
-	case QQ_CLIENT_0B37:
-		return "GB QQ2003iii build 0304 (April 5 update)";
-	case QQ_CLIENT_0C0B:
-		return "QQ2004";
-	case QQ_CLIENT_0C0D:
-		return "QQ2004 preview";
-	case QQ_CLIENT_0C21:
-		return "QQ2004";
-	case QQ_CLIENT_0C49:
-		return "QQ2004II";
-	case QQ_CLIENT_0D05:
-		return "QQ2005 beta1";
-	case QQ_CLIENT_0D51:
-		return "QQ2005 beta2";
-	case QQ_CLIENT_0D61:
-		return "QQ2005";
-	case QQ_CLIENT_0E1B:
-		return "QQ2005 or QQ2006";
-	case QQ_CLIENT_0E35:
-		return "En QQ2005 V05.0.200.020";
-	case QQ_CLIENT_0F15:
-		return "QQ2006 Spring Festival";
-	case QQ_CLIENT_0F4B:
-		return "QQ2006 beta3";
-	case QQ_CLIENT_0F5F:
-		return "QQ2006 final build";
-	case QQ_CLIENT_1105:
-		return "QQ2007 beta4";
-	case QQ_CLIENT_111D:
-		return "QQ2007";
-	case QQ_CLIENT_115B:
-	case QQ_CLIENT_1203:
-	case QQ_CLIENT_1205:
-	case QQ_CLIENT_120B:
-		return "QQ2008";
-	case QQ_CLIENT_1412:
-		return "QQMac 1.0 preview1 build 670";
-	case QQ_CLIENT_1441:
-		return "QQ2009 preview2";
-	case QQ_SERVER_0100:
-		return "QQ Server 0100";
-	default:
-		return "Unknown Version";
-	}
-}
-
-/* given command alias, return the command name accordingly */
-const gchar *qq_get_cmd_desc(gint cmd)
-{
-	switch (cmd) {
-	case QQ_CMD_LOGOUT:
-		return "QQ_CMD_LOGOUT";
-	case QQ_CMD_KEEP_ALIVE:
-		return "QQ_CMD_KEEP_ALIVE";
-	case QQ_CMD_UPDATE_INFO:
-		return "QQ_CMD_UPDATE_INFO";
-	case QQ_CMD_SEARCH_USER:
-		return "QQ_CMD_SEARCH_USER";
-	case QQ_CMD_GET_BUDDY_INFO:
-		return "QQ_CMD_GET_BUDDY_INFO";
-	case QQ_CMD_BUDDY_ADD_NO_AUTH:
-		return "QQ_CMD_BUDDY_ADD_NO_AUTH";
-	case QQ_CMD_BUDDY_REMOVE:
-		return "QQ_CMD_BUDDY_REMOVE";
-	case QQ_CMD_BUDDY_ADD_AUTH:
-		return "QQ_CMD_BUDDY_ADD_AUTH";
-	case QQ_CMD_CHANGE_STATUS:
-		return "QQ_CMD_CHANGE_STATUS";
-	case QQ_CMD_ACK_SYS_MSG:
-		return "QQ_CMD_ACK_SYS_MSG";
-	case QQ_CMD_SEND_IM:
-		return "QQ_CMD_SEND_IM";
-	case QQ_CMD_RECV_IM:
-		return "QQ_CMD_RECV_IM";
-	case QQ_CMD_REMOVE_ME:
-		return "QQ_CMD_REMOVE_ME";
-	case QQ_CMD_LOGIN:
-		return "QQ_CMD_LOGIN";
-	case QQ_CMD_GET_BUDDIES_LIST:
-		return "QQ_CMD_GET_BUDDIES_LIST";
-	case QQ_CMD_GET_BUDDIES_ONLINE:
-		return "QQ_CMD_GET_BUDDIES_ONLINE";
-	case QQ_CMD_ROOM:
-		return "QQ_CMD_ROOM";
-	case QQ_CMD_GET_BUDDIES_AND_ROOMS:
-		return "QQ_CMD_GET_BUDDIES_AND_ROOMS";
-	case QQ_CMD_GET_LEVEL:
-		return "QQ_CMD_GET_LEVEL";
-	case QQ_CMD_TOKEN:
-		return "QQ_CMD_TOKEN";
-	case QQ_CMD_RECV_MSG_SYS:
-		return "QQ_CMD_RECV_MSG_SYS";
-	case QQ_CMD_BUDDY_CHANGE_STATUS:
-		return "QQ_CMD_BUDDY_CHANGE_STATUS";
-	default:
-		return "Unknown CMD";
-	}
-}
-
-const gchar *qq_get_room_cmd_desc(gint room_cmd)
-{
-	switch (room_cmd) {
-	case QQ_ROOM_CMD_CREATE:
-		return "QQ_ROOM_CMD_CREATE";
-	case QQ_ROOM_CMD_MEMBER_OPT:
-		return "QQ_ROOM_CMD_MEMBER_OPT";
-	case QQ_ROOM_CMD_CHANGE_INFO:
-		return "QQ_ROOM_CMD_CHANGE_INFO";
-	case QQ_ROOM_CMD_GET_INFO:
-		return "QQ_ROOM_CMD_GET_INFO";
-	case QQ_ROOM_CMD_ACTIVATE:
-		return "QQ_ROOM_CMD_ACTIVATE";
-	case QQ_ROOM_CMD_SEARCH:
-		return "QQ_ROOM_CMD_SEARCH";
-	case QQ_ROOM_CMD_JOIN:
-		return "QQ_ROOM_CMD_JOIN";
-	case QQ_ROOM_CMD_AUTH:
-		return "QQ_ROOM_CMD_AUTH";
-	case QQ_ROOM_CMD_QUIT:
-		return "QQ_ROOM_CMD_QUIT";
-	case QQ_ROOM_CMD_SEND_MSG:
-		return "QQ_ROOM_CMD_SEND_MSG";
-	case QQ_ROOM_CMD_GET_ONLINES:
-		return "QQ_ROOM_CMD_GET_ONLINES";
-	case QQ_ROOM_CMD_GET_BUDDIES:
-		return "QQ_ROOM_CMD_GET_BUDDIES";
-	case QQ_ROOM_CMD_CHANGE_CARD:
-		return "QQ_ROOM_CMD_CHANGE_CARD";
-	case QQ_ROOM_CMD_GET_REALNAMES:
-		return "QQ_ROOM_CMD_GET_REALNAMES";
-	case QQ_ROOM_CMD_GET_CARD:
-		return "QQ_ROOM_CMD_GET_CARD";
-	case QQ_ROOM_CMD_SEND_IM_EX:
-		return "QQ_ROOM_CMD_SEND_IM_EX";
-	case QQ_ROOM_CMD_ADMIN:
-		return "QQ_ROOM_CMD_ADMIN";
-	case QQ_ROOM_CMD_TRANSFER:
-		return "QQ_ROOM_CMD_TRANSFER";
-	case QQ_ROOM_CMD_TEMP_CREATE:
-		return "QQ_ROOM_CMD_TEMP_CREATE";
-	case QQ_ROOM_CMD_TEMP_CHANGE_MEMBER:
-		return "QQ_ROOM_CMD_TEMP_CHANGE_MEMBER";
-	case QQ_ROOM_CMD_TEMP_QUIT:
-		return "QQ_ROOM_CMD_TEMP_QUIT";
-	case QQ_ROOM_CMD_TEMP_GET_INFO:
-		return "QQ_ROOM_CMD_TEMP_GET_INFO";
-	case QQ_ROOM_CMD_TEMP_SEND_IM:
-		return "QQ_ROOM_CMD_TEMP_SEND_IM";
-	case QQ_ROOM_CMD_TEMP_GET_MEMBERS:
-		return "QQ_ROOM_CMD_TEMP_GET_MEMBERS";
-	default:
-		return "Unknown Room Command";
-	}
-}
--- a/libpurple/protocols/qq/header_info.h	Fri Sep 19 14:48:00 2008 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,109 +0,0 @@
-/**
- * @file header_info.h
- *
- * purple
- *
- * Purple is the legal property of its developers, whose names are too numerous
- * to list here.  Please refer to the COPYRIGHT file distributed with this
- * source distribution.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02111-1301  USA
- */
-
-#ifndef _QQ_HEADER_INFO_H_
-#define _QQ_HEADER_INFO_H_
-
-#include <glib.h>
-
-#define QQ_UDP_HEADER_LENGTH    7
-#define QQ_TCP_HEADER_LENGTH    9
-
-#define QQ_PACKET_TAG           0x02	/* all QQ text packets starts with it */
-#define QQ_PACKET_TAIL          0x03	/* all QQ text packets end with it */
-
-#define QQ_CLIENT       0x0d55
-
-const gchar *qq_get_ver_desc(gint source);
-
-/* list of known QQ commands */
-enum {
-	QQ_CMD_LOGOUT = 0x0001,				/* log out */
-	QQ_CMD_KEEP_ALIVE = 0x0002,			/* get onlines from tencent */
-	QQ_CMD_UPDATE_INFO = 0x0004,			/* update information */
-	QQ_CMD_SEARCH_USER = 0x0005,			/* search for user */
-	QQ_CMD_GET_BUDDY_INFO = 0x0006,			/* get user information */
-	QQ_CMD_BUDDY_ADD_NO_AUTH = 0x0009,		/* add buddy without auth */
-	QQ_CMD_BUDDY_REMOVE = 0x000a,			/* delete a buddy  */
-	QQ_CMD_BUDDY_ADD_AUTH = 0x000b,			/* buddy authentication */
-	QQ_CMD_CHANGE_STATUS = 0x000d,		/* change my online status */
-	QQ_CMD_ACK_SYS_MSG = 0x0012,			/* ack system message */
-	QQ_CMD_SEND_IM = 0x0016,			/* send message */
-	QQ_CMD_RECV_IM = 0x0017,			/* receive message */
-	QQ_CMD_REMOVE_ME = 0x001c,			/* remove self */
-	QQ_CMD_REQUEST_KEY = 0x001d,			/* request key for file transfer */
-	QQ_CMD_CELL_PHONE_1 = 0x0021,			/* cell phone 1 */
-	QQ_CMD_LOGIN = 0x0022,				/* login */
-	QQ_CMD_GET_BUDDIES_LIST = 0x0026,		/* get buddies list */
-	QQ_CMD_GET_BUDDIES_ONLINE = 0x0027,		/* get online buddies list */
-	QQ_CMD_CELL_PHONE_2 = 0x0029,			/* cell phone 2 */
-	QQ_CMD_ROOM = 0x0030,			/* room command */
-	QQ_CMD_GET_BUDDIES_AND_ROOMS = 0x0058,
-	QQ_CMD_GET_LEVEL = 0x005C,			/* get level for one or more buddies */
-	QQ_CMD_TOKEN  = 0x0062, 		/* get login token */
-	QQ_CMD_RECV_MSG_SYS = 0x0080,			/* receive a system message */
-	QQ_CMD_BUDDY_CHANGE_STATUS = 0x0081,	/* buddy change status */
-};
-
-const gchar *qq_get_cmd_desc(gint type);
-
-enum {
-	QQ_ROOM_CMD_CREATE = 0x01,
-	QQ_ROOM_CMD_MEMBER_OPT = 0x02,
-	QQ_ROOM_CMD_CHANGE_INFO = 0x03,
-	QQ_ROOM_CMD_GET_INFO = 0x04,
-	QQ_ROOM_CMD_ACTIVATE = 0x05,
-	QQ_ROOM_CMD_SEARCH = 0x06,
-	QQ_ROOM_CMD_JOIN = 0x07,
-	QQ_ROOM_CMD_AUTH = 0x08,
-	QQ_ROOM_CMD_QUIT = 0x09,
-	QQ_ROOM_CMD_SEND_MSG = 0x0a,
-	QQ_ROOM_CMD_GET_ONLINES = 0x0b,
-	QQ_ROOM_CMD_GET_BUDDIES = 0x0c,
-
-	QQ_ROOM_CMD_CHANGE_CARD = 0x0E,
-	QQ_ROOM_CMD_GET_REALNAMES = 0x0F,
-	QQ_ROOM_CMD_GET_CARD = 0x10,
-	QQ_ROOM_CMD_SEND_IM_EX = 0x1A,
-	QQ_ROOM_CMD_ADMIN = 0x1B,
-	QQ_ROOM_CMD_TRANSFER = 0x1C,
-	QQ_ROOM_CMD_TEMP_CREATE = 0x30,
-	QQ_ROOM_CMD_TEMP_CHANGE_MEMBER = 0x31,
-	QQ_ROOM_CMD_TEMP_QUIT = 0x32,
-	QQ_ROOM_CMD_TEMP_GET_INFO = 0x33,
-	QQ_ROOM_CMD_TEMP_SEND_IM = 0x35,
-	QQ_ROOM_CMD_TEMP_GET_MEMBERS = 0x37,
-};
-
-const gchar *qq_get_room_cmd_desc(gint room_cmd);
-
-enum {
-	QQ_SERVER_BUDDY_ADDED = 0x01,
-	QQ_SERVER_BUDDY_ADD_REQUEST = 0x02,
-	QQ_SERVER_BUDDY_ADDED_ME = 0x03,
-	QQ_SERVER_BUDDY_REJECTED_ME = 0x04,
-	QQ_SERVER_NOTICE= 0x06,
-	QQ_SERVER_NEW_CLIENT = 0x09
-};
-#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libpurple/protocols/qq/qq_define.c	Wed Oct 22 14:28:17 2008 +0000
@@ -0,0 +1,236 @@
+/**
+ * @file header_info.c
+ *
+ * purple
+ *
+ * Purple is the legal property of its developers, whose names are too numerous
+ * to list here.  Please refer to the COPYRIGHT file distributed with this
+ * source distribution.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02111-1301  USA
+ */
+
+#include "internal.h"
+
+#include "header_info.h"
+
+#define QQ_CLIENT_062E 0x062e	/* GB QQ2000c build 0630 */
+#define QQ_CLIENT_072E 0x072e	/* EN QQ2000c build 0305 */
+#define QQ_CLIENT_0801 0x0801	/* EN QQ2000c build 0630 */
+#define QQ_CLIENT_0A1D 0x0a1d	/* GB QQ2003c build 0808 */
+#define QQ_CLIENT_0B07 0x0b07	/* GB QQ2003c build 0925 */
+#define QQ_CLIENT_0B2F 0x0b2f	/* GB QQ2003iii build 0117 */
+#define QQ_CLIENT_0B35 0x0b35	/* GB QQ2003iii build 0304 (offical release) */
+#define QQ_CLIENT_0B37 0x0b37	/* GB QQ2003iii build 0304 (April 05 updates) */
+#define QQ_CLIENT_0E1B 0x0e1b	/* QQ2005 ? */
+#define QQ_CLIENT_0E35 0x0e35	/* EN QQ2005 V05.0.200.020 */
+#define QQ_CLIENT_0F15 0x0f15	/* QQ2006 Spring Festival build */
+#define QQ_CLIENT_0F5F 0x0f5f	/* QQ2006 final build */
+
+#define QQ_CLIENT_0C0B 0x0C0B	/* QQ2004 */
+#define QQ_CLIENT_0C0D 0x0C0D	/* QQ2004 preview*/
+#define QQ_CLIENT_0C21 0x0C21	/* QQ2004 */
+#define QQ_CLIENT_0C49 0x0C49	/* QQ2004II */
+#define QQ_CLIENT_0D05 0x0D05	/* QQ2005 beta1 */
+#define QQ_CLIENT_0D51 0x0D51	/* QQ2005 beta2 */
+#define QQ_CLIENT_0D61 0x0D61	/* QQ2005 */
+#define QQ_CLIENT_05A5 0x05A5	/* ? */
+#define QQ_CLIENT_05F1 0x0F15	/* QQ2006 Spring Festival */
+#define QQ_CLIENT_0F4B 0x0F4B	/* QQ2006 Beta 3  */
+
+#define QQ_CLIENT_1105 0x1105	/* QQ2007 beta4*/
+#define QQ_CLIENT_111D 0x111D	/* QQ2007 */
+#define QQ_CLIENT_115B 0x115B	/* QQ2008 */
+#define QQ_CLIENT_1203 0x1203	/* QQ2008 */
+#define QQ_CLIENT_1205 0x1205	/* QQ2008 */
+#define QQ_CLIENT_120B 0x120B	/* QQ2008 July 8.0.978.400 */
+#define QQ_CLIENT_1412 0x1412	/* QQMac 1.0 preview1 build 670 */
+#define QQ_CLIENT_1441 0x1441	/* QQ2009 preview2 */
+
+#define QQ_SERVER_0100 0x0100	/* server */
+
+
+/* given source tag, return its description accordingly */
+const gchar *qq_get_ver_desc(gint source)
+{
+	switch (source) {
+	case QQ_CLIENT_062E:
+		return "GB QQ2000c build 0630";
+	case QQ_CLIENT_072E:
+		return "En QQ2000c build 0305";
+	case QQ_CLIENT_0801:
+		return "En QQ2000c build 0630";
+	case QQ_CLIENT_0A1D:
+		return "GB QQ2003ii build 0808";
+	case QQ_CLIENT_0B07:
+		return "GB QQ2003ii build 0925";
+	case QQ_CLIENT_0B2F:
+		return "GB QQ2003iii build 0117";
+	case QQ_CLIENT_0B35:
+		return "GB QQ2003iii build 0304";
+	case QQ_CLIENT_0B37:
+		return "GB QQ2003iii build 0304 (April 5 update)";
+	case QQ_CLIENT_0C0B:
+		return "QQ2004";
+	case QQ_CLIENT_0C0D:
+		return "QQ2004 preview";
+	case QQ_CLIENT_0C21:
+		return "QQ2004";
+	case QQ_CLIENT_0C49:
+		return "QQ2004II";
+	case QQ_CLIENT_0D05:
+		return "QQ2005 beta1";
+	case QQ_CLIENT_0D51:
+		return "QQ2005 beta2";
+	case QQ_CLIENT_0D61:
+		return "QQ2005";
+	case QQ_CLIENT_0E1B:
+		return "QQ2005 or QQ2006";
+	case QQ_CLIENT_0E35:
+		return "En QQ2005 V05.0.200.020";
+	case QQ_CLIENT_0F15:
+		return "QQ2006 Spring Festival";
+	case QQ_CLIENT_0F4B:
+		return "QQ2006 beta3";
+	case QQ_CLIENT_0F5F:
+		return "QQ2006 final build";
+	case QQ_CLIENT_1105:
+		return "QQ2007 beta4";
+	case QQ_CLIENT_111D:
+		return "QQ2007";
+	case QQ_CLIENT_115B:
+	case QQ_CLIENT_1203:
+	case QQ_CLIENT_1205:
+	case QQ_CLIENT_120B:
+		return "QQ2008";
+	case QQ_CLIENT_1412:
+		return "QQMac 1.0 preview1 build 670";
+	case QQ_CLIENT_1441:
+		return "QQ2009 preview2";
+	case QQ_SERVER_0100:
+		return "QQ Server 0100";
+	default:
+		return "Unknown Version";
+	}
+}
+
+/* given command alias, return the command name accordingly */
+const gchar *qq_get_cmd_desc(gint cmd)
+{
+	switch (cmd) {
+	case QQ_CMD_LOGOUT:
+		return "QQ_CMD_LOGOUT";
+	case QQ_CMD_KEEP_ALIVE:
+		return "QQ_CMD_KEEP_ALIVE";
+	case QQ_CMD_UPDATE_INFO:
+		return "QQ_CMD_UPDATE_INFO";
+	case QQ_CMD_SEARCH_USER:
+		return "QQ_CMD_SEARCH_USER";
+	case QQ_CMD_GET_BUDDY_INFO:
+		return "QQ_CMD_GET_BUDDY_INFO";
+	case QQ_CMD_BUDDY_ADD_NO_AUTH:
+		return "QQ_CMD_BUDDY_ADD_NO_AUTH";
+	case QQ_CMD_BUDDY_REMOVE:
+		return "QQ_CMD_BUDDY_REMOVE";
+	case QQ_CMD_BUDDY_ADD_AUTH:
+		return "QQ_CMD_BUDDY_ADD_AUTH";
+	case QQ_CMD_CHANGE_STATUS:
+		return "QQ_CMD_CHANGE_STATUS";
+	case QQ_CMD_ACK_SYS_MSG:
+		return "QQ_CMD_ACK_SYS_MSG";
+	case QQ_CMD_SEND_IM:
+		return "QQ_CMD_SEND_IM";
+	case QQ_CMD_RECV_IM:
+		return "QQ_CMD_RECV_IM";
+	case QQ_CMD_REMOVE_ME:
+		return "QQ_CMD_REMOVE_ME";
+	case QQ_CMD_LOGIN:
+		return "QQ_CMD_LOGIN";
+	case QQ_CMD_GET_BUDDIES_LIST:
+		return "QQ_CMD_GET_BUDDIES_LIST";
+	case QQ_CMD_GET_BUDDIES_ONLINE:
+		return "QQ_CMD_GET_BUDDIES_ONLINE";
+	case QQ_CMD_ROOM:
+		return "QQ_CMD_ROOM";
+	case QQ_CMD_GET_BUDDIES_AND_ROOMS:
+		return "QQ_CMD_GET_BUDDIES_AND_ROOMS";
+	case QQ_CMD_GET_LEVEL:
+		return "QQ_CMD_GET_LEVEL";
+	case QQ_CMD_TOKEN:
+		return "QQ_CMD_TOKEN";
+	case QQ_CMD_RECV_MSG_SYS:
+		return "QQ_CMD_RECV_MSG_SYS";
+	case QQ_CMD_BUDDY_CHANGE_STATUS:
+		return "QQ_CMD_BUDDY_CHANGE_STATUS";
+	default:
+		return "Unknown CMD";
+	}
+}
+
+const gchar *qq_get_room_cmd_desc(gint room_cmd)
+{
+	switch (room_cmd) {
+	case QQ_ROOM_CMD_CREATE:
+		return "QQ_ROOM_CMD_CREATE";
+	case QQ_ROOM_CMD_MEMBER_OPT:
+		return "QQ_ROOM_CMD_MEMBER_OPT";
+	case QQ_ROOM_CMD_CHANGE_INFO:
+		return "QQ_ROOM_CMD_CHANGE_INFO";
+	case QQ_ROOM_CMD_GET_INFO:
+		return "QQ_ROOM_CMD_GET_INFO";
+	case QQ_ROOM_CMD_ACTIVATE:
+		return "QQ_ROOM_CMD_ACTIVATE";
+	case QQ_ROOM_CMD_SEARCH:
+		return "QQ_ROOM_CMD_SEARCH";
+	case QQ_ROOM_CMD_JOIN:
+		return "QQ_ROOM_CMD_JOIN";
+	case QQ_ROOM_CMD_AUTH:
+		return "QQ_ROOM_CMD_AUTH";
+	case QQ_ROOM_CMD_QUIT:
+		return "QQ_ROOM_CMD_QUIT";
+	case QQ_ROOM_CMD_SEND_MSG:
+		return "QQ_ROOM_CMD_SEND_MSG";
+	case QQ_ROOM_CMD_GET_ONLINES:
+		return "QQ_ROOM_CMD_GET_ONLINES";
+	case QQ_ROOM_CMD_GET_BUDDIES:
+		return "QQ_ROOM_CMD_GET_BUDDIES";
+	case QQ_ROOM_CMD_CHANGE_CARD:
+		return "QQ_ROOM_CMD_CHANGE_CARD";
+	case QQ_ROOM_CMD_GET_REALNAMES:
+		return "QQ_ROOM_CMD_GET_REALNAMES";
+	case QQ_ROOM_CMD_GET_CARD:
+		return "QQ_ROOM_CMD_GET_CARD";
+	case QQ_ROOM_CMD_SEND_IM_EX:
+		return "QQ_ROOM_CMD_SEND_IM_EX";
+	case QQ_ROOM_CMD_ADMIN:
+		return "QQ_ROOM_CMD_ADMIN";
+	case QQ_ROOM_CMD_TRANSFER:
+		return "QQ_ROOM_CMD_TRANSFER";
+	case QQ_ROOM_CMD_TEMP_CREATE:
+		return "QQ_ROOM_CMD_TEMP_CREATE";
+	case QQ_ROOM_CMD_TEMP_CHANGE_MEMBER:
+		return "QQ_ROOM_CMD_TEMP_CHANGE_MEMBER";
+	case QQ_ROOM_CMD_TEMP_QUIT:
+		return "QQ_ROOM_CMD_TEMP_QUIT";
+	case QQ_ROOM_CMD_TEMP_GET_INFO:
+		return "QQ_ROOM_CMD_TEMP_GET_INFO";
+	case QQ_ROOM_CMD_TEMP_SEND_IM:
+		return "QQ_ROOM_CMD_TEMP_SEND_IM";
+	case QQ_ROOM_CMD_TEMP_GET_MEMBERS:
+		return "QQ_ROOM_CMD_TEMP_GET_MEMBERS";
+	default:
+		return "Unknown Room Command";
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libpurple/protocols/qq/qq_define.h	Wed Oct 22 14:28:17 2008 +0000
@@ -0,0 +1,109 @@
+/**
+ * @file header_info.h
+ *
+ * purple
+ *
+ * Purple is the legal property of its developers, whose names are too numerous
+ * to list here.  Please refer to the COPYRIGHT file distributed with this
+ * source distribution.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02111-1301  USA
+ */
+
+#ifndef _QQ_HEADER_INFO_H_
+#define _QQ_HEADER_INFO_H_
+
+#include <glib.h>
+
+#define QQ_UDP_HEADER_LENGTH    7
+#define QQ_TCP_HEADER_LENGTH    9
+
+#define QQ_PACKET_TAG           0x02	/* all QQ text packets starts with it */
+#define QQ_PACKET_TAIL          0x03	/* all QQ text packets end with it */
+
+#define QQ_CLIENT       0x0d55
+
+const gchar *qq_get_ver_desc(gint source);
+
+/* list of known QQ commands */
+enum {
+	QQ_CMD_LOGOUT = 0x0001,				/* log out */
+	QQ_CMD_KEEP_ALIVE = 0x0002,			/* get onlines from tencent */
+	QQ_CMD_UPDATE_INFO = 0x0004,			/* update information */
+	QQ_CMD_SEARCH_USER = 0x0005,			/* search for user */
+	QQ_CMD_GET_BUDDY_INFO = 0x0006,			/* get user information */
+	QQ_CMD_BUDDY_ADD_NO_AUTH = 0x0009,		/* add buddy without auth */
+	QQ_CMD_BUDDY_REMOVE = 0x000a,			/* delete a buddy  */
+	QQ_CMD_BUDDY_ADD_AUTH = 0x000b,			/* buddy authentication */
+	QQ_CMD_CHANGE_STATUS = 0x000d,		/* change my online status */
+	QQ_CMD_ACK_SYS_MSG = 0x0012,			/* ack system message */
+	QQ_CMD_SEND_IM = 0x0016,			/* send message */
+	QQ_CMD_RECV_IM = 0x0017,			/* receive message */
+	QQ_CMD_REMOVE_ME = 0x001c,			/* remove self */
+	QQ_CMD_REQUEST_KEY = 0x001d,			/* request key for file transfer */
+	QQ_CMD_CELL_PHONE_1 = 0x0021,			/* cell phone 1 */
+	QQ_CMD_LOGIN = 0x0022,				/* login */
+	QQ_CMD_GET_BUDDIES_LIST = 0x0026,		/* get buddies list */
+	QQ_CMD_GET_BUDDIES_ONLINE = 0x0027,		/* get online buddies list */
+	QQ_CMD_CELL_PHONE_2 = 0x0029,			/* cell phone 2 */
+	QQ_CMD_ROOM = 0x0030,			/* room command */
+	QQ_CMD_GET_BUDDIES_AND_ROOMS = 0x0058,
+	QQ_CMD_GET_LEVEL = 0x005C,			/* get level for one or more buddies */
+	QQ_CMD_TOKEN  = 0x0062, 		/* get login token */
+	QQ_CMD_RECV_MSG_SYS = 0x0080,			/* receive a system message */
+	QQ_CMD_BUDDY_CHANGE_STATUS = 0x0081,	/* buddy change status */
+};
+
+const gchar *qq_get_cmd_desc(gint type);
+
+enum {
+	QQ_ROOM_CMD_CREATE = 0x01,
+	QQ_ROOM_CMD_MEMBER_OPT = 0x02,
+	QQ_ROOM_CMD_CHANGE_INFO = 0x03,
+	QQ_ROOM_CMD_GET_INFO = 0x04,
+	QQ_ROOM_CMD_ACTIVATE = 0x05,
+	QQ_ROOM_CMD_SEARCH = 0x06,
+	QQ_ROOM_CMD_JOIN = 0x07,
+	QQ_ROOM_CMD_AUTH = 0x08,
+	QQ_ROOM_CMD_QUIT = 0x09,
+	QQ_ROOM_CMD_SEND_MSG = 0x0a,
+	QQ_ROOM_CMD_GET_ONLINES = 0x0b,
+	QQ_ROOM_CMD_GET_BUDDIES = 0x0c,
+
+	QQ_ROOM_CMD_CHANGE_CARD = 0x0E,
+	QQ_ROOM_CMD_GET_REALNAMES = 0x0F,
+	QQ_ROOM_CMD_GET_CARD = 0x10,
+	QQ_ROOM_CMD_SEND_IM_EX = 0x1A,
+	QQ_ROOM_CMD_ADMIN = 0x1B,
+	QQ_ROOM_CMD_TRANSFER = 0x1C,
+	QQ_ROOM_CMD_TEMP_CREATE = 0x30,
+	QQ_ROOM_CMD_TEMP_CHANGE_MEMBER = 0x31,
+	QQ_ROOM_CMD_TEMP_QUIT = 0x32,
+	QQ_ROOM_CMD_TEMP_GET_INFO = 0x33,
+	QQ_ROOM_CMD_TEMP_SEND_IM = 0x35,
+	QQ_ROOM_CMD_TEMP_GET_MEMBERS = 0x37,
+};
+
+const gchar *qq_get_room_cmd_desc(gint room_cmd);
+
+enum {
+	QQ_SERVER_BUDDY_ADDED = 0x01,
+	QQ_SERVER_BUDDY_ADD_REQUEST = 0x02,
+	QQ_SERVER_BUDDY_ADDED_ME = 0x03,
+	QQ_SERVER_BUDDY_REJECTED_ME = 0x04,
+	QQ_SERVER_NOTICE= 0x06,
+	QQ_SERVER_NEW_CLIENT = 0x09
+};
+#endif