Mercurial > pidgin.yaz
comparison libpurple/protocols/qq/header_info.c @ 23753:5f454b975a99
2008.08.10 - csyfek <csyfek(at)gmail.com>
* Commit to Pidgin
2008.08.06 - ccpaging <ecc_hy(at)hotmail.com>
* Rename names of variables, Group, to Room
* Functions of group_network merged into qq_network and qq_process
* Canceled managing glist of group packet, add sub_cmdd and room_id to transaction
* Fixed error of demo group:
If 'room list' and 'room infor' are not setup, response received from server will emits
'room_id = 0' packet.
2008.08.04 - ccpaging <ecc_hy(at)hotmail.com>
* Use new crypt/decrypt functions
* Rename crypt.c/h to qq_crypt.c/h
* Clean code of decrypt functions
* Fixed decryption failure
2008.08.04 - csyfek <csyfek(at)gmail.com>
* Update AUTHORS
author | SHiNE CsyFeK <csyfek@gmail.com> |
---|---|
date | Sun, 10 Aug 2008 04:32:14 +0000 |
parents | 1c50f12b1c52 |
children | 967344bc404d |
comparison
equal
deleted
inserted
replaced
23748:107166bb2a64 | 23753:5f454b975a99 |
---|---|
59 #define QQ_CLIENT_1412 0x1412 /* QQMac 1.0 preview1 build 670 */ | 59 #define QQ_CLIENT_1412 0x1412 /* QQMac 1.0 preview1 build 670 */ |
60 #define QQ_CLIENT_1441 0x1441 /* QQ2009 preview2 */ | 60 #define QQ_CLIENT_1441 0x1441 /* QQ2009 preview2 */ |
61 | 61 |
62 #define QQ_SERVER_0100 0x0100 /* server */ | 62 #define QQ_SERVER_0100 0x0100 /* server */ |
63 | 63 |
64 /* given command alias, return the command name accordingly */ | |
65 const gchar *qq_get_cmd_desc(gint type) | |
66 { | |
67 switch (type) { | |
68 case QQ_CMD_LOGOUT: | |
69 return "QQ_CMD_LOGOUT"; | |
70 case QQ_CMD_KEEP_ALIVE: | |
71 return "QQ_CMD_KEEP_ALIVE"; | |
72 case QQ_CMD_UPDATE_INFO: | |
73 return "QQ_CMD_UPDATE_INFO"; | |
74 case QQ_CMD_SEARCH_USER: | |
75 return "QQ_CMD_SEARCH_USER"; | |
76 case QQ_CMD_GET_USER_INFO: | |
77 return "QQ_CMD_GET_USER_INFO"; | |
78 case QQ_CMD_ADD_BUDDY_WO_AUTH: | |
79 return "QQ_CMD_ADD_BUDDY_WO_AUTH"; | |
80 case QQ_CMD_DEL_BUDDY: | |
81 return "QQ_CMD_DEL_BUDDY"; | |
82 case QQ_CMD_BUDDY_AUTH: | |
83 return "QQ_CMD_BUDDY_AUTH"; | |
84 case QQ_CMD_CHANGE_ONLINE_STATUS: | |
85 return "QQ_CMD_CHANGE_ONLINE_STATUS"; | |
86 case QQ_CMD_ACK_SYS_MSG: | |
87 return "QQ_CMD_ACK_SYS_MSG"; | |
88 case QQ_CMD_SEND_IM: | |
89 return "QQ_CMD_SEND_IM"; | |
90 case QQ_CMD_RECV_IM: | |
91 return "QQ_CMD_RECV_IM"; | |
92 case QQ_CMD_REMOVE_SELF: | |
93 return "QQ_CMD_REMOVE_SELF"; | |
94 case QQ_CMD_LOGIN: | |
95 return "QQ_CMD_LOGIN"; | |
96 case QQ_CMD_GET_BUDDIES_LIST: | |
97 return "QQ_CMD_GET_BUDDIES_LIST"; | |
98 case QQ_CMD_GET_BUDDIES_ONLINE: | |
99 return "QQ_CMD_GET_BUDDIES_ONLINE"; | |
100 case QQ_CMD_GROUP_CMD: | |
101 return "QQ_CMD_GROUP_CMD"; | |
102 case QQ_CMD_GET_ALL_LIST_WITH_GROUP: | |
103 return "QQ_CMD_GET_ALL_LIST_WITH_GROUP"; | |
104 case QQ_CMD_GET_LEVEL: | |
105 return "QQ_CMD_GET_LEVEL"; | |
106 case QQ_CMD_TOKEN: | |
107 return "QQ_CMD_TOKEN"; | |
108 case QQ_CMD_RECV_MSG_SYS: | |
109 return "QQ_CMD_RECV_MSG_SYS"; | |
110 case QQ_CMD_RECV_MSG_BUDDY_CHANGE_STATUS: | |
111 return "QQ_CMD_RECV_MSG_BUDDY_CHANGE_STATUS"; | |
112 default: | |
113 return "Unknown"; | |
114 } | |
115 } | |
116 | 64 |
117 /* given source tag, return its description accordingly */ | 65 /* given source tag, return its description accordingly */ |
118 const gchar *qq_get_ver_desc(gint source) | 66 const gchar *qq_get_ver_desc(gint source) |
119 { | 67 { |
120 switch (source) { | 68 switch (source) { |
175 return "QQ Server 0100"; | 123 return "QQ Server 0100"; |
176 default: | 124 default: |
177 return "Unknown"; | 125 return "Unknown"; |
178 } | 126 } |
179 } | 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_USER_INFO: | |
142 return "QQ_CMD_GET_USER_INFO"; | |
143 case QQ_CMD_ADD_BUDDY_WO_AUTH: | |
144 return "QQ_CMD_ADD_BUDDY_WO_AUTH"; | |
145 case QQ_CMD_DEL_BUDDY: | |
146 return "QQ_CMD_DEL_BUDDY"; | |
147 case QQ_CMD_BUDDY_AUTH: | |
148 return "QQ_CMD_BUDDY_AUTH"; | |
149 case QQ_CMD_CHANGE_ONLINE_STATUS: | |
150 return "QQ_CMD_CHANGE_ONLINE_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_SELF: | |
158 return "QQ_CMD_REMOVE_SELF"; | |
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_RECV_MSG_BUDDY_CHANGE_STATUS: | |
176 return "QQ_CMD_RECV_MSG_BUDDY_CHANGE_STATUS"; | |
177 default: | |
178 return "Unknown"; | |
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_MEMBER_INFO: | |
208 return "QQ_ROOM_CMD_GET_MEMBER_INFO"; | |
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 QQ Room Command"; | |
235 } | |
236 } |