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

source/objects/calendarfreebusy/CalendarFreeBusy-Save.cpp
source/tests/xestiacalendar_icalfreebusysave.h

index d14ea57..482b99d 100644 (file)
@@ -470,6 +470,44 @@ void CalendarFreeBusyObject::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:VFREEBUSY\n";
        
 }
\ No newline at end of file
index 75f73bb..5964b1c 100644 (file)
@@ -78,6 +78,10 @@ TEST(iCalendarSaveFreeBusy, SaveFreeBusyTests){
        "FREEBUSY:20160202T210000Z/PT1H\n"
        "FREEBUSY;FBTYPE=FREE:20160202T220000Z/PT1H\n"
        "FREEBUSY;FBTYPE=BUSY-UNAVAILABLE;RESULT=ARGH;TEST=YES:20160202T230000Z/PT9H\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:VFREEBUSY\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