Changeset 1689
- Timestamp:
- 02/07/07 13:43:37 (2 years ago)
- Files:
-
- trunk/formats/vformats-xml/vformat.c (modified) (1 diff)
- trunk/formats/vformats-xml/xml-vcard.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/formats/vformats-xml/vformat.c
r1677 r1689 1321 1321 if (!g_ascii_strcasecmp ((char*)param->values->data, "b")) 1322 1322 attr->encoding = VF_ENCODING_BASE64; 1323 else if (!g_ascii_strcasecmp ((char*)param->values->data, "BASE64")) 1324 attr->encoding = VF_ENCODING_BASE64; 1323 1325 else if (!g_ascii_strcasecmp ((char*)param->values->data, "QUOTED-PRINTABLE")) 1324 1326 attr->encoding = VF_ENCODING_QP; trunk/formats/vformats-xml/xml-vcard.c
r1414 r1689 687 687 } 688 688 689 static VFormatAttribute *handle_xml_photo_base64_attribute(VFormat *vcard, xmlNode *root, const char *encoding) 690 { 691 osync_trace(TRACE_INTERNAL, "Handling photo xml attribute"); 692 VFormatAttribute *attr = vformat_attribute_new(NULL, "PHOTO"); 693 add_value(attr, root, "Content", encoding); 694 vformat_attribute_add_param_with_value(attr, "ENCODING", "BASE64"); 695 vformat_attribute_add_param_with_value(attr, "TYPE", osxml_find_node(root, "Type")); 696 vformat_add_attribute(vcard, attr); 697 return attr; 698 } 699 689 700 static VFormatAttribute *handle_xml_birthday_attribute(VFormat *vcard, xmlNode *root, const char *encoding) 690 701 { … … 918 929 else 919 930 std_encoding = "B"; 920 931 932 OSyncHookTables *hooks = (OSyncHookTables *)user_data; 933 /* vcard21 / vcard30 */ 934 if (target == VFORMAT_CARD_21) { 935 g_hash_table_insert(hooks->attributes, "Photo", handle_xml_photo_base64_attribute); 936 } else { 937 g_hash_table_insert(hooks->attributes, "Photo", handle_xml_photo_attribute); 938 } 939 921 940 if (root) 922 941 root = root->children; 923 942 while (root) { 924 xml_vcard_handle_attribute( (OSyncHookTables *)user_data, vcard, root, std_encoding);943 xml_vcard_handle_attribute(hooks, vcard, root, std_encoding); 925 944 root = root->next; 926 945 } … … 1048 1067 g_hash_table_insert(hooks->attributes, "Name", handle_xml_name_attribute); 1049 1068 g_hash_table_insert(hooks->attributes, "Agent", handle_xml_agent_attribute); 1050 g_hash_table_insert(hooks->attributes, "Photo", handle_xml_photo_attribute);1051 1069 g_hash_table_insert(hooks->attributes, "Birthday", handle_xml_birthday_attribute); 1052 1070 g_hash_table_insert(hooks->attributes, "Address", handle_xml_address_attribute);
