Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Added LAST-MODIFIED property for saving data from a CalendarTaskObject.
authorSteve Brokenshire <sbrokenshire@xestia.co.uk>
Mon, 6 Jun 2016 21:03:43 +0000 (22:03 +0100)
committerSteve Brokenshire <sbrokenshire@xestia.co.uk>
Mon, 6 Jun 2016 21:03:43 +0000 (22:03 +0100)
Added the code and unit tests for the LAST-MODIFIED property.

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

index 7179960..85f5692 100644 (file)
@@ -259,6 +259,34 @@ void CalendarTaskObject::SaveObjectData(string *SaveData){
                
        }
        
+       // Process the LAST-MODIFIED value.
+       
+       if (LastModifiedData.size() > 0){
+               
+               if (LastModifiedTokens.size() > 0){
+               
+                       DataLine += "LAST-MODIFIED;";
+                       DataLine += LastModifiedTokens;
+                       
+               } else {
+
+                       DataLine += "LAST-MODIFIED";
+                       
+               }
+
+               DataLine += ":";
+               DataLine += LastModifiedData;
+               DataLine += "\n";
+               
+               DataLineProcessed = OutputText(&DataLine);
+               
+               *SaveData += DataLineProcessed;
+               
+               DataLine.clear();
+               DataLineProcessed.clear();
+               
+       }
+       
        *SaveData += "END:VTODO\n";
        
 }
\ No newline at end of file
index 04fd37b..226fe41 100644 (file)
@@ -66,6 +66,7 @@ TEST(iCalendarSaveTask, SaveTaskTests){
        "DTSTART;VALUE=DATE-TIME;TZID=Europe/Truro;PARAMONE=YES;PARAMTWO=NO:20160131T1\n"
        " 03000Z\n"
        "GEO;EXAMPLE=MOOP:20.0;20.0\n"
+       "LAST-MODIFIED;FUTURE=EVEN:20160131T114200Z\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