From: Gaetan Bisson Date: Tue, 26 Nov 2013 20:34:11 +0000 (+0100) Subject: vcard built-in import: support of the BDAY (anniversary) vcard field X-Git-Tag: upstream/0.6.1~2^2~12 X-Git-Url: https://git.deb.at/w?a=commitdiff_plain;h=41864407018fedd409811621041aab12153cc89a;p=pkg%2Fabook.git vcard built-in import: support of the BDAY (anniversary) vcard field vcard export: output BDAY and NICK vcard fields --- diff --git a/filter.c b/filter.c index 7f8bcd5..dca51b8 100644 --- a/filter.c +++ b/filter.c @@ -1557,8 +1557,9 @@ static char *vcard_fields[] = { "NICKNAME", /* NICK */ "URL", /* URL */ "NOTE", /* NOTES */ + "BDAY", /* ANNIVERSARY */ "N", /* NAME: special case/mapping in vcard_parse_line() */ - NULL /* not implemented: ANNIVERSARY, ITEM_FIELDS */ + NULL /* ITEM_FIELDS */ }; enum { @@ -2065,6 +2066,13 @@ vcard_export_item(FILE *out, int item) free(name); + if(db_fget(item, NICK)) + fprintf(out, "NICKNAME:%s\r\n", + safe_str(db_fget(item, NICK))); + if(db_fget(item, ANNIVERSARY)) + fprintf(out, "BDAY:%s\r\n", + safe_str(db_fget(item, ANNIVERSARY))); + // see rfc6350 section 6.3.1 if(db_fget(item, ADDRESS)) { fprintf(out, "ADR:;%s;%s;%s;%s;%s;%s\r\n",