Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Added DTSTAMP property for saving data from a CalendarFreeBusyObject.
authorSteve Brokenshire <sbrokenshire@xestia.co.uk>
Sun, 5 Jun 2016 13:33:13 +0000 (14:33 +0100)
committerSteve Brokenshire <sbrokenshire@xestia.co.uk>
Sun, 5 Jun 2016 13:33:13 +0000 (14:33 +0100)
Added the code and unit tests for the DTSTAMP property.

source/objects/calendarfreebusy/CalendarFreeBusy-Save.cpp
source/tests/xestiacalendar_icalfreebusysave.h

index 9746eca..aed39d8 100644 (file)
@@ -37,6 +37,34 @@ void CalendarFreeBusyObject::SaveObjectData(string *SaveData){
                
        }
        
+       // Process the DTSTAMP.
+       
+       if (DateTimeStampData.size() > 0){
+               
+               if (DateTimeStampTokens.size() > 0){
+               
+                       DataLine += "DTSTAMP;";
+                       DataLine += DateTimeStampTokens;
+                       
+               } else {
+
+                       DataLine += "DTSTAMP";
+                       
+               }
+
+               DataLine += ":";
+               DataLine += DateTimeStampData;
+               DataLine += "\n";
+               
+               DataLineProcessed = OutputText(&DataLine);
+               
+               *SaveData += DataLineProcessed;
+               
+               DataLine.clear();
+               DataLineProcessed.clear();
+               
+       }
+       
        *SaveData += "END:VFREEBUSY\n";
        
 }
\ No newline at end of file
index cb5e02b..6b30f1a 100644 (file)
@@ -36,6 +36,7 @@ TEST(iCalendarSaveFreeBusy, SaveFreeBusyTests){
        "PRODID:-//Xestia//Calendar Unit Testing//KW\n"
        "BEGIN:VFREEBUSY\n"
        "UID:60\n"
+       "DTSTAMP:20160131T165000Z\n"
        "END:VFREEBUSY\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