Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Added LAST-MODIFIED property for saving data from a CalendarJournalObject.
authorSteve Brokenshire <sbrokenshire@xestia.co.uk>
Sun, 5 Jun 2016 22:18:56 +0000 (23:18 +0100)
committerSteve Brokenshire <sbrokenshire@xestia.co.uk>
Sun, 5 Jun 2016 22:18:56 +0000 (23:18 +0100)
Added the code and unit tests for the LAST-MODIFIED property.

source/objects/calendarjournal/CalendarJournal-Save.cpp
source/tests/xestiacalendar_icaljournalsave.h

index a2124e0..c68da9d 100644 (file)
@@ -172,6 +172,34 @@ void CalendarJournalObject::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:VJOURNAL\n";
        
 }
\ No newline at end of file
index 19ed01b..167ca69 100644 (file)
@@ -70,6 +70,7 @@ TEST(iCalendarSaveJournal, SaveEventTests){
        "CLASS;CHOCOLATE=BAR:PUBLIC\n"
        "DTSTART;VALUE=DATE-TIME;TZID=Europe/Truro;PARAMONE=YES;PARAMTWO=NO:20160131T1\n"
        " 43500Z\n"
+       "LAST-MODIFIED;FUTURE=YES:20160131T143700Z\n"
        "END:VJOURNAL\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