From 00abe54400f8e721a59a824f001baeb692714064 Mon Sep 17 00:00:00 2001 From: Steve Brokenshire Date: Sun, 31 Jan 2016 13:18:30 +0000 Subject: [PATCH] Added code to process ATTACH in CalendarTaskObject. --- source/objects/calendartask/CalendarTask.cpp | 62 ++++++++++++++++++++ 1 file changed, 62 insertions(+) diff --git a/source/objects/calendartask/CalendarTask.cpp b/source/objects/calendartask/CalendarTask.cpp index 6c082ab..7d118a8 100644 --- a/source/objects/calendartask/CalendarTask.cpp +++ b/source/objects/calendartask/CalendarTask.cpp @@ -811,5 +811,67 @@ void CalendarTaskObject::ProcessData(){ } } + + // Process the data from ATTACH. + + DataReceived = ProcessTextVectors(&ObjectName, &ObjectData, true, "ATTACH"); + + for(multimap::iterator iter = DataReceived.begin(); + iter != DataReceived.end(); + ++iter){ + + AttachListEncoding.push_back(""); + AttachListValue.push_back(""); + AttachListFormatType.push_back(""); + AttachListTokens.push_back(""); + AttachList.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 == "ENCODING"){ + + AttachListEncoding[ObjectSeekCount] = dataiter->second; + + } else if (dataiter->first == "VALUE"){ + + AttachListValue[ObjectSeekCount] = dataiter->second; + + } else if (dataiter->first == "FMTTYPE"){ + + AttachListFormatType[ObjectSeekCount] = dataiter->second; + + } else { + + if (TokenData == false){ + TokenData = true; + } else { + PropertyTokens += ";"; + } + + PropertyTokens += dataiter->first; + PropertyTokens += "="; + PropertyTokens += dataiter->second; + + } + + } + + if (PropertyTokens.size() > 0){ + AttachListTokens[ObjectSeekCount] = PropertyTokens; + } + + AttachList[ObjectSeekCount] = iter->second; + + ObjectSeekCount++; + + } } \ No newline at end of file -- 2.39.5