From 33c89915ad5772765d8c9633436d0e32bc6e0bc1 Mon Sep 17 00:00:00 2001 From: Steve Brokenshire Date: Wed, 27 Jan 2016 19:38:52 +0000 Subject: [PATCH] Added code to process CONTACT in CalendarEventObject. --- .../objects/calendarevent/CalendarEvent.cpp | 57 +++++++++++++++++++ 1 file changed, 57 insertions(+) diff --git a/source/objects/calendarevent/CalendarEvent.cpp b/source/objects/calendarevent/CalendarEvent.cpp index 4d4e7ea..5fe0cf0 100644 --- a/source/objects/calendarevent/CalendarEvent.cpp +++ b/source/objects/calendarevent/CalendarEvent.cpp @@ -1110,4 +1110,61 @@ void CalendarEventObject::ProcessData(){ } + DataReceived = ProcessTextVectors(&ObjectName, &ObjectData, true, "CONTACT"); + + ObjectSeekCount = 0; + + for(multimap::iterator iter = DataReceived.begin(); + iter != DataReceived.end(); + ++iter){ + + ContactListTokens.push_back(""); + ContactListAltRep.push_back(""); + ContactListLanguage.push_back(""); + ContactList.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"){ + + ContactListAltRep[ObjectSeekCount] = dataiter->second; + + } else if (dataiter->first == "LANGUAGE"){ + + ContactListLanguage[ObjectSeekCount] = dataiter->second; + + } else { + + if (TokenData == false){ + TokenData = true; + } else { + PropertyTokens += ";"; + } + + PropertyTokens += dataiter->first; + PropertyTokens += "="; + PropertyTokens += dataiter->second; + + } + + } + + if (PropertyTokens.size() > 0){ + ContactListTokens[ObjectSeekCount] = PropertyTokens; + } + + ContactList[ObjectSeekCount] = iter->second; + + ObjectSeekCount++; + + } + } -- 2.39.5