Mercurial > pidgin
comparison libpurple/protocols/qq/group_info.c @ 24146:ce94189f15ad
Flos Lonicerae <lonicerae(at)gmail.com>
* Merge lonicerae and ccpaging into trunk
author | SHiNE CsyFeK <csyfek@gmail.com> |
---|---|
date | Wed, 22 Oct 2008 14:52:26 +0000 |
parents | ec3f7d3e0445 |
children | 1bdf7b602684 |
comparison
equal
deleted
inserted
replaced
24145:ec3f7d3e0445 | 24146:ce94189f15ad |
---|---|
155 | 155 |
156 g_return_if_fail(data != NULL && data_len > 0); | 156 g_return_if_fail(data != NULL && data_len > 0); |
157 qd = (qq_data *) gc->proto_data; | 157 qd = (qq_data *) gc->proto_data; |
158 | 158 |
159 /* qq_show_packet("Room Info", data, data_len); */ | 159 /* qq_show_packet("Room Info", data, data_len); */ |
160 | 160 |
161 bytes = 0; | 161 bytes = 0; |
162 bytes += qq_get32(&id, data + bytes); | 162 bytes += qq_get32(&id, data + bytes); |
163 g_return_if_fail(id > 0); | 163 g_return_if_fail(id > 0); |
164 | 164 |
165 bytes += qq_get32(&ext_id, data + bytes); | 165 bytes += qq_get32(&ext_id, data + bytes); |
189 * qunDestLen(qunDestcontent)) */ | 189 * qunDestLen(qunDestcontent)) */ |
190 bytes += qq_get8(&unknown1, data + bytes); | 190 bytes += qq_get8(&unknown1, data + bytes); |
191 purple_debug_info("QQ", "type=%u creatorid=%u category=%u maxmembers=%u\n", | 191 purple_debug_info("QQ", "type=%u creatorid=%u category=%u maxmembers=%u\n", |
192 group->type8, group->creator_uid, group->category, max_members); | 192 group->type8, group->creator_uid, group->category, max_members); |
193 | 193 |
194 /* skip 7 bytes unknow in qq2007 0x(00 00 01 00 00 00 fc)*/ | 194 if (qd->client_version >= 2007) { |
195 bytes += 7; | 195 /* skip 7 bytes unknow in qq2007 0x(00 00 01 00 00 00 fc)*/ |
196 | 196 bytes += 7; |
197 } | |
197 /* qq_show_packet("Room Info", data + bytes, data_len - bytes); */ | 198 /* qq_show_packet("Room Info", data + bytes, data_len - bytes); */ |
198 /* strlen + <str content> */ | 199 /* strlen + <str content> */ |
199 bytes += convert_as_pascal_string(data + bytes, &(group->title_utf8), QQ_CHARSET_DEFAULT); | 200 bytes += qq_get_vstr(&(group->title_utf8), QQ_CHARSET_DEFAULT, data + bytes); |
200 bytes += qq_get16(&unknown, data + bytes); /* 0x0000 */ | 201 bytes += qq_get16(&unknown, data + bytes); /* 0x0000 */ |
201 bytes += convert_as_pascal_string(data + bytes, ¬ice, QQ_CHARSET_DEFAULT); | 202 bytes += qq_get_vstr(¬ice, QQ_CHARSET_DEFAULT, data + bytes); |
202 bytes += convert_as_pascal_string(data + bytes, &(group->desc_utf8), QQ_CHARSET_DEFAULT); | 203 bytes += qq_get_vstr(&(group->desc_utf8), QQ_CHARSET_DEFAULT, data + bytes); |
203 | 204 |
204 purple_debug_info("QQ", "room [%s] notice [%s] desc [%s] unknow 0x%04X\n", | 205 purple_debug_info("QQ", "room [%s] notice [%s] desc [%s] unknow 0x%04X\n", |
205 group->title_utf8, notice, group->desc_utf8, unknown); | 206 group->title_utf8, notice, group->desc_utf8, unknown); |
206 | 207 |
207 num = 0; | 208 num = 0; |
312 qq_buddy *member; | 313 qq_buddy *member; |
313 gchar *nick; | 314 gchar *nick; |
314 | 315 |
315 g_return_if_fail(data != NULL && len > 0); | 316 g_return_if_fail(data != NULL && len > 0); |
316 | 317 |
317 #if 0 | 318 /* qq_show_packet("qq_process_room_cmd_get_buddies", data, len); */ |
318 qq_show_packet("qq_process_room_cmd_get_buddies", data, len); | |
319 #endif | |
320 | 319 |
321 bytes = 0; | 320 bytes = 0; |
322 bytes += qq_get32(&id, data + bytes); | 321 bytes += qq_get32(&id, data + bytes); |
323 g_return_if_fail(id > 0); | 322 g_return_if_fail(id > 0); |
324 | 323 |
335 | 334 |
336 num++; | 335 num++; |
337 bytes += qq_get16(&(member->face), data + bytes); | 336 bytes += qq_get16(&(member->face), data + bytes); |
338 bytes += qq_get8(&(member->age), data + bytes); | 337 bytes += qq_get8(&(member->age), data + bytes); |
339 bytes += qq_get8(&(member->gender), data + bytes); | 338 bytes += qq_get8(&(member->gender), data + bytes); |
340 bytes += convert_as_pascal_string(data + bytes, &nick, QQ_CHARSET_DEFAULT); | 339 bytes += qq_get_vstr(&nick, QQ_CHARSET_DEFAULT, data + bytes); |
341 bytes += qq_get16(&unknown, data + bytes); | 340 bytes += qq_get16(&unknown, data + bytes); |
342 bytes += qq_get8(&(member->ext_flag), data + bytes); | 341 bytes += qq_get8(&(member->ext_flag), data + bytes); |
343 bytes += qq_get8(&(member->comm_flag), data + bytes); | 342 bytes += qq_get8(&(member->comm_flag), data + bytes); |
344 | 343 |
345 /* filter \r\n in nick */ | 344 /* filter \r\n in nick */ |