From 8c01f1bbe2370ea38e1bc881279b51778c66389c Mon Sep 17 00:00:00 2001 From: Steve Brokenshire Date: Sun, 24 Jan 2016 11:54:26 +0000 Subject: [PATCH] Added code to process SUMMARY in CalendarEventObject. --- .../objects/calendarevent/CalendarEvent.cpp | 50 +++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/source/objects/calendarevent/CalendarEvent.cpp b/source/objects/calendarevent/CalendarEvent.cpp index c94152e..abc34fd 100644 --- a/source/objects/calendarevent/CalendarEvent.cpp +++ b/source/objects/calendarevent/CalendarEvent.cpp @@ -597,4 +597,54 @@ void CalendarEventObject::ProcessData(){ } + // Process the data from SUMMARY. + + DataReceived = ProcessTextVectors(&ObjectName, &ObjectData, false, "SUMMARY"); + + 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 == "ALTREP"){ + + SummaryDataAltRep = iter->second; + + } else if (iter->first == "LANGUAGE"){ + + SummaryDataLanguage = iter->second; + + } else { + + if (TokenData == false){ + TokenData = true; + } else { + PropertyTokens += ";"; + } + + PropertyTokens += iter->first; + PropertyTokens += "="; + PropertyTokens += iter->second; + + } + + } + + if (PropertyTokens.size() > 0){ + + SummaryDataTokens = PropertyTokens; + + } + + SummaryData = DataReceived.begin()->second; + + } + } -- 2.39.5