From 94f930f1ac47da4c029794ef1f623417eb7a8d38 Mon Sep 17 00:00:00 2001 From: Steve Brokenshire Date: Wed, 27 Jan 2016 21:34:56 +0000 Subject: [PATCH] Added code to process RESOURCES in CalendarEventObject. --- .../objects/calendarevent/CalendarEvent.cpp | 59 +++++++++++++++++++ 1 file changed, 59 insertions(+) diff --git a/source/objects/calendarevent/CalendarEvent.cpp b/source/objects/calendarevent/CalendarEvent.cpp index c5f27b5..e13c34e 100644 --- a/source/objects/calendarevent/CalendarEvent.cpp +++ b/source/objects/calendarevent/CalendarEvent.cpp @@ -1335,5 +1335,64 @@ void CalendarEventObject::ProcessData(){ ObjectSeekCount++; } + + // Process the data from RESOURCES. + + DataReceived = ProcessTextVectors(&ObjectName, &ObjectData, true, "RESOURCES"); + + ObjectSeekCount = 0; + + for(multimap::iterator iter = DataReceived.begin(); + iter != DataReceived.end(); + ++iter){ + + ResourcesDataTokens.push_back(""); + ResourcesDataAltRep.push_back(""); + ResourcesDataLanguage.push_back(""); + ResourcesData.push_back(""); + + bool TokenData = false; + string PropertyTokens; + + PropertyNameData = (string*)&iter->first; + + PropertyData = SplitValues(*PropertyNameData); + + for(map::iterator dataiter = PropertyData.begin(); + dataiter != PropertyData.end(); dataiter++){ + + if (dataiter->first == "ALTREP"){ + + ResourcesDataAltRep[ObjectSeekCount] = dataiter->second; + + } else if (dataiter->first == "LANGUAGE"){ + + ResourcesDataLanguage[ObjectSeekCount] = dataiter->second; + + } else { + + if (TokenData == false){ + TokenData = true; + } else { + PropertyTokens += ";"; + } + + PropertyTokens += dataiter->first; + PropertyTokens += "="; + PropertyTokens += dataiter->second; + + } + + } + + if (PropertyTokens.size() > 0){ + ResourcesDataTokens[ObjectSeekCount] = PropertyTokens; + } + + ResourcesData[ObjectSeekCount] = iter->second; + + ObjectSeekCount++; + + } } -- 2.39.5