Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Added VALARM:DESCRIPTION property for saving data from a CalendarEventObject.
authorSteve Brokenshire <sbrokenshire@xestia.co.uk>
Sat, 4 Jun 2016 21:44:07 +0000 (22:44 +0100)
committerSteve Brokenshire <sbrokenshire@xestia.co.uk>
Sat, 4 Jun 2016 21:44:07 +0000 (22:44 +0100)
Added the code and unit tests for the VALARM:DESCRIPTION property.

source/objects/calendarevent/CalendarEvent-Save.cpp
source/tests/xestiacalendar_icaleventsave.h

index 53ba9d1..330df3b 100644 (file)
@@ -1293,6 +1293,47 @@ void CalendarEventObject::SaveObjectData(string *SaveData){
                                
                        }
                        
+                       // Process the SUMMARY VALARM value.
+                       
+                       if (CalendarAlarmData[CalendarAlarmDataSeek].SummaryData.size() > 0){
+                               
+                               DataLine += "SUMMARY";
+
+                               if (CalendarAlarmData[CalendarAlarmDataSeek].SummaryAltRep.size() > 0){
+               
+                                       DataLine += ";ALTREP=\"";
+                                       DataLine += CalendarAlarmData[CalendarAlarmDataSeek].SummaryAltRep;
+                                       DataLine += "\"";
+                       
+                               }
+                               
+                               if (CalendarAlarmData[CalendarAlarmDataSeek].SummaryLanguage.size() > 0){
+               
+                                       DataLine += ";LANGUAGE=";
+                                       DataLine += CalendarAlarmData[CalendarAlarmDataSeek].SummaryLanguage;
+                       
+                               }
+                               
+                               if (CalendarAlarmData[CalendarAlarmDataSeek].SummaryTokens.size() > 0){
+               
+                                       DataLine += ";";
+                                       DataLine += CalendarAlarmData[CalendarAlarmDataSeek].SummaryTokens;
+                       
+                               }
+                               
+                               DataLine += ":";
+                               DataLine += CalendarAlarmData[CalendarAlarmDataSeek].SummaryData;
+                               DataLine += "\n";
+               
+                               DataLineProcessed = OutputText(&DataLine);
+               
+                               *SaveData += DataLineProcessed;
+
+                               DataLine.clear();
+                               DataLineProcessed.clear();                              
+                               
+                       }
+                       
                        *SaveData += "END:VALARM\n";
                        
                }
index 199487c..18ca4e4 100644 (file)
@@ -150,6 +150,8 @@ TEST(iCalendarSaveEvent, SaveEventTests){
        "DURATION;FLYING=YES:PT7H\n"
        "DESCRIPTION;ALTREP=\"null:nodata\";LANGUAGE=kw;TERRIBLE=TOKEN:This is the third\n"
        "  alarm.\n"
+       "SUMMARY;ALTREP=\"null:nodata\";LANGUAGE=en;MEEP=MOOP:This is the summary of the\n"
+       "  third alarm.\n"
        "END:VALARM\n"
        "END:VEVENT\n"
        "END:VCARD";
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