From bdb4703c0b58dabb95a21bc62541514708ddd641 Mon Sep 17 00:00:00 2001 From: Steve Brokenshire Date: Sun, 24 Jan 2016 14:32:57 +0000 Subject: [PATCH] Added code to process RECURRENCE-ID in CalendarEventObject. --- .../objects/calendarevent/CalendarEvent.cpp | 54 +++++++++++++++++++ 1 file changed, 54 insertions(+) diff --git a/source/objects/calendarevent/CalendarEvent.cpp b/source/objects/calendarevent/CalendarEvent.cpp index df686a4..55d9604 100644 --- a/source/objects/calendarevent/CalendarEvent.cpp +++ b/source/objects/calendarevent/CalendarEvent.cpp @@ -701,4 +701,58 @@ void CalendarEventObject::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; + + } + } -- 2.39.5