Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Added LAST-MODIFIED property for saving data from a CalendarEventObject.
authorSteve Brokenshire <sbrokenshire@xestia.co.uk>
Thu, 2 Jun 2016 20:54:44 +0000 (21:54 +0100)
committerSteve Brokenshire <sbrokenshire@xestia.co.uk>
Thu, 2 Jun 2016 20:54:44 +0000 (21:54 +0100)
Added the code and unit tests for the LAST-MODIFIED property.

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

index ceeb1c4..a5afcd5 100644 (file)
@@ -312,6 +312,34 @@ void CalendarEventObject::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:VEVENT\n";
        
 }
\ No newline at end of file
index b365b11..dcb07be 100644 (file)
@@ -83,6 +83,7 @@ TEST(iCalendarSaveEvent, SaveEventTests){
        "DESCRIPTION;ALTREP=\"null:nodata\";LANGUAGE=kw;EXAMPLE=TOKEN;MOREDATA=YES:This \n"
        " is a description of the event.\n"
        "GEO;EXAMPLE=MEEP:5.0;5.0\n"
+       "LAST-MODIFIED;FUTURE=ODD:20160124T093000Z\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