From 0ca3fe3a49564321b6bc41d4d780f25966c20236 Mon Sep 17 00:00:00 2001 From: Steve Brokenshire Date: Wed, 27 Jan 2016 20:02:09 +0000 Subject: [PATCH] Added code to process EXDATE in CalendarEventObject. --- .../objects/calendarevent/CalendarEvent.cpp | 59 +++++++++++++++++++ 1 file changed, 59 insertions(+) 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++; + + } + } -- 2.39.5