Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Added REQUEST-STATUS property for saving data from a CalendarEventObject.
authorSteve Brokenshire <sbrokenshire@xestia.co.uk>
Sat, 4 Jun 2016 19:56:29 +0000 (20:56 +0100)
committerSteve Brokenshire <sbrokenshire@xestia.co.uk>
Sat, 4 Jun 2016 19:56:29 +0000 (20:56 +0100)
Added the code and unit tests for the REQUEST-STATUS property.

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

index 7d303ca..0181d0a 100644 (file)
@@ -988,6 +988,44 @@ void CalendarEventObject::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:VEVENT\n";
        
 }
\ No newline at end of file
index f33662c..8b851fc 100644 (file)
@@ -119,6 +119,10 @@ TEST(iCalendarSaveEvent, SaveEventTests){
        "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: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