comparison libpurple/protocols/myspace/message.c @ 18879:e0cac5db762b

In msim_msg_pack_element_dict(), separate keys and values with '=' for the MSIM_TYPE_DICTIONARY type. This should allow the dictionary type to work with MySpace's servers. Tested in msim_test_msg(). Also removed msim_test_xml(), since it was more of a playground than a formal test of anything. MsimMessage's dictionary type is now thought to be fully-functional, but it is not yet used anywhere.
author Jeffrey Connelly <jaconnel@calpoly.edu>
date Tue, 07 Aug 2007 02:11:15 +0000
parents b2d81d13f015
children f41db253c1af
comparison
equal deleted inserted replaced
18878:eeaf5afc8940 18879:e0cac5db762b
515 515
516 /** Pack a string using the given GFunc and seperator. 516 /** Pack a string using the given GFunc and seperator.
517 * Used by msim_msg_dump() and msim_msg_pack(). 517 * Used by msim_msg_dump() and msim_msg_pack().
518 */ 518 */
519 gchar * 519 gchar *
520 msim_msg_pack_using(MsimMessage *msg, GFunc gf, const gchar *sep, 520 msim_msg_pack_using(MsimMessage *msg,
521 GFunc gf,
522 const gchar *sep,
521 const gchar *begin, const gchar *end) 523 const gchar *begin, const gchar *end)
522 { 524 {
523 gchar **strings; 525 gchar **strings;
524 gchar **strings_tmp; 526 gchar **strings_tmp;
525 gchar *joined; 527 gchar *joined;
786 case MSIM_TYPE_STRING: 788 case MSIM_TYPE_STRING:
787 case MSIM_TYPE_BINARY: 789 case MSIM_TYPE_BINARY:
788 case MSIM_TYPE_DICTIONARY: 790 case MSIM_TYPE_DICTIONARY:
789 case MSIM_TYPE_LIST: 791 case MSIM_TYPE_LIST:
790 case MSIM_TYPE_BOOLEAN: /* Boolean is On or Off */ 792 case MSIM_TYPE_BOOLEAN: /* Boolean is On or Off */
791 string = g_strconcat(elem->name, "\\", data_string, NULL); 793 string = g_strconcat(elem->name, "=", data_string, NULL);
792 break; 794 break;
793 795
794 default: 796 default:
795 g_free(data_string); 797 g_free(data_string);
796 g_return_if_fail(FALSE); 798 g_return_if_fail(FALSE);