Hi list,

we added support for configurable frontends like KDEPIM and EVOLUTION.
You have to call e.g. rra_frontend_set(ID_FRONTEND_KDEPIM) from your syncing 
app, ID_FRONTEND_UNKNOWN is default.

With that help we can add support for non-standard fields without colliding.
It's fairly easy to extend:

synce_ids.h holds the IDs and in contact.c one has to put the code at two 
positions, e.g.

in rra_contact_to_vcard2()
-----------------------------------------------------------------------
 case ID_MESSAGING_ICQ:
   switch(rra_frontend_get())
   {
     case ID_FRONTEND_KDEPIM:
       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);
     default:
       synce_warning("Field with ID %04x not supported by frontend %u", 
pFields[i].propid >> 16, rra_frontend_get());
       break;
   }
   break;
-----------------------------------------------------------------------

in parser_handle_field()
-----------------------------------------------------------------------
 else if (rra_frontend_get()==ID_FRONTEND_KDEPIM && STR_EQUAL(name, 
"X-messaging/icq-All"))
 {
   add_string(parser, INDEX_MESSAGING_ICQ, type, value);
 }
-----------------------------------------------------------------------

Don't forget to add new IDs also to field_index and field_id.

rgds
-- 
 e-Trolley Sayegh & John, Nabil Sayegh
 Tel.: 0700 etrolley /// 0700 38765539
 Fax.: +49 69 8299381-8
 PGP : www.e-trolley.de


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Synce-devel mailing list
Synce-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synce-devel

Reply via email to