From: Steve Brokenshire Date: Sun, 31 Jan 2016 12:18:46 +0000 (+0000) Subject: Added code to process RECURRENCE-ID in CalendarTaskObject. X-Git-Tag: release-0.02~555 X-Git-Url: http://Server1/repobrowser/?a=commitdiff_plain;h=71b478b347435a544d2787596fe3fc60a16f8772;p=xestiacalendar%2F.git Added code to process RECURRENCE-ID in CalendarTaskObject. --- diff --git a/source/objects/calendartask/CalendarTask.cpp b/source/objects/calendartask/CalendarTask.cpp index 4a0fa1d..79742f3 100644 --- a/source/objects/calendartask/CalendarTask.cpp +++ b/source/objects/calendartask/CalendarTask.cpp @@ -527,4 +527,58 @@ void CalendarTaskObject::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