Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Added ORGANIZER property for saving data from a CalendarFreeBusyObject.
authorSteve Brokenshire <sbrokenshire@xestia.co.uk>
Sun, 5 Jun 2016 17:16:53 +0000 (18:16 +0100)
committerSteve Brokenshire <sbrokenshire@xestia.co.uk>
Sun, 5 Jun 2016 17:16:53 +0000 (18:16 +0100)
Added the code and unit tests for the ORGANIZER property.

source/objects/calendarfreebusy/CalendarFreeBusy-Save.cpp
source/tests/xestiacalendar_icalfreebusysave.h

index ecf68e8..46c09ac 100644 (file)
@@ -189,6 +189,63 @@ void CalendarFreeBusyObject::SaveObjectData(string *SaveData){
                DataLineProcessed.clear();
                
        }
+       
+       // Process the ORGANIZER value.
+       
+       if (OrganiserData.size() > 0){
+               
+               DataLine += "ORGANIZER";
+               
+               if (OrganiserDataCommonName.size() > 0){
+               
+                       DataLine += ";CN=";
+                       DataLine += OrganiserDataCommonName;
+                       
+               }
+
+               if (OrganiserDataDirectoryEntry.size() > 0){
+               
+                       DataLine += ";DIR=\"";
+                       DataLine += OrganiserDataDirectoryEntry;
+                       DataLine += "\"";
+                       
+               }
+               
+               if (OrganiserDataSentByParam.size() > 0){
+               
+                       DataLine += ";SENT-BY=\"";
+                       DataLine += OrganiserDataSentByParam;                   
+                       DataLine += "\"";
+                       
+               }
+               
+               if (OrganiserDataLanguage.size() > 0){
+               
+                       DataLine += ";LANGUAGE=";
+                       DataLine += OrganiserDataLanguage;                      
+                       
+               }
+               
+               if (OrganiserDataTokens.size() > 0){
+               
+                       DataLine += ";";
+                       DataLine += OrganiserDataTokens;
+                       
+               }
+               
+               DataLine += ":";
+               DataLine += OrganiserData;
+               DataLine += "\n";
+               
+               DataLineProcessed = OutputText(&DataLine);
+               
+               *SaveData += DataLineProcessed;
+
+               DataLine.clear();
+               DataLineProcessed.clear();
+               
+       }
+       
        *SaveData += "END:VFREEBUSY\n";
        
 }
\ No newline at end of file
index fdd5d97..6b92a0f 100644 (file)
@@ -63,6 +63,8 @@ TEST(iCalendarSaveFreeBusy, SaveFreeBusyTests){
        " 03000Z\n"
        "DTEND;VALUE=DATE-TIME;TZID=Europe/Truro;PARAMFOUR=YES;PARAMTHREE=NO:20160131T\n"
        " 183000Z\n"
+       "ORGANIZER;CN=ExampleOrganiser;DIR=\"null:nodata\";SENT-BY=\"mailto:organiser.nor\n"
+       " eply@example.com\";LANGUAGE=kw;HAPPY=DAYS:mailto:organiser@example.com\n"
        "END:VFREEBUSY\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