From 786587629e3713d4735700e52992b3800592b834 Mon Sep 17 00:00:00 2001 From: Steve Brokenshire Date: Sun, 31 Jan 2016 15:14:32 +0000 Subject: [PATCH] Added code to process the CONTACT property in CalendarJournalObject. --- .../calendarjournal/CalendarJournal.cpp | 59 +++++++++++++++++++ 1 file changed, 59 insertions(+) diff --git a/source/objects/calendarjournal/CalendarJournal.cpp b/source/objects/calendarjournal/CalendarJournal.cpp index 2aa9857..9ce0ff0 100644 --- a/source/objects/calendarjournal/CalendarJournal.cpp +++ b/source/objects/calendarjournal/CalendarJournal.cpp @@ -818,4 +818,63 @@ void CalendarJournalObject::ProcessData(){ } + // Process the data from CONTACT. + + 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++; + + } + } \ No newline at end of file -- 2.39.5