From bd076f927b41ac987b765275dfe72eb3d13973ca Mon Sep 17 00:00:00 2001 From: Steve Brokenshire Date: Sat, 13 Feb 2016 16:38:49 +0000 Subject: [PATCH] Added code to process TRIGGER in VALARM for CalendarEventObject. --- .../objects/calendarevent/CalendarEvent.cpp | 48 +++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/source/objects/calendarevent/CalendarEvent.cpp b/source/objects/calendarevent/CalendarEvent.cpp index ab88fe4..3e25e86 100644 --- a/source/objects/calendarevent/CalendarEvent.cpp +++ b/source/objects/calendarevent/CalendarEvent.cpp @@ -1522,6 +1522,54 @@ void CalendarEventObject::ProcessData(){ } + // Process the data from TRIGGER. + + DataReceived = ProcessTextVectors(&ObjectName, &ObjectData, false, "TRIGGER"); + + 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 == "VALUE"){ + + NewAlarmData.TriggerValue = iter->second; + + } else if (iter->first == "RELATED"){ + + NewAlarmData.TriggerRelated = iter->second; + + } else { + + if (TokenData == false){ + TokenData = true; + } else { + PropertyTokens += ";"; + } + + PropertyTokens += iter->first; + PropertyTokens += "="; + PropertyTokens += iter->second; + + } + + } + + if (PropertyTokens.size() > 0){ + NewAlarmData.TriggerTokens = PropertyTokens; + } + + NewAlarmData.TriggerData = DataReceived.begin()->second; + + } + if (NewAlarmData.AlarmType == CALENDARALARM_AUDIO && AlarmActionFound == true){ -- 2.39.5