X-Git-Url: http://Server1/repobrowser/?a=blobdiff_plain;f=source%2Fobjects%2FCalDAV%2FCalDAV-XMLProcessing.cpp;h=8f39d860781769c56308f085cbebfc3cff6908e9;hb=9dcad69a6d44601369836cbc712d5eb228628139;hp=f84daed735c7b205b64367376b2f9cb761d7d0f0;hpb=3c82d9b1245400208b2d167683a82a39cdbc2689;p=xestiacalendar%2F.git diff --git a/source/objects/CalDAV/CalDAV-XMLProcessing.cpp b/source/objects/CalDAV/CalDAV-XMLProcessing.cpp index f84daed..8f39d86 100644 --- a/source/objects/CalDAV/CalDAV-XMLProcessing.cpp +++ b/source/objects/CalDAV/CalDAV-XMLProcessing.cpp @@ -49,6 +49,12 @@ string CalDAV::ProcessXMLUserPrincipal(){ } + if (NodeFound == false){ + + return UserPrincipalURI; + + } + // Look for response. if (NodeFound == false){ return UserPrincipalURI; } else { NodeFound = false; } @@ -113,6 +119,12 @@ string CalDAV::ProcessXMLCalendarHome(){ } + if (NodeFound == false){ + + return CalendarHomeURI; + + } + // Look for response. if (NodeFound == false){ return CalendarHomeURI; } else { NodeFound = false; } @@ -182,6 +194,12 @@ CalDAVCalendarList CalDAV::ProcessXMLCalendarList(){ } + if (NodeFound == false){ + + return CalendarList; + + } + for (NodeResponse = NodeSeek->children; NodeResponse != nullptr; NodeResponse = NodeResponse->next) @@ -333,6 +351,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 +374,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++; @@ -384,6 +417,12 @@ string CalDAV::ProcessXMLEntryETag(){ } + if (NodeFound == false){ + + return EntryETag; + + } + // Look for response. if (NodeFound == false){ return EntryETag; } else { NodeFound = false; }