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

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

index e66baf8..e652d7a 100644 (file)
@@ -548,6 +548,32 @@ void CalendarEventObject::SaveObjectData(string *SaveData){
                
        }
        
+       // Process the URL value.
+       
+       if (URLData.size() > 0){
+               
+               DataLine += "URL";
+
+               if (URLDataTokens.size() > 0){
+               
+                       DataLine += ";";
+                       DataLine += URLDataTokens;
+                       
+               }
+               
+               DataLine += ":";
+               DataLine += URLData;
+               DataLine += "\n";
+               
+               DataLineProcessed = OutputText(&DataLine);
+               
+               *SaveData += DataLineProcessed;
+
+               DataLine.clear();
+               DataLineProcessed.clear();
+               
+       }
+       
        *SaveData += "END:VEVENT\n";
        
 }
\ No newline at end of file
index 5004d12..e64e02c 100644 (file)
@@ -91,6 +91,7 @@ TEST(iCalendarSaveEvent, SaveEventTests){
        "SEQUENCE;TEST=YAY:3\n"
        "STATUS;LANGUAGE=kw;FAVOURITE=RICHTEA;NOTLIKE=UNKNOWN:2.0;Success\n"
        "TRANSP;OPAQUE=NOTYET:TRANSPARENT\n"
+       "URL;EXTERNAL=YES:http://www.example.com/\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