From 98e8bf0ff2f1cd4a08fbe9cbe5fbd63ea0e693cd Mon Sep 17 00:00:00 2001 From: David Woodhouse Date: Sat, 17 Jul 2010 10:36:51 +0100 Subject: [PATCH] Use ItemID for UID (needs more thought) --- ews2ical.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/ews2ical.c b/ews2ical.c index ee42e9e..44fef85 100644 --- a/ews2ical.c +++ b/ews2ical.c @@ -20,6 +20,7 @@ int process_location(xmlNode *xml_node); int process_body(xmlNode *xml_node); int process_subject(xmlNode *xml_node); int process_recurrence(xmlNode *xml_node); +int process_itemid(xmlNode *xmlnode); int main(int argc, char **argv) { @@ -143,6 +144,8 @@ int main(int argc, char **argv) process_subject(xml_node); else if (!strcmp((char *)xml_node->name, "Recurrence")) process_recurrence(xml_node); + else if (!strcmp((char *)xml_node->name, "ItemId")) + process_itemid(xml_node); else fprintf(stderr, "Unhandled node type '%s'\n", xml_node->name); } @@ -345,3 +348,14 @@ int process_recurrence(xmlNode *xml_node) } return -1; } + +int process_itemid(xmlNode *xml_node) +{ + const char *id = (char *)xmlGetProp(xml_node, (unsigned char *)"Id"); + if (!id) + return -1; + + fprintf(calfile, "UID:%s\n", id); + return 0; +} + -- 2.50.1