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

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

index c68da9d..a3b729e 100644 (file)
@@ -200,6 +200,62 @@ void CalendarJournalObject::SaveObjectData(string *SaveData){
                
        }
        
+       // 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:VJOURNAL\n";
        
 }
\ No newline at end of file
index 167ca69..4c0bf60 100644 (file)
@@ -71,6 +71,8 @@ TEST(iCalendarSaveJournal, SaveEventTests){
        "DTSTART;VALUE=DATE-TIME;TZID=Europe/Truro;PARAMONE=YES;PARAMTWO=NO:20160131T1\n"
        " 43500Z\n"
        "LAST-MODIFIED;FUTURE=YES:20160131T143700Z\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: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