Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Added RRULE property for saving data from a CalendarJournalObject.
authorSteve Brokenshire <sbrokenshire@xestia.co.uk>
Sun, 5 Jun 2016 22:35:45 +0000 (23:35 +0100)
committerSteve Brokenshire <sbrokenshire@xestia.co.uk>
Sun, 5 Jun 2016 22:35:45 +0000 (23:35 +0100)
Added the code and unit tests for the RRULE property.

source/objects/calendarjournal/CalendarJournal-Save.cpp
source/tests/xestiacalendar_icaljournalsave.h

index 8849a93..a5704e1 100644 (file)
@@ -388,6 +388,31 @@ void CalendarJournalObject::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:VJOURNAL\n";
        
 }
\ No newline at end of file
index 5e19324..18ff886 100644 (file)
@@ -78,6 +78,7 @@ TEST(iCalendarSaveJournal, SaveEventTests){
        "SEQUENCE;TEST=YAY:7\n"
        "STATUS;LANGUAGE=kw;FAVOURITE=RICHTEA;NOTLIKE=UNKNOWN:2.0;Success\n"
        "URL;EXTERNAL=YES:http://www.example.com/\n"
+       "RRULE;TEST=DATA:FREQ=DAILY;COUNT=10\n"
        "END:VJOURNAL\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