Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Added STATUS property for saving data from a CalendarEventObject.
authorSteve Brokenshire <sbrokenshire@xestia.co.uk>
Thu, 2 Jun 2016 22:01:36 +0000 (23:01 +0100)
committerSteve Brokenshire <sbrokenshire@xestia.co.uk>
Thu, 2 Jun 2016 22:01:36 +0000 (23:01 +0100)
Added the code and unit tests for the STATUS property.

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

index 432459a..c149557 100644 (file)
@@ -489,6 +489,39 @@ void CalendarEventObject::SaveObjectData(string *SaveData){
                
        }
        
+       // Process the STATUS value.
+       
+       if (StatusData.size() > 0){
+               
+               DataLine += "STATUS";
+               
+               if (StatusLanguage.size() > 0){
+               
+                       DataLine += ";LANGUAGE=";
+                       DataLine += StatusLanguage;                     
+                       
+               }
+               
+               if (StatusTokens.size() > 0){
+               
+                       DataLine += ";";
+                       DataLine += StatusTokens;
+                       
+               }
+               
+               DataLine += ":";
+               DataLine += StatusData;
+               DataLine += "\n";
+               
+               DataLineProcessed = OutputText(&DataLine);
+               
+               *SaveData += DataLineProcessed;
+
+               DataLine.clear();
+               DataLineProcessed.clear();
+               
+       }
+       
        *SaveData += "END:VEVENT\n";
        
 }
\ No newline at end of file
index 7cdfd69..0e92588 100644 (file)
@@ -89,6 +89,7 @@ TEST(iCalendarSaveEvent, SaveEventTests){
        " eply@example.com\";LANGUAGE=kw;HAPPY=DAYS:mailto:organiser@example.com\n"
        "PRIORITY;STATUS=DEFAULT:5\n"
        "SEQUENCE;TEST=YAY:3\n"
+       "STATUS;LANGUAGE=kw;FAVOURITE=RICHTEA;NOTLIKE=UNKNOWN:2.0;Success\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