From 8f9515022e604522ce60c41a0c062f76c16e4a3d Mon Sep 17 00:00:00 2001 From: Steve Brokenshire Date: Wed, 27 Jan 2016 22:10:28 +0000 Subject: [PATCH] Added code to process RDATE 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 e13c34e..4cda82d 100644 --- a/source/objects/calendarevent/CalendarEvent.cpp +++ b/source/objects/calendarevent/CalendarEvent.cpp @@ -1395,4 +1395,63 @@ void CalendarEventObject::ProcessData(){ } + // Process the data from RDATE. + + DataReceived = ProcessTextVectors(&ObjectName, &ObjectData, true, "RDATE"); + + ObjectSeekCount = 0; + + for(multimap::iterator iter = DataReceived.begin(); + iter != DataReceived.end(); + ++iter){ + + RecurranceDateDataTokens.push_back(""); + RecurranceDateDataValue.push_back(""); + RecurranceDateDataTimeZoneParam.push_back(""); + RecurranceDateData.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"){ + + RecurranceDateDataValue[ObjectSeekCount] = dataiter->second; + + } else if (dataiter->first == "TZID"){ + + RecurranceDateDataTimeZoneParam[ObjectSeekCount] = dataiter->second; + + } else { + + if (TokenData == false){ + TokenData = true; + } else { + PropertyTokens += ";"; + } + + PropertyTokens += dataiter->first; + PropertyTokens += "="; + PropertyTokens += dataiter->second; + + } + + } + + if (PropertyTokens.size() > 0){ + RecurranceDateDataTokens[ObjectSeekCount] = PropertyTokens; + } + + RecurranceDateData[ObjectSeekCount] = iter->second; + + ObjectSeekCount++; + + } + } -- 2.39.5