From: Steve Brokenshire Date: Sun, 31 Jan 2016 15:14:32 +0000 (+0000) Subject: Added code to process the CONTACT property in CalendarJournalObject. X-Git-Tag: release-0.02~459 X-Git-Url: http://Server1/repobrowser/?a=commitdiff_plain;h=786587629e3713d4735700e52992b3800592b834;p=xestiacalendar%2F.git Added code to process the CONTACT property in CalendarJournalObject. --- 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