From 07f3d2ea4433b295e06d03c569757579b332118a Mon Sep 17 00:00:00 2001 From: Steve Brokenshire Date: Sun, 31 Jan 2016 14:49:55 +0000 Subject: [PATCH] Added code to process the RECURRENCE-ID property in CalendarJournalObject. --- .../calendarjournal/CalendarJournal.cpp | 54 +++++++++++++++++++ 1 file changed, 54 insertions(+) diff --git a/source/objects/calendarjournal/CalendarJournal.cpp b/source/objects/calendarjournal/CalendarJournal.cpp index 8a70db0..a6e3ddc 100644 --- a/source/objects/calendarjournal/CalendarJournal.cpp +++ b/source/objects/calendarjournal/CalendarJournal.cpp @@ -329,4 +329,58 @@ void CalendarJournalObject::ProcessData(){ } + // Process the data from RECURRENCE-ID. + + DataReceived = ProcessTextVectors(&ObjectName, &ObjectData, false, "RECURRENCE-ID"); + + 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 == "TZID"){ + + RecurranceIDDataTimeZoneParam = iter->second; + + } else if (iter->first == "VALUE"){ + + RecurranceIDDataValue = iter->second; + + } else if (iter->first == "RANGE"){ + + RecurranceIDDataRangeParam = iter->second; + + } else { + + if (TokenData == false){ + TokenData = true; + } else { + PropertyTokens += ";"; + } + + PropertyTokens += iter->first; + PropertyTokens += "="; + PropertyTokens += iter->second; + + } + + } + + if (PropertyTokens.size() > 0){ + + RecurranceIDDataTokens = PropertyTokens; + + } + + RecurranceIDData = DataReceived.begin()->second; + + } + } \ No newline at end of file -- 2.39.2