From: Steve Brokenshire Date: Wed, 27 Jan 2016 20:02:09 +0000 (+0000) Subject: Added code to process EXDATE in CalendarEventObject. X-Git-Tag: release-0.02~624 X-Git-Url: http://Server1/repobrowser/?a=commitdiff_plain;h=0ca3fe3a49564321b6bc41d4d780f25966c20236;p=xestiacalendar%2F.git Added code to process EXDATE in CalendarEventObject. --- diff --git a/source/objects/calendarevent/CalendarEvent.cpp b/source/objects/calendarevent/CalendarEvent.cpp index ef2d1ea..166e239 100644 --- a/source/objects/calendarevent/CalendarEvent.cpp +++ b/source/objects/calendarevent/CalendarEvent.cpp @@ -1169,4 +1169,63 @@ void CalendarEventObject::ProcessData(){ } + // Process the data from EXDATE. + + DataReceived = ProcessTextVectors(&ObjectName, &ObjectData, true, "EXDATE"); + + ObjectSeekCount = 0; + + for(multimap::iterator iter = DataReceived.begin(); + iter != DataReceived.end(); + ++iter){ + + ExcludeDateDataTokens.push_back(""); + ExcludeDateDataValue.push_back(""); + ExcludeDateDataTimeZoneParam.push_back(""); + ExcludeDateData.push_back(""); + + bool TokenData = false; + string PropertyTokens; + + PropertyNameData = (string*)&iter->first; + + PropertyData = SplitValues(*PropertyNameData); + + for(map::iterator dataiter = PropertyData.begin(); + dataiter != PropertyData.end(); dataiter++){ + + if (dataiter->first == "VALUE"){ + + ExcludeDateDataValue[ObjectSeekCount] = dataiter->second; + + } else if (dataiter->first == "TZID"){ + + ExcludeDateDataTimeZoneParam[ObjectSeekCount] = dataiter->second; + + } else { + + if (TokenData == false){ + TokenData = true; + } else { + PropertyTokens += ";"; + } + + PropertyTokens += dataiter->first; + PropertyTokens += "="; + PropertyTokens += dataiter->second; + + } + + } + + if (PropertyTokens.size() > 0){ + ExcludeDateDataTokens[ObjectSeekCount] = PropertyTokens; + } + + ExcludeDateData[ObjectSeekCount] = iter->second; + + ObjectSeekCount++; + + } + }