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

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

index 5290574..7d303ca 100644 (file)
@@ -943,6 +943,51 @@ void CalendarEventObject::SaveObjectData(string *SaveData){
                
        }
        
+       // Process the EXDATE value.
+       
+       if (ExcludeDateData.size() > 0){
+               
+               for (int ExcludeDateDataSeek = 0; ExcludeDateDataSeek < ExcludeDateData.size();
+                       ExcludeDateDataSeek++){
+       
+                       DataLine += "EXDATE";
+                               
+                       if (ExcludeDateDataTimeZoneParam[ExcludeDateDataSeek].size() > 0){
+               
+                               DataLine += ";TZID=";
+                               DataLine += ExcludeDateDataTimeZoneParam[ExcludeDateDataSeek];
+                       
+                       }
+                       
+                       if (ExcludeDateDataValue[ExcludeDateDataSeek].size() > 0){
+               
+                               DataLine += ";VALUE=";
+                               DataLine += ExcludeDateDataValue[ExcludeDateDataSeek];
+                       
+                       }
+                       
+                       if (ExcludeDateDataTokens[ExcludeDateDataSeek].size() > 0){
+               
+                               DataLine += ";";
+                               DataLine += ExcludeDateDataTokens[ExcludeDateDataSeek];
+                       
+                       }
+                               
+                       DataLine += ":";
+                       DataLine += ExcludeDateData[ExcludeDateDataSeek];
+                       DataLine += "\n";
+               
+                       DataLineProcessed = OutputText(&DataLine);
+               
+                       *SaveData += DataLineProcessed;
+
+                       DataLine.clear();
+                       DataLineProcessed.clear();
+                               
+               }
+               
+       }
+       
        *SaveData += "END:VEVENT\n";
        
 }
\ No newline at end of file
index 2824a5f..f33662c 100644 (file)
@@ -116,6 +116,9 @@ TEST(iCalendarSaveEvent, SaveEventTests){
        "CONTACT:First Contact\n"
        "CONTACT;ALTREP=\"null:nodata\";LANGUAGE=en-GB:Second Contact\n"
        "CONTACT;ZEBRAS=NO:Third Contact\n"
+       "EXDATE:20160125T120000Z\n"
+       "EXDATE;TZID=Europe/Truro;VALUE=DATE-TIME:20160125T130000Z\n"
+       "EXDATE;ZOOP=ZIPPO:20160125T133000Z\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