]> www.infradead.org Git - users/dwmw2/ews-sync.git/commitdiff
Prepare for handling ModifiedOccurrences, by passing parent id and zone
authorDavid Woodhouse <dwmw2@infradead.org>
Wed, 21 Jul 2010 14:09:34 +0000 (15:09 +0100)
committerDavid Woodhouse <dwmw2@infradead.org>
Wed, 21 Jul 2010 14:09:34 +0000 (15:09 +0100)
calitem_to_ical.c
ews2ical.c
ews_syncfolder.c
libews.h

index 06130e0d4de09d5727b60691e6bea09e22c49d33..7967e72bdd99d612ea38305544e4d80b7cb6250f 100644 (file)
@@ -49,7 +49,8 @@ gboolean process_reminder_mins(icalcomponent *comp, xmlNode *xmlnode, GError **e
 icaltimezone *get_timezone(xmlNode *xmlnode, GError **error);
 icaltimezone *get_meeting_timezone(xmlNode *xml_node, GError **error);
 
-icalcomponent *ews_calitem_to_ical(xmlNode *xml_node, GError **error)
+icalcomponent *ews_calitem_to_ical(xmlNode *xml_node, const gchar *parent_id,
+                                  icaltimezone *parent_zone, GError **error)
 {
        icaltimetype dtstart, dtend;
        icaltimetype *deletia = NULL;
index c6dcd9083519dba87ddcca122f07099b6703d485..ab5e13dc951c9a7f5fc4fae3f08235c70b33e232 100644 (file)
@@ -129,7 +129,7 @@ int main(int argc, char **argv)
                return -1;
        }
 
-       calcomp = ews_calitem_to_ical(xml_node, &error);
+       calcomp = ews_calitem_to_ical(xml_node, NULL, NULL, &error);
 
        if (!calcomp) {
                fprintf(stderr, "Failed to convert: %s\n", error->message);
index ac3ff2401b9fb16d2ce63b8906b8b1523c3464a9..1bfa02b15d7da35978d49288ca0347dd10be5795 100644 (file)
@@ -24,7 +24,8 @@ struct item_change {
 
 int process_changes(xmlNode *node, struct item_change **changes);
 int fetch_xml_item(SoupSession *sess, char *url, const char *itemid,
-                  const char *xml_filename, const char *ics_filename);
+                  const char *xml_filename, const char *ics_filename,
+                  const char *parent_id, icaltimezone *parent_zone);
 
 struct ews_auth {
        const char *username;
@@ -234,7 +235,8 @@ int main(int argc, char **argv)
                        unlink(ics_filename);
                } else {
                        if (fetch_xml_item(sess, url, this->itemid,
-                                          xml_filename, ics_filename))
+                                          xml_filename, ics_filename,
+                                          NULL, NULL))
                                return -1;
                }
                changes = this->next;
@@ -247,7 +249,8 @@ int main(int argc, char **argv)
 }
 
 int fetch_xml_item(SoupSession *sess, char *url, const char *itemid,
-                  const char *xml_filename, const char *ics_filename)
+                  const char *xml_filename, const char *ics_filename,
+                  const char *parent_id, icaltimezone *parent_zone)
 {
        GError *error = NULL;
        SoupMessage *msg;
@@ -392,7 +395,7 @@ int fetch_xml_item(SoupSession *sess, char *url, const char *itemid,
                exit (1);
        }
 
-       calcomp = ews_calitem_to_ical(node, &error);
+       calcomp = ews_calitem_to_ical(node, parent_id, parent_zone, &error);
        if (!calcomp) {
                printf("Failed to parse calendar: %s\n", error->message);
                g_clear_error(&error);
index ee07c270df267a038b84251e5a961026a8c87c83..d969ba9e3226c8bc63cb92797eee59a7d4e4a0c3 100644 (file)
--- a/libews.h
+++ b/libews.h
@@ -26,7 +26,8 @@
 #include <glib/gerror.h>
 #include <glib/gquark.h>
 
-icalcomponent *ews_calitem_to_ical(xmlNode *xml_node, GError **error);
+icalcomponent *ews_calitem_to_ical(xmlNode *xml_node, const char *parent_id,
+                                  icaltimezone *parent_zone, GError **error);
 
 #define EWS_ERROR (ews_error_quark())