Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Added code to process TRIGGER in VALARM for CalendarEventObject.
authorSteve Brokenshire <sbrokenshire@xestia.co.uk>
Sat, 13 Feb 2016 16:38:49 +0000 (16:38 +0000)
committerSteve Brokenshire <sbrokenshire@xestia.co.uk>
Sat, 13 Feb 2016 16:38:49 +0000 (16:38 +0000)
source/objects/calendarevent/CalendarEvent.cpp

index ab88fe4..3e25e86 100644 (file)
@@ -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<string,string>::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){
                
Xestia Software Development
Yn Maystri
© 2006 - 2019 Xestia Software Development
Software

Xestia Address Book
Xestia Calendar
Development

Xestia Gelforn
Everything else

About
News
Privacy Policy