Am Montag 07 November 2005 15:30 schrieb Sergio CERLESI: > Hi, > > > All fields that have to be dropped should be saved in additional fields, > > so that they don't get lost when re-syncing, but you don't need to take > > care of this ATM, I'm working on this already. > > Can I help you to do it ? Or, if you already have a pre-release patch > can I test it on my system ?
Of course! Help is always apreciated. see attachement. The patch does not yet involve storing of dropped values like 4th email etc. ATM it stores fields that can't be handled by the device at all, namely Instant Messaging (ICQ). Unfortunately evolution and kabc (kaddressbook) have their own X-special fields, so we need to find a mechanism, that these aren't duplicated/mixed up leading to the known data corruption. I implemented X-messaging/PROTOCOL:VALUE; for kde so far. What shall we do for evolution? It would be nice, if we could use the same ID_MESSAGING_* > > if you use IRC you can join us in channel #synce at freenode. > > I'm conneting as cerly. see you there -- e-Trolley Sayegh & John, Nabil Sayegh Tel.: 0700 etrolley /// 0700 38765539 Fax.: +49 69 8299381-8 PGP : www.e-trolley.de
diff -NuriwbB -X exclude.txt rra/lib/contact.c rra-blob0067_uid_kludge./lib/contact.c --- rra/lib/contact.c 2005-11-02 14:44:13.000000000 +0100 +++ rra-blob0067_uid_kludge./lib/contact.c 2005-10-27 21:29:32.000000000 +0200 @@ -1,7 +1,8 @@ -/* $Id: contact.c,v 1.25 2005/11/02 13:44:13 twogood Exp $ */ +/* $Id: contact.c,v 1.24 2005/10/13 17:40:36 twogood Exp $ */ #define _GNU_SOURCE 1 #include "contact.h" #include "contact_ids.h" +#include "synce_ids.h" #include "strbuf.h" #include "dbstream.h" #include "strv.h" @@ -514,6 +515,55 @@ strbuf_append_escaped_wstr(vcard, pFields[i].val.lpwstr, flags); strbuf_append_crlf(vcard); break; +#if 0 + case ID_MESSAGING: + synce_warning("ID_MESSAGING"); + strbuf_append(vcard, "X-messaging"); + strbuf_append_escaped_wstr(vcard, pFields[i].val.lpwstr, flags); + strbuf_append_crlf(vcard); + break; +#endif + case ID_IMADDRESS: + synce_warning("ID_IMADDRESS"); + strbuf_append(vcard, "X-KADDRESSBOOK-X-IMAddress:"); + strbuf_append_escaped_wstr(vcard, pFields[i].val.lpwstr, flags); + strbuf_append_crlf(vcard); + break; + + case ID_MESSAGING_ICQ: + synce_warning("ID_MESSAGING_ICQ"); + strbuf_append(vcard, "X-messaging/icq-All:"); + strbuf_append_escaped_wstr(vcard, pFields[i].val.lpwstr, flags); + strbuf_append_crlf(vcard); + break; + + case ID_MESSAGING_XMPP: + synce_warning("ID_MESSAGING_XMPP"); + strbuf_append(vcard, "X-messaging/xmpp-All:"); + strbuf_append_escaped_wstr(vcard, pFields[i].val.lpwstr, flags); + strbuf_append_crlf(vcard); + break; + + case ID_MESSAGING_MSN: + synce_warning("ID_MESSAGING_MSN"); + strbuf_append(vcard, "X-messaging/msn-All:"); + strbuf_append_escaped_wstr(vcard, pFields[i].val.lpwstr, flags); + strbuf_append_crlf(vcard); + break; + + case ID_MESSAGING_GADU: + synce_warning("ID_MESSAGING_GADU"); + strbuf_append(vcard, "X-messaging/gadu-All:"); + strbuf_append_escaped_wstr(vcard, pFields[i].val.lpwstr, flags); + strbuf_append_crlf(vcard); + break; + + case ID_NICKNAME: + synce_warning("ID_NICKNAME"); + strbuf_append(vcard, "NICKNAME:"); + strbuf_append_escaped_wstr(vcard, pFields[i].val.lpwstr, flags); + strbuf_append_crlf(vcard); + break; default: synce_warning("Did not handle field with ID %04x", pFields[i].propid >> 16); @@ -1118,6 +1160,40 @@ { add_string(parser, ID_OFFICE_LOC, type, value); } +#if 0 + else if (STR_IN_STR(name, "X-messaging/")) + { + /* guess we need no more then 256 bytes */ + char new_value[256]; + /* name+11 is the "/", that we know is there */ + snprintf(new_value, 256, "%s:%s", name+11, value); + add_string(parser, ID_MESSAGING, type, new_value); + } +#endif + else if (STR_EQUAL(name, "X-KADDRESSBOOK-X-IMAddress")) + { + add_string(parser, ID_IMADDRESS, type, value); + } + else if (STR_EQUAL(name, "X-messaging/icq-All")) + { + add_string(parser, ID_MESSAGING_ICQ, type, value); + } + else if (STR_EQUAL(name, "X-messaging/xmpp-All")) + { + add_string(parser, ID_MESSAGING_XMPP, type, value); + } + else if (STR_EQUAL(name, "X-messaging/msn-All")) + { + add_string(parser, ID_MESSAGING_MSN, type, value); + } + else if (STR_EQUAL(name, "X-messaging/gadu-All")) + { + add_string(parser, ID_MESSAGING_GADU, type, value); + } + else if (STR_EQUAL(name, "NICKNAME")) + { + add_string(parser, ID_NICKNAME, type, value); + } #if 0 else if (STR_EQUAL(name, "")) diff -NuriwbB -X exclude.txt rra/lib/synce_ids.h rra-blob0067_uid_kludge./lib/synce_ids.h --- rra/lib/synce_ids.h 1970-01-01 01:00:00.000000000 +0100 +++ rra-blob0067_uid_kludge./lib/synce_ids.h 2005-10-27 21:19:21.000000000 +0200 @@ -0,0 +1,14 @@ +/* */ +#ifndef __synce_ids_h__ +#define __synce_ids_h__ + +#define SYNCE_ID_BASE 0xd000 +#define ID_IMADDRESS (SYNCE_ID_BASE+0) +#define ID_NICKNAME (SYNCE_ID_BASE+1) +#define ID_MESSAGING_ICQ (SYNCE_ID_BASE+2) +#define ID_MESSAGING_XMPP (SYNCE_ID_BASE+3) +#define ID_MESSAGING_MSN (SYNCE_ID_BASE+4) +#define ID_MESSAGING_GADU (SYNCE_ID_BASE+5) + +#endif +