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

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

index 44924cc..0c18ae0 100644 (file)
@@ -329,6 +329,39 @@ void CalendarJournalObject::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:VJOURNAL\n";
        
 }
\ No newline at end of file
index 13f149b..6906295 100644 (file)
@@ -76,6 +76,7 @@ TEST(iCalendarSaveJournal, SaveEventTests){
        "RECURRENCE-ID;TZID=Europe/Truro;RANGE=THISANDFUTURE;VALUE=DATE;EXAMPLE=DATA:2\n"
        " 0160131\n"
        "SEQUENCE;TEST=YAY:7\n"
+       "STATUS;LANGUAGE=kw;FAVOURITE=RICHTEA;NOTLIKE=UNKNOWN:2.0;Success\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