From: Steve Brokenshire Date: Sun, 31 Jan 2016 13:20:57 +0000 (+0000) Subject: Added code to process ATTENDEE in CalendarTaskObject. X-Git-Tag: release-0.02~533 X-Git-Url: http://Server1/repobrowser/?a=commitdiff_plain;h=cc561ed2efdbca37ddc4ec371e997514c411f387;p=xestiacalendar%2F.git Added code to process ATTENDEE in CalendarTaskObject. --- 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