Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Added EXDATE property for saving data from a CalendarTaskObject.
authorSteve Brokenshire <sbrokenshire@xestia.co.uk>
Mon, 6 Jun 2016 22:12:44 +0000 (23:12 +0100)
committerSteve Brokenshire <sbrokenshire@xestia.co.uk>
Mon, 6 Jun 2016 22:13:35 +0000 (23:13 +0100)
Added the code and unit tests for the EXDATE property.

source/objects/calendartask/CalendarTask-Save.cpp
source/tests/xestiacalendar_icaltasksave.h

index ecf2362..96488ca 100644 (file)
@@ -973,6 +973,50 @@ void CalendarTaskObject::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:VTODO\n";
        
 }
\ No newline at end of file
index 4313604..59012cb 100644 (file)
@@ -103,6 +103,9 @@ TEST(iCalendarSaveTask, SaveTaskTests){
        "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:VTODO\n"
        "END:VCALENDAR";
        
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