From: Steve Brokenshire Date: Wed, 27 Jan 2016 19:38:52 +0000 (+0000) Subject: Added code to process CONTACT in CalendarEventObject. X-Git-Tag: release-0.02~631 X-Git-Url: http://Server1/repobrowser/?a=commitdiff_plain;h=33c89915ad5772765d8c9633436d0e32bc6e0bc1;p=xestiacalendar%2F.git Added code to process CONTACT in CalendarEventObject. --- 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++; + + } + }