From ad94c9c170df05dbdb00af6773052227327dd3c1 Mon Sep 17 00:00:00 2001 From: Steve Brokenshire Date: Sat, 23 Jan 2016 13:48:40 +0000 Subject: [PATCH] Added code to get the UID and tokens in CalendarEventObject. --- .../objects/calendarevent/CalendarEvent.cpp | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/source/objects/calendarevent/CalendarEvent.cpp b/source/objects/calendarevent/CalendarEvent.cpp index 0450b2e..ee003f9 100644 --- a/source/objects/calendarevent/CalendarEvent.cpp +++ b/source/objects/calendarevent/CalendarEvent.cpp @@ -161,5 +161,25 @@ void CalendarEventObject::ProcessData(){ DateTimeStampData = DataReceived.begin()->second; } + + // Get the Unique ID (UID). + + DataReceived = ProcessTextVectors(&ObjectName, &ObjectData, false, "UID"); + + // Process the data from DTSTAMP. + + if (DataReceived.begin() != DataReceived.end()){ + + try { + UniqueIDTokens = DataReceived.begin()->first.substr(4); + } + + catch(const out_of_range &oor){ + // Do nothing as there is no data. + } + + UniqueID = DataReceived.begin()->second; + + } } -- 2.39.2