From cc561ed2efdbca37ddc4ec371e997514c411f387 Mon Sep 17 00:00:00 2001 From: Steve Brokenshire Date: Sun, 31 Jan 2016 13:20:57 +0000 Subject: [PATCH] Added code to process ATTENDEE in CalendarTaskObject. --- source/objects/calendartask/CalendarTask.cpp | 105 +++++++++++++++++++ 1 file changed, 105 insertions(+) diff --git a/source/objects/calendartask/CalendarTask.cpp b/source/objects/calendartask/CalendarTask.cpp index 7d118a8..852e769 100644 --- a/source/objects/calendartask/CalendarTask.cpp +++ b/source/objects/calendartask/CalendarTask.cpp @@ -874,4 +874,109 @@ void CalendarTaskObject::ProcessData(){ } + // Process the data from ATTENDEE. + + DataReceived = ProcessTextVectors(&ObjectName, &ObjectData, true, "ATTENDEE"); + + ObjectSeekCount = 0; + + for(multimap::iterator iter = DataReceived.begin(); + iter != DataReceived.end(); + ++iter){ + + AttendeeListMember.push_back(""); + AttendeeListDelegatedFrom.push_back(""); + AttendeeListDelegatedTo.push_back(""); + AttendeeListRole.push_back(""); + AttendeeListRSVP.push_back(""); + AttendeeListDirectoryEntry.push_back(""); + AttendeeListSentBy.push_back(""); + AttendeeListCommonName.push_back(""); + AttendeeListCalendarUserType.push_back(""); + AttendeeListParticipationStatus.push_back(""); + AttendeeListLanguage.push_back(""); + AttendeeListTokens.push_back(""); + AttendeeList.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 == "CUTYPE"){ + + AttendeeListCalendarUserType[ObjectSeekCount] = dataiter->second; + + } else if (dataiter->first == "MEMBER"){ + + AttendeeListMember[ObjectSeekCount] = dataiter->second; + + } else if (dataiter->first == "ROLE"){ + + AttendeeListRole[ObjectSeekCount] = dataiter->second; + + } else if (dataiter->first == "PARTSTAT"){ + + AttendeeListParticipationStatus[ObjectSeekCount] = dataiter->second; + + } else if (dataiter->first == "RSVP"){ + + AttendeeListRSVP[ObjectSeekCount] = dataiter->second; + + } else if (dataiter->first == "DELEGATED-TO"){ + + AttendeeListDelegatedTo[ObjectSeekCount] = dataiter->second; + + } else if (dataiter->first == "DELEGATED-FROM"){ + + AttendeeListDelegatedFrom[ObjectSeekCount] = dataiter->second; + + } else if (dataiter->first == "SENT-BY"){ + + AttendeeListSentBy[ObjectSeekCount] = dataiter->second; + + } else if (dataiter->first == "CN"){ + + AttendeeListCommonName[ObjectSeekCount] = dataiter->second; + + } else if (dataiter->first == "DIR"){ + + AttendeeListDirectoryEntry[ObjectSeekCount] = dataiter->second; + + } else if (dataiter->first == "LANGUAGE"){ + + AttendeeListLanguage[ObjectSeekCount] = dataiter->second; + + } else { + + if (TokenData == false){ + TokenData = true; + } else { + PropertyTokens += ";"; + } + + PropertyTokens += dataiter->first; + PropertyTokens += "="; + PropertyTokens += dataiter->second; + + } + + } + + if (PropertyTokens.size() > 0){ + AttendeeListTokens[ObjectSeekCount] = PropertyTokens; + } + + AttendeeList[ObjectSeekCount] = iter->second; + + ObjectSeekCount++; + + } + + } \ No newline at end of file -- 2.39.5