14192
|
1 /**
|
|
2 * The QQ2003C protocol plugin
|
|
3 *
|
|
4 * for gaim
|
|
5 *
|
|
6 * Copyright (C) 2004 Puzzlebird
|
|
7 *
|
|
8 * This program is free software; you can redistribute it and/or modify
|
|
9 * it under the terms of the GNU General Public License as published by
|
|
10 * the Free Software Foundation; either version 2 of the License, or
|
|
11 * (at your option) any later version.
|
|
12 *
|
|
13 * This program is distributed in the hope that it will be useful,
|
|
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16 * GNU General Public License for more details.
|
|
17 *
|
|
18 * You should have received a copy of the GNU General Public License
|
|
19 * along with this program; if not, write to the Free Software
|
|
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
21 */
|
|
22
|
|
23 #include "header_info.h"
|
|
24
|
|
25 #define QQ_CLIENT_062E 0x062e /* GB QQ2000c build 0630 */
|
|
26 #define QQ_CLIENT_072E 0x072e /* EN QQ2000c build 0305 */
|
|
27 #define QQ_CLIENT_0801 0x0801 /* EN QQ2000c build 0630 */
|
|
28 #define QQ_CLIENT_0A1D 0x0a1d /* GB QQ2003c build 0808 */
|
|
29 #define QQ_CLIENT_0B07 0x0b07 /* GB QQ2003c build 0925 */
|
|
30 #define QQ_CLIENT_0B2F 0x0b2f /* GB QQ2003iii build 0117 */
|
|
31 #define QQ_CLIENT_0B35 0x0b35 /* GB QQ2003iii build 0304 (offical release) */
|
|
32 #define QQ_CLIENT_0B37 0x0b37 /* GB QQ2003iii build 0304 (April 05 updates) */
|
|
33 #define QQ_SERVER_0100 0x0100 /* server */
|
|
34
|
|
35 /* given command alias, return the command name accordingly */
|
|
36 const gchar *qq_get_cmd_desc(gint type)
|
|
37 {
|
|
38 switch (type) {
|
|
39 case QQ_CMD_LOGOUT:
|
|
40 return "QQ_CMD_LOGOUT";
|
|
41 case QQ_CMD_KEEP_ALIVE:
|
|
42 return "QQ_CMD_KEEP_ALIVE";
|
|
43 case QQ_CMD_UPDATE_INFO:
|
|
44 return "QQ_CMD_UPDATE_INFO";
|
|
45 case QQ_CMD_SEARCH_USER:
|
|
46 return "QQ_CMD_SEARCH_USER";
|
|
47 case QQ_CMD_GET_USER_INFO:
|
|
48 return "QQ_CMD_GET_USER_INFO";
|
|
49 case QQ_CMD_ADD_FRIEND_WO_AUTH:
|
|
50 return "QQ_CMD_ADD_FRIEND_WO_AUTH";
|
|
51 case QQ_CMD_DEL_FRIEND:
|
|
52 return "QQ_CMD_DEL_FRIEND";
|
|
53 case QQ_CMD_BUDDY_AUTH:
|
|
54 return "QQ_CMD_BUDDY_AUTH";
|
|
55 case QQ_CMD_CHANGE_ONLINE_STATUS:
|
|
56 return "QQ_CMD_CHANGE_ONLINE_STATUS";
|
|
57 case QQ_CMD_ACK_SYS_MSG:
|
|
58 return "QQ_CMD_ACK_SYS_MSG";
|
|
59 case QQ_CMD_SEND_IM:
|
|
60 return "QQ_CMD_SEND_IM";
|
|
61 case QQ_CMD_RECV_IM:
|
|
62 return "QQ_CMD_RECV_IM";
|
|
63 case QQ_CMD_REMOVE_SELF:
|
|
64 return "QQ_CMD_REMOVE_SELF";
|
|
65 case QQ_CMD_LOGIN:
|
|
66 return "QQ_CMD_LOGIN";
|
|
67 case QQ_CMD_GET_FRIENDS_LIST:
|
|
68 return "QQ_CMD_GET_FRIENDS_LIST";
|
|
69 case QQ_CMD_GET_FRIENDS_ONLINE:
|
|
70 return "QQ_CMD_GET_FRIENDS_ONLINE";
|
|
71 case QQ_CMD_GROUP_CMD:
|
|
72 return "QQ_CMD_GROUP_CMD";
|
|
73 case QQ_CMD_GET_ALL_LIST_WITH_GROUP:
|
|
74 return "QQ_CMD_GET_ALL_LIST_WITH_GROUP";
|
|
75 case QQ_CMD_REQUEST_LOGIN_TOKEN:
|
|
76 return "QQ_CMD_REQUEST_LOGIN_TOKEN";
|
|
77 case QQ_CMD_RECV_MSG_SYS:
|
|
78 return "QQ_CMD_RECV_MSG_SYS";
|
|
79 case QQ_CMD_RECV_MSG_FRIEND_CHANGE_STATUS:
|
|
80 return "QQ_CMD_RECV_MSG_FRIEND_CHANGE_STATUS";
|
|
81 default:
|
|
82 return "UNKNOWN_TYPE";
|
|
83 }
|
|
84 }
|
|
85
|
|
86 /* given source tag, return its description accordingly */
|
|
87 const gchar *qq_get_source_str(gint source)
|
|
88 {
|
|
89 switch (source) {
|
|
90 case QQ_CLIENT_062E:
|
|
91 return "GB QQ2000c build 0630";
|
|
92 case QQ_CLIENT_072E:
|
|
93 return "En QQ2000c build 0305";
|
|
94 case QQ_CLIENT_0801:
|
|
95 return "En QQ2000c build 0630";
|
|
96 case QQ_CLIENT_0A1D:
|
|
97 return "GB QQ2003ii build 0808";
|
|
98 case QQ_CLIENT_0B07:
|
|
99 return "GB QQ2003ii build 0925";
|
|
100 case QQ_CLIENT_0B2F:
|
|
101 return "GB QQ2003iii build 0117";
|
|
102 case QQ_CLIENT_0B35:
|
|
103 return "GB QQ2003iii build 0304";
|
|
104 case QQ_CLIENT_0B37:
|
|
105 return "GB QQ2003iii build 0304 (April 5 update)";
|
|
106 case QQ_SERVER_0100:
|
|
107 return "QQ Server 0100";
|
|
108 default:
|
|
109 return "QQ unknown version";
|
|
110 }
|
|
111 }
|