From 341bc7235d3f4689385a7dc70c60e3ff04016ad4 Mon Sep 17 00:00:00 2001 From: Steve Brokenshire Date: Sun, 31 Jan 2016 18:10:55 +0000 Subject: [PATCH] Added code to process the DTEND property in CalendarFreeBusyObject. --- .../calendarfreebusy/CalendarFreeBusy.cpp | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/source/objects/calendarfreebusy/CalendarFreeBusy.cpp b/source/objects/calendarfreebusy/CalendarFreeBusy.cpp index 1077392..02b7ade 100644 --- a/source/objects/calendarfreebusy/CalendarFreeBusy.cpp +++ b/source/objects/calendarfreebusy/CalendarFreeBusy.cpp @@ -295,4 +295,56 @@ void CalendarFreeBusyObject::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; + + } + } \ No newline at end of file -- 2.39.2