Mercurial > pidgin.yaz
comparison libpurple/protocols/oscar/tlv.c @ 29852:a538cb73f897
propagate from branch 'im.pidgin.pidgin' (head b0098e2250f135d121960d8152e144e7e344125e)
to branch 'im.pidgin.cpw.rekkanoryo.icqxstatus' (head dcd3ab65d5cfcd79b00a7b95ab5fe788da64c112)
author | Marcus Lundblad <ml@update.uu.se> |
---|---|
date | Sun, 07 Feb 2010 19:31:56 +0000 |
parents | 1fb503adb2ae |
children | 0d3145e6b1d6 |
comparison
equal
deleted
inserted
replaced
29372:791606778223 | 29852:a538cb73f897 |
---|---|
405 * @param list Destination chain | 405 * @param list Destination chain |
406 * @param type TLV type to add | 406 * @param type TLV type to add |
407 * @param caps Bitfield of capability flags to send | 407 * @param caps Bitfield of capability flags to send |
408 * @return The size of the value added. | 408 * @return The size of the value added. |
409 */ | 409 */ |
410 int aim_tlvlist_add_caps(GSList **list, const guint16 type, const guint32 caps) | 410 int aim_tlvlist_add_caps(GSList **list, const guint16 type, const guint32 caps, const char *mood) |
411 { | 411 { |
412 guint8 buf[256]; /* TODO: Don't use a fixed length buffer */ | 412 guint8 buf[256]; /* TODO: Don't use a fixed length buffer */ |
413 ByteStream bs; | 413 ByteStream bs; |
414 guint8 *data; | |
414 | 415 |
415 if (caps == 0) | 416 if (caps == 0) |
416 return 0; /* nothing there anyway */ | 417 return 0; /* nothing there anyway */ |
417 | 418 |
418 byte_stream_init(&bs, buf, sizeof(buf)); | 419 byte_stream_init(&bs, buf, sizeof(buf)); |
419 | 420 |
420 byte_stream_putcaps(&bs, caps); | 421 byte_stream_putcaps(&bs, caps); |
422 | |
423 /* adding of custom icon GUID */ | |
424 data = icq_get_custom_icon_data(mood); | |
425 if (data != NULL) | |
426 byte_stream_putraw(&bs, data, 16); | |
421 | 427 |
422 return aim_tlvlist_add_raw(list, type, byte_stream_curpos(&bs), buf); | 428 return aim_tlvlist_add_raw(list, type, byte_stream_curpos(&bs), buf); |
423 } | 429 } |
424 | 430 |
425 /** | 431 /** |