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;
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);
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;
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;
}
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;
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);
#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())