Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Added SEQUENCE property for saving data from a CalendarEventObject.
authorSteve Brokenshire <sbrokenshire@xestia.co.uk>
Thu, 2 Jun 2016 21:50:30 +0000 (22:50 +0100)
committerSteve Brokenshire <sbrokenshire@xestia.co.uk>
Thu, 2 Jun 2016 21:50:30 +0000 (22:50 +0100)
Added the code and unit tests for the SEQUENCE property.

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

index d993212..432459a 100644 (file)
@@ -463,6 +463,32 @@ void CalendarEventObject::SaveObjectData(string *SaveData){
                
        }
        
+       // Process the SEQUENCE value.
+       
+       if (SequenceData > -1 && SequenceData < 10){
+               
+               DataLine += "SEQUENCE";
+               
+               if (SequenceTokens.size() > 0){
+               
+                       DataLine += ";";
+                       DataLine += SequenceTokens;
+                       
+               }
+               
+               DataLine += ":";
+               DataLine += to_string(SequenceData);
+               DataLine += "\n";
+               
+               DataLineProcessed = OutputText(&DataLine);
+               
+               *SaveData += DataLineProcessed;
+
+               DataLine.clear();
+               DataLineProcessed.clear();
+               
+       }
+       
        *SaveData += "END:VEVENT\n";
        
 }
\ No newline at end of file
index bc2b843..7cdfd69 100644 (file)
@@ -88,6 +88,7 @@ TEST(iCalendarSaveEvent, SaveEventTests){
        "ORGANIZER;CN=ExampleOrganiser;DIR=\"null:nodata\";SENT-BY=\"mailto:organiser.nor\n"
        " eply@example.com\";LANGUAGE=kw;HAPPY=DAYS:mailto:organiser@example.com\n"
        "PRIORITY;STATUS=DEFAULT:5\n"
+       "SEQUENCE;TEST=YAY:3\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