Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Added RRULE property for saving data from a CalendarEventObject.
authorSteve Brokenshire <sbrokenshire@xestia.co.uk>
Sat, 4 Jun 2016 08:03:57 +0000 (09:03 +0100)
committerSteve Brokenshire <sbrokenshire@xestia.co.uk>
Sat, 4 Jun 2016 08:03:57 +0000 (09:03 +0100)
Added the code and unit tests for the RRULE property.

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

index e7d78d8..aee9093 100644 (file)
@@ -621,6 +621,32 @@ void CalendarEventObject::SaveObjectData(string *SaveData){
                
        }
        
+       // Process the RRULE value.
+       
+       if (RecurranceRuleData.size() > 0){
+               
+               DataLine += "RRULE";
+
+               if (RecurranceRuleDataTokens.size() > 0){
+               
+                       DataLine += ";";
+                       DataLine += RecurranceRuleDataTokens;
+                       
+               }
+               
+               DataLine += ":";
+               DataLine += RecurranceRuleData;
+               DataLine += "\n";
+               
+               DataLineProcessed = OutputText(&DataLine);
+               
+               *SaveData += DataLineProcessed;
+
+               DataLine.clear();
+               DataLineProcessed.clear();
+               
+       }
+       
        *SaveData += "END:VEVENT\n";
        
 }
\ No newline at end of file
index 8d19378..ccbb1ea 100644 (file)
@@ -94,6 +94,7 @@ TEST(iCalendarSaveEvent, SaveEventTests){
        "URL;EXTERNAL=YES:http://www.example.com/\n"
        "RECURRENCE-ID;TZID=Europe/Truro;RANGE=THISANDFUTURE;VALUE=DATE;EXAMPLE=DATA:2\n"
        " 0160124\n"
+       "RRULE;TEST=DATA:FREQ=DAILY;COUNT=10\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