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

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

index 6c04b56..410fc56 100644 (file)
@@ -438,6 +438,53 @@ void CalendarTaskObject::SaveObjectData(string *SaveData){
                
        }
        
+       // Process the RECURRENCE-ID value.
+       
+       if (RecurranceIDData.size() > 0){
+               
+               DataLine += "RECURRENCE-ID";
+
+               if (RecurranceIDDataTimeZoneParam.size() > 0){
+               
+                       DataLine += ";TZID=";
+                       DataLine += RecurranceIDDataTimeZoneParam;                      
+                       
+               }
+               
+               if (RecurranceIDDataRangeParam.size() > 0){
+               
+                       DataLine += ";RANGE=";
+                       DataLine += RecurranceIDDataRangeParam;                 
+                       
+               }
+               
+               if (RecurranceIDDataValue.size() > 0){
+               
+                       DataLine += ";VALUE=";
+                       DataLine += RecurranceIDDataValue;                      
+                       
+               }
+               
+               if (RecurranceIDDataTokens.size() > 0){
+               
+                       DataLine += ";";
+                       DataLine += RecurranceIDDataTokens;
+                       
+               }
+               
+               DataLine += ":";
+               DataLine += RecurranceIDData;
+               DataLine += "\n";
+               
+               DataLineProcessed = OutputText(&DataLine);
+               
+               *SaveData += DataLineProcessed;
+
+               DataLine.clear();
+               DataLineProcessed.clear();
+               
+       }
+       
        *SaveData += "END:VTODO\n";
        
 }
\ No newline at end of file
index f887119..aa3b88b 100644 (file)
@@ -73,6 +73,8 @@ TEST(iCalendarSaveTask, SaveTaskTests){
        " eply@example.com\";LANGUAGE=kw;HAPPY=WEEKS:mailto:organiser@example.com\n"
        "PERCENT-COMPLETE;DEEP=THOUGHT:42\n"
        "PRIORITY;STATUS=DEFAULT:5\n"
+       "RECURRENCE-ID;TZID=Europe/Truro;RANGE=THISANDFUTURE;VALUE=DATE;EXAMPLE=DATA:2\n"
+       " 0160131\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