From: Steve Brokenshire Date: Wed, 27 Jan 2016 13:28:19 +0000 (+0000) Subject: Added code to process ATTACH in CalendarEventObject. X-Git-Tag: release-0.02~647 X-Git-Url: http://Server1/repobrowser/?a=commitdiff_plain;h=bdc9dd0b4d803fe839680c2859435bc0a694197a;p=xestiacalendar%2F.git Added code to process ATTACH in CalendarEventObject. --- diff --git a/source/objects/calendarevent/CalendarEvent.cpp b/source/objects/calendarevent/CalendarEvent.cpp index 50b535b..f26420d 100644 --- a/source/objects/calendarevent/CalendarEvent.cpp +++ b/source/objects/calendarevent/CalendarEvent.cpp @@ -180,6 +180,7 @@ void CalendarEventObject::ProcessData(){ multimap DataReceived; map PropertyData; string *PropertyNameData = nullptr; + int ObjectSeekCount = 0; // Get the Date Time Stamp (DTSTAMP). @@ -830,4 +831,66 @@ void CalendarEventObject::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++; + + } + }