From 779e0466c771b6a3f3b9a448ecf13d0483555100 Mon Sep 17 00:00:00 2001 From: Steve Brokenshire Date: Sun, 24 Jan 2016 10:21:30 +0000 Subject: [PATCH] Added code to process ORGANIZER in CalendarEventObject. --- .../objects/calendarevent/CalendarEvent.cpp | 58 +++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/source/objects/calendarevent/CalendarEvent.cpp b/source/objects/calendarevent/CalendarEvent.cpp index 5331fb3..c6d7a0d 100644 --- a/source/objects/calendarevent/CalendarEvent.cpp +++ b/source/objects/calendarevent/CalendarEvent.cpp @@ -445,4 +445,62 @@ void CalendarEventObject::ProcessData(){ } + // Process the data from ORGANIZER. + + DataReceived = ProcessTextVectors(&ObjectName, &ObjectData, false, "ORGANIZER"); + + if (DataReceived.begin() != DataReceived.end()){ + + bool TokenData = false; + string PropertyTokens; + + PropertyNameData = (string*)&DataReceived.begin()->first; + + PropertyData = SplitValues(*PropertyNameData); + + for(map::iterator iter = PropertyData.begin(); + iter != PropertyData.end(); iter++){ + + if (iter->first == "CN"){ + + OrganiserDataCommonName = iter->second; + + } else if (iter->first == "DIR"){ + + OrganiserDataDirectoryEntry = iter->second; + + } else if (iter->first == "SENT-BY"){ + + OrganiserDataSentByParam = iter->second; + + } else if (iter->first == "LANGUAGE"){ + + OrganiserDataLanguage = iter->second; + + } else { + + if (TokenData == false){ + TokenData = true; + } else { + PropertyTokens += ";"; + } + + PropertyTokens += iter->first; + PropertyTokens += "="; + PropertyTokens += iter->second; + + } + + } + + if (PropertyTokens.size() > 0){ + + OrganiserDataTokens = PropertyTokens; + + } + + OrganiserData = DataReceived.begin()->second; + + } + } -- 2.39.5