From 7a9f77048947cd2affd136f97aba1e16e27806d4 Mon Sep 17 00:00:00 2001 From: Steve Brokenshire Date: Mon, 2 May 2016 09:20:31 +0100 Subject: [PATCH] When processing calendars, attempt to get the sync-token. --- source/objects/CalDAV/CalDAV-XMLProcessing.cpp | 15 +++++++++++++++ source/objects/CalDAV/CalDAV.h | 3 +++ 2 files changed, 18 insertions(+) diff --git a/source/objects/CalDAV/CalDAV-XMLProcessing.cpp b/source/objects/CalDAV/CalDAV-XMLProcessing.cpp index f84daed..239afe7 100644 --- a/source/objects/CalDAV/CalDAV-XMLProcessing.cpp +++ b/source/objects/CalDAV/CalDAV-XMLProcessing.cpp @@ -333,6 +333,20 @@ CalDAVCalendarList CalDAV::ProcessXMLCalendarList(){ } + // Get the calendar tag URL. + + NodeData = xmlCopyNode(NodeMatch, 1); + + string CalendarTagURL = ""; + + if (!MatchXMLNameTransverse(&NodeData, "propstat")){ continue; } + if (!MatchXMLNameTransverse(&NodeData, "prop")){ continue; } + if (MatchXMLNameTransverse(&NodeData, "sync-token")){ + + CalendarTagURL = FetchXMLData(&NodeData); + + } + // Insert the calendar information into the // list if all the information is there. @@ -342,6 +356,7 @@ CalDAVCalendarList CalDAV::ProcessXMLCalendarList(){ CalendarList.CalColour.insert(make_pair(ResponseCount, CalendarColour)); CalendarList.Order.insert(make_pair(ResponseCount, CalendarOrder)); CalendarList.Tag.insert(make_pair(ResponseCount, CalendarTag)); + CalendarList.TagURL.insert(make_pair(ResponseCount, CalendarTagURL)); ResponseCount++; diff --git a/source/objects/CalDAV/CalDAV.h b/source/objects/CalDAV/CalDAV.h index f237669..332c91e 100644 --- a/source/objects/CalDAV/CalDAV.h +++ b/source/objects/CalDAV/CalDAV.h @@ -51,6 +51,9 @@ struct CalDAVCalendarList { map Description; map CalColour; map Tag; + map TagURL; + +}; }; -- 2.39.5