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

source/objects/calendartask/CalendarTask-Save.cpp
source/tests/xestiacalendar_icaltasksave.h

index 96488ca..a16f25f 100644 (file)
@@ -1017,6 +1017,45 @@ void CalendarTaskObject::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:VTODO\n";
        
 }
\ No newline at end of file
index 59012cb..5ce4184 100644 (file)
@@ -106,6 +106,10 @@ TEST(iCalendarSaveTask, SaveTaskTests){
        "EXDATE:20160125T120000Z\n"
        "EXDATE;TZID=Europe/Truro;VALUE=DATE-TIME:20160125T130000Z\n"
        "EXDATE;ZOOP=ZIPPO:20160125T133000Z\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:VTODO\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