Mercurial > pidgin
comparison libpurple/protocols/qq/qq_define.c @ 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 | |
children | bdfcfd71449c |
comparison
equal
deleted
inserted
replaced
24132:11de3fd58c59 | 24133:a3cd7c3d9da1 |
---|---|
1 /** | |
2 * @file header_info.c | |
3 * | |
4 * purple | |
5 * | |
6 * Purple is the legal property of its developers, whose names are too numerous | |
7 * to list here. Please refer to the COPYRIGHT file distributed with this | |
8 * source distribution. | |
9 * | |
10 * This program is free software; you can redistribute it and/or modify | |
11 * it under the terms of the GNU General Public License as published by | |
12 * the Free Software Foundation; either version 2 of the License, or | |
13 * (at your option) any later version. | |
14 * | |
15 * This program is distributed in the hope that it will be useful, | |
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
18 * GNU General Public License for more details. | |
19 * | |
20 * You should have received a copy of the GNU General Public License | |
21 * along with this program; if not, write to the Free Software | |
22 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA | |
23 */ | |
24 | |
25 #include "internal.h" | |
26 | |
27 #include "header_info.h" | |
28 | |
29 #define QQ_CLIENT_062E 0x062e /* GB QQ2000c build 0630 */ | |
30 #define QQ_CLIENT_072E 0x072e /* EN QQ2000c build 0305 */ | |
31 #define QQ_CLIENT_0801 0x0801 /* EN QQ2000c build 0630 */ | |
32 #define QQ_CLIENT_0A1D 0x0a1d /* GB QQ2003c build 0808 */ | |
33 #define QQ_CLIENT_0B07 0x0b07 /* GB QQ2003c build 0925 */ | |
34 #define QQ_CLIENT_0B2F 0x0b2f /* GB QQ2003iii build 0117 */ | |
35 #define QQ_CLIENT_0B35 0x0b35 /* GB QQ2003iii build 0304 (offical release) */ | |
36 #define QQ_CLIENT_0B37 0x0b37 /* GB QQ2003iii build 0304 (April 05 updates) */ | |
37 #define QQ_CLIENT_0E1B 0x0e1b /* QQ2005 ? */ | |
38 #define QQ_CLIENT_0E35 0x0e35 /* EN QQ2005 V05.0.200.020 */ | |
39 #define QQ_CLIENT_0F15 0x0f15 /* QQ2006 Spring Festival build */ | |
40 #define QQ_CLIENT_0F5F 0x0f5f /* QQ2006 final build */ | |
41 | |
42 #define QQ_CLIENT_0C0B 0x0C0B /* QQ2004 */ | |
43 #define QQ_CLIENT_0C0D 0x0C0D /* QQ2004 preview*/ | |
44 #define QQ_CLIENT_0C21 0x0C21 /* QQ2004 */ | |
45 #define QQ_CLIENT_0C49 0x0C49 /* QQ2004II */ | |
46 #define QQ_CLIENT_0D05 0x0D05 /* QQ2005 beta1 */ | |
47 #define QQ_CLIENT_0D51 0x0D51 /* QQ2005 beta2 */ | |
48 #define QQ_CLIENT_0D61 0x0D61 /* QQ2005 */ | |
49 #define QQ_CLIENT_05A5 0x05A5 /* ? */ | |
50 #define QQ_CLIENT_05F1 0x0F15 /* QQ2006 Spring Festival */ | |
51 #define QQ_CLIENT_0F4B 0x0F4B /* QQ2006 Beta 3 */ | |
52 | |
53 #define QQ_CLIENT_1105 0x1105 /* QQ2007 beta4*/ | |
54 #define QQ_CLIENT_111D 0x111D /* QQ2007 */ | |
55 #define QQ_CLIENT_115B 0x115B /* QQ2008 */ | |
56 #define QQ_CLIENT_1203 0x1203 /* QQ2008 */ | |
57 #define QQ_CLIENT_1205 0x1205 /* QQ2008 */ | |
58 #define QQ_CLIENT_120B 0x120B /* QQ2008 July 8.0.978.400 */ | |
59 #define QQ_CLIENT_1412 0x1412 /* QQMac 1.0 preview1 build 670 */ | |
60 #define QQ_CLIENT_1441 0x1441 /* QQ2009 preview2 */ | |
61 | |
62 #define QQ_SERVER_0100 0x0100 /* server */ | |
63 | |
64 | |
65 /* given source tag, return its description accordingly */ | |
66 const gchar *qq_get_ver_desc(gint source) | |
67 { | |
68 switch (source) { | |
69 case QQ_CLIENT_062E: | |
70 return "GB QQ2000c build 0630"; | |
71 case QQ_CLIENT_072E: | |
72 return "En QQ2000c build 0305"; | |
73 case QQ_CLIENT_0801: | |
74 return "En QQ2000c build 0630"; | |
75 case QQ_CLIENT_0A1D: | |
76 return "GB QQ2003ii build 0808"; | |
77 case QQ_CLIENT_0B07: | |
78 return "GB QQ2003ii build 0925"; | |
79 case QQ_CLIENT_0B2F: | |
80 return "GB QQ2003iii build 0117"; | |
81 case QQ_CLIENT_0B35: | |
82 return "GB QQ2003iii build 0304"; | |
83 case QQ_CLIENT_0B37: | |
84 return "GB QQ2003iii build 0304 (April 5 update)"; | |
85 case QQ_CLIENT_0C0B: | |
86 return "QQ2004"; | |
87 case QQ_CLIENT_0C0D: | |
88 return "QQ2004 preview"; | |
89 case QQ_CLIENT_0C21: | |
90 return "QQ2004"; | |
91 case QQ_CLIENT_0C49: | |
92 return "QQ2004II"; | |
93 case QQ_CLIENT_0D05: | |
94 return "QQ2005 beta1"; | |
95 case QQ_CLIENT_0D51: | |
96 return "QQ2005 beta2"; | |
97 case QQ_CLIENT_0D61: | |
98 return "QQ2005"; | |
99 case QQ_CLIENT_0E1B: | |
100 return "QQ2005 or QQ2006"; | |
101 case QQ_CLIENT_0E35: | |
102 return "En QQ2005 V05.0.200.020"; | |
103 case QQ_CLIENT_0F15: | |
104 return "QQ2006 Spring Festival"; | |
105 case QQ_CLIENT_0F4B: | |
106 return "QQ2006 beta3"; | |
107 case QQ_CLIENT_0F5F: | |
108 return "QQ2006 final build"; | |
109 case QQ_CLIENT_1105: | |
110 return "QQ2007 beta4"; | |
111 case QQ_CLIENT_111D: | |
112 return "QQ2007"; | |
113 case QQ_CLIENT_115B: | |
114 case QQ_CLIENT_1203: | |
115 case QQ_CLIENT_1205: | |
116 case QQ_CLIENT_120B: | |
117 return "QQ2008"; | |
118 case QQ_CLIENT_1412: | |
119 return "QQMac 1.0 preview1 build 670"; | |
120 case QQ_CLIENT_1441: | |
121 return "QQ2009 preview2"; | |
122 case QQ_SERVER_0100: | |
123 return "QQ Server 0100"; | |
124 default: | |
125 return "Unknown Version"; | |
126 } | |
127 } | |
128 | |
129 /* given command alias, return the command name accordingly */ | |
130 const gchar *qq_get_cmd_desc(gint cmd) | |
131 { | |
132 switch (cmd) { | |
133 case QQ_CMD_LOGOUT: | |
134 return "QQ_CMD_LOGOUT"; | |
135 case QQ_CMD_KEEP_ALIVE: | |
136 return "QQ_CMD_KEEP_ALIVE"; | |
137 case QQ_CMD_UPDATE_INFO: | |
138 return "QQ_CMD_UPDATE_INFO"; | |
139 case QQ_CMD_SEARCH_USER: | |
140 return "QQ_CMD_SEARCH_USER"; | |
141 case QQ_CMD_GET_BUDDY_INFO: | |
142 return "QQ_CMD_GET_BUDDY_INFO"; | |
143 case QQ_CMD_BUDDY_ADD_NO_AUTH: | |
144 return "QQ_CMD_BUDDY_ADD_NO_AUTH"; | |
145 case QQ_CMD_BUDDY_REMOVE: | |
146 return "QQ_CMD_BUDDY_REMOVE"; | |
147 case QQ_CMD_BUDDY_ADD_AUTH: | |
148 return "QQ_CMD_BUDDY_ADD_AUTH"; | |
149 case QQ_CMD_CHANGE_STATUS: | |
150 return "QQ_CMD_CHANGE_STATUS"; | |
151 case QQ_CMD_ACK_SYS_MSG: | |
152 return "QQ_CMD_ACK_SYS_MSG"; | |
153 case QQ_CMD_SEND_IM: | |
154 return "QQ_CMD_SEND_IM"; | |
155 case QQ_CMD_RECV_IM: | |
156 return "QQ_CMD_RECV_IM"; | |
157 case QQ_CMD_REMOVE_ME: | |
158 return "QQ_CMD_REMOVE_ME"; | |
159 case QQ_CMD_LOGIN: | |
160 return "QQ_CMD_LOGIN"; | |
161 case QQ_CMD_GET_BUDDIES_LIST: | |
162 return "QQ_CMD_GET_BUDDIES_LIST"; | |
163 case QQ_CMD_GET_BUDDIES_ONLINE: | |
164 return "QQ_CMD_GET_BUDDIES_ONLINE"; | |
165 case QQ_CMD_ROOM: | |
166 return "QQ_CMD_ROOM"; | |
167 case QQ_CMD_GET_BUDDIES_AND_ROOMS: | |
168 return "QQ_CMD_GET_BUDDIES_AND_ROOMS"; | |
169 case QQ_CMD_GET_LEVEL: | |
170 return "QQ_CMD_GET_LEVEL"; | |
171 case QQ_CMD_TOKEN: | |
172 return "QQ_CMD_TOKEN"; | |
173 case QQ_CMD_RECV_MSG_SYS: | |
174 return "QQ_CMD_RECV_MSG_SYS"; | |
175 case QQ_CMD_BUDDY_CHANGE_STATUS: | |
176 return "QQ_CMD_BUDDY_CHANGE_STATUS"; | |
177 default: | |
178 return "Unknown CMD"; | |
179 } | |
180 } | |
181 | |
182 const gchar *qq_get_room_cmd_desc(gint room_cmd) | |
183 { | |
184 switch (room_cmd) { | |
185 case QQ_ROOM_CMD_CREATE: | |
186 return "QQ_ROOM_CMD_CREATE"; | |
187 case QQ_ROOM_CMD_MEMBER_OPT: | |
188 return "QQ_ROOM_CMD_MEMBER_OPT"; | |
189 case QQ_ROOM_CMD_CHANGE_INFO: | |
190 return "QQ_ROOM_CMD_CHANGE_INFO"; | |
191 case QQ_ROOM_CMD_GET_INFO: | |
192 return "QQ_ROOM_CMD_GET_INFO"; | |
193 case QQ_ROOM_CMD_ACTIVATE: | |
194 return "QQ_ROOM_CMD_ACTIVATE"; | |
195 case QQ_ROOM_CMD_SEARCH: | |
196 return "QQ_ROOM_CMD_SEARCH"; | |
197 case QQ_ROOM_CMD_JOIN: | |
198 return "QQ_ROOM_CMD_JOIN"; | |
199 case QQ_ROOM_CMD_AUTH: | |
200 return "QQ_ROOM_CMD_AUTH"; | |
201 case QQ_ROOM_CMD_QUIT: | |
202 return "QQ_ROOM_CMD_QUIT"; | |
203 case QQ_ROOM_CMD_SEND_MSG: | |
204 return "QQ_ROOM_CMD_SEND_MSG"; | |
205 case QQ_ROOM_CMD_GET_ONLINES: | |
206 return "QQ_ROOM_CMD_GET_ONLINES"; | |
207 case QQ_ROOM_CMD_GET_BUDDIES: | |
208 return "QQ_ROOM_CMD_GET_BUDDIES"; | |
209 case QQ_ROOM_CMD_CHANGE_CARD: | |
210 return "QQ_ROOM_CMD_CHANGE_CARD"; | |
211 case QQ_ROOM_CMD_GET_REALNAMES: | |
212 return "QQ_ROOM_CMD_GET_REALNAMES"; | |
213 case QQ_ROOM_CMD_GET_CARD: | |
214 return "QQ_ROOM_CMD_GET_CARD"; | |
215 case QQ_ROOM_CMD_SEND_IM_EX: | |
216 return "QQ_ROOM_CMD_SEND_IM_EX"; | |
217 case QQ_ROOM_CMD_ADMIN: | |
218 return "QQ_ROOM_CMD_ADMIN"; | |
219 case QQ_ROOM_CMD_TRANSFER: | |
220 return "QQ_ROOM_CMD_TRANSFER"; | |
221 case QQ_ROOM_CMD_TEMP_CREATE: | |
222 return "QQ_ROOM_CMD_TEMP_CREATE"; | |
223 case QQ_ROOM_CMD_TEMP_CHANGE_MEMBER: | |
224 return "QQ_ROOM_CMD_TEMP_CHANGE_MEMBER"; | |
225 case QQ_ROOM_CMD_TEMP_QUIT: | |
226 return "QQ_ROOM_CMD_TEMP_QUIT"; | |
227 case QQ_ROOM_CMD_TEMP_GET_INFO: | |
228 return "QQ_ROOM_CMD_TEMP_GET_INFO"; | |
229 case QQ_ROOM_CMD_TEMP_SEND_IM: | |
230 return "QQ_ROOM_CMD_TEMP_SEND_IM"; | |
231 case QQ_ROOM_CMD_TEMP_GET_MEMBERS: | |
232 return "QQ_ROOM_CMD_TEMP_GET_MEMBERS"; | |
233 default: | |
234 return "Unknown Room Command"; | |
235 } | |
236 } |