]> www.infradead.org Git - users/dwmw2/ews-sync.git/commitdiff
Use ItemID for UID (needs more thought)
authorDavid Woodhouse <dwmw2@infradead.org>
Sat, 17 Jul 2010 09:36:51 +0000 (10:36 +0100)
committerDavid Woodhouse <dwmw2@infradead.org>
Sat, 17 Jul 2010 09:36:51 +0000 (10:36 +0100)
ews2ical.c

index ee42e9ed78963d62661a734bb181249ab399fd7c..44fef85749a10c79feb8a592db6d407f79ebedf5 100644 (file)
@@ -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;
+}
+