From d88f564c6f9423279dff9fece3e8310029e2884e Mon Sep 17 00:00:00 2001 From: Steve Brokenshire Date: Mon, 25 Jan 2016 20:25:32 +0000 Subject: [PATCH] Added code to process DTEND in CalendarEventObject. --- .../objects/calendarevent/CalendarEvent.cpp | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/source/objects/calendarevent/CalendarEvent.cpp b/source/objects/calendarevent/CalendarEvent.cpp index 42b1a33..0623177 100644 --- a/source/objects/calendarevent/CalendarEvent.cpp +++ b/source/objects/calendarevent/CalendarEvent.cpp @@ -755,4 +755,56 @@ void CalendarEventObject::ProcessData(){ } + // Process the data from DTEND. + + bool DateTimeEndProcessed = false; + + DataReceived = ProcessTextVectors(&ObjectName, &ObjectData, false, "DTEND"); + + if (DataReceived.begin() != DataReceived.end()){ + + bool TokenData = false; + string PropertyTokens; + + PropertyNameData = (string*)&DataReceived.begin()->first; + + PropertyData = SplitValues(*PropertyNameData); + + for(map::iterator iter = PropertyData.begin(); + iter != PropertyData.end(); iter++){ + + if (iter->first == "VALUE"){ + + DateTimeEndDataValue = iter->second; + + } else if (iter->first == "TZID"){ + + DateTimeEndDataTimeZoneID = iter->second; + + } else { + + if (TokenData == false){ + TokenData = true; + } else { + PropertyTokens += ";"; + } + + PropertyTokens += iter->first; + PropertyTokens += "="; + PropertyTokens += iter->second; + + } + + } + + if (PropertyTokens.size() > 0){ + DateTimeEndDataTokens = PropertyTokens; + } + + DateTimeEndData = DataReceived.begin()->second; + + DateTimeEndProcessed = true; + + } + } -- 2.39.5