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

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

index b347e0b..a46aa84 100644 (file)
@@ -883,6 +883,45 @@ void CalendarJournalObject::SaveObjectData(string *SaveData){
                }
                
        }
+       
+       // Process the REQUEST-STATUS value.
+       
+       if (RequestStatusData.size() > 0){
+               
+               for (int RequestStatusDataSeek = 0; RequestStatusDataSeek < RequestStatusData.size();
+                       RequestStatusDataSeek++){
+       
+                       DataLine += "REQUEST-STATUS";
+                       
+                       if (RequestStatusLanguage[RequestStatusDataSeek].size() > 0){
+               
+                               DataLine += ";LANGUAGE=";
+                               DataLine += RequestStatusLanguage[RequestStatusDataSeek];
+                       
+                       }
+                       
+                       if (RequestStatusTokens[RequestStatusDataSeek].size() > 0){
+               
+                               DataLine += ";";
+                               DataLine += RequestStatusTokens[RequestStatusDataSeek];
+                       
+                       }
+                               
+                       DataLine += ":";
+                       DataLine += RequestStatusData[RequestStatusDataSeek];
+                       DataLine += "\n";
+               
+                       DataLineProcessed = OutputText(&DataLine);
+               
+                       *SaveData += DataLineProcessed;
+
+                       DataLine.clear();
+                       DataLineProcessed.clear();
+                               
+               }
+               
+       }
+       
        *SaveData += "END:VJOURNAL\n";
        
 }
\ No newline at end of file
index 835d995..f9da37e 100644 (file)
@@ -113,6 +113,10 @@ TEST(iCalendarSaveJournal, SaveEventTests){
        "RDATE:20160120\n"
        "RDATE;VALUE=DATE;TZID=Europe/Truro:20160121\n"
        "RDATE;ZILCH=DATA:20160520\n"
+       "REQUEST-STATUS:2.0;Success\n"
+       "REQUEST-STATUS;LANGUAGE=en:3.42;Really big irrecoverable error caused by the \n"
+       " user\n"
+       "REQUEST-STATUS;USER=MISSING:3.7;Invalid calendar user\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