From 1272e892e053988a208bb841b05b2ac7adde6eca Mon Sep 17 00:00:00 2001 From: Steve Brokenshire Date: Sun, 31 Jan 2016 15:08:28 +0000 Subject: [PATCH] Added code to process the ATTENDEE property in CalendarJournalObject. --- .../calendarjournal/CalendarJournal.cpp | 104 ++++++++++++++++++ 1 file changed, 104 insertions(+) diff --git a/source/objects/calendarjournal/CalendarJournal.cpp b/source/objects/calendarjournal/CalendarJournal.cpp index f174df3..6f87e50 100644 --- a/source/objects/calendarjournal/CalendarJournal.cpp +++ b/source/objects/calendarjournal/CalendarJournal.cpp @@ -601,4 +601,108 @@ void CalendarJournalObject::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