Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Added CREATED value for saving data from a CalendarEventObject.
authorSteve Brokenshire <sbrokenshire@xestia.co.uk>
Wed, 1 Jun 2016 21:07:20 +0000 (22:07 +0100)
committerSteve Brokenshire <sbrokenshire@xestia.co.uk>
Wed, 1 Jun 2016 21:07:20 +0000 (22:07 +0100)
Added the code and unit tests for the CREATED value.

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

index 1d1edcc..ee48352 100644 (file)
@@ -186,7 +186,7 @@ void CalendarEventObject::SaveObjectData(string *SaveData){
                
        }
 
-       // Process the CLASS.
+       // Process the CLASS value.
        
        if (ClassData.size() > 0){
                
@@ -214,6 +214,34 @@ void CalendarEventObject::SaveObjectData(string *SaveData){
                
        }
        
+       // Process the CREATED value.
+       
+       if (DateTimeCreatedData.size() > 0){
+               
+               if (DateTimeCreatedTokens.size() > 0){
+               
+                       DataLine += "CREATED;";
+                       DataLine += DateTimeCreatedTokens;
+                       
+               } else {
+
+                       DataLine += "CREATED";
+                       
+               }
+
+               DataLine += ":";
+               DataLine += DateTimeCreatedData;
+               DataLine += "\n";
+               
+               DataLineProcessed = OutputText(&DataLine);
+               
+               *SaveData += DataLineProcessed;
+               
+               DataLine.clear();
+               DataLineProcessed.clear();
+               
+       }
+       
        *SaveData += "END:VEVENT\n";
        
 }
\ No newline at end of file
index 2e2ffbf..41e07a8 100644 (file)
@@ -79,6 +79,7 @@ TEST(iCalendarSaveEvent, SaveEventTests){
        "SUMMARY;ALTREP=\"null:nodata\";LANGUAGE=kw;FAVOURITE=TOFU;NOTLIKE=NONE:A summar\n"
        " y of the event.\n"
        "CLASS;CHOCOLATE=BAR:PUBLIC\n"
+       "CREATED;CARAMEL=PLEASE:20160123T081100Z\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