Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Added DTEND property for saving data from a CalendarFreeBusyObject.
[xestiacalendar/.git] / source / objects / calendarfreebusy / CalendarFreeBusy-Save.cpp
index 9746eca..ecf68e8 100644 (file)
@@ -37,6 +37,158 @@ void CalendarFreeBusyObject::SaveObjectData(string *SaveData){
                
        }
        
+       // Process the DTSTAMP.
+       
+       if (DateTimeStampData.size() > 0){
+               
+               if (DateTimeStampTokens.size() > 0){
+               
+                       DataLine += "DTSTAMP;";
+                       DataLine += DateTimeStampTokens;
+                       
+               } else {
+
+                       DataLine += "DTSTAMP";
+                       
+               }
+
+               DataLine += ":";
+               DataLine += DateTimeStampData;
+               DataLine += "\n";
+               
+               DataLineProcessed = OutputText(&DataLine);
+               
+               *SaveData += DataLineProcessed;
+               
+               DataLine.clear();
+               DataLineProcessed.clear();
+               
+       }
+       
+       // Process the CONTACT value.
+       
+       if (ContactList.size() > 0){
+               
+               if (ContactList[0].size() > 0){
+               
+                       DataLine += "CONTACT";
+               
+                       if (ContactListAltRep[0].size() > 0){
+               
+                               DataLine += ";ALTREP=\"";
+                               DataLine += ContactListAltRep[0];
+                               DataLine += "\"";
+                       
+                       }
+               
+                       if (ContactListLanguage[0].size() > 0){
+               
+                               DataLine += ";LANGUAGE=";
+                               DataLine += ContactListLanguage[0];
+                       
+                       }
+               
+                       if (ContactListTokens[0].size() > 0){
+               
+                               DataLine += ";";
+                               DataLine += ContactListTokens[0];
+                       
+                       }
+               
+                       DataLine += ":";
+                       DataLine += ContactList[0];
+                       DataLine += "\n";
+               
+                       DataLineProcessed = OutputText(&DataLine);
+               
+                       *SaveData += DataLineProcessed;
+
+                       DataLine.clear();
+                       DataLineProcessed.clear();
+               
+               }
+               
+       }
+       
+       // Process the DTSTART.
+       
+       if (DateTimeStartData.size() > 0){
+               
+               DataLine += "DTSTART";
+               
+               if (DateTimeStartDataValue.size() > 0){
+               
+                       DataLine += ";VALUE=";
+                       DataLine += DateTimeStartDataValue;                     
+                       
+               }
+               
+               if (DateTimeStartDataTimeZoneID.size() > 0){
+               
+                       DataLine += ";TZID=";
+                       DataLine += DateTimeStartDataTimeZoneID;                        
+                       
+               }
+               
+               if (DateTimeStartDataTokens.size() > 0){
+               
+                       DataLine += ";";
+                       DataLine += DateTimeStartDataTokens;
+                       
+               }
+
+               DataLine += ":";
+               DataLine += DateTimeStartData;
+               DataLine += "\n";
+               
+               DataLineProcessed = OutputText(&DataLine);
+               
+               *SaveData += DataLineProcessed;
+               
+               DataLine.clear();
+               DataLineProcessed.clear();
+               
+       }
+       
+       // Process the DTEND.
+       
+       if (DateTimeEndData.size() > 0){
+               
+               DataLine += "DTEND";
+               
+               if (DateTimeEndDataValue.size() > 0){
+               
+                       DataLine += ";VALUE=";
+                       DataLine += DateTimeEndDataValue;                       
+                       
+               }
+               
+               if (DateTimeEndDataTimeZoneID.size() > 0){
+               
+                       DataLine += ";TZID=";
+                       DataLine += DateTimeEndDataTimeZoneID;                  
+                       
+               }
+               
+               if (DateTimeEndDataTokens.size() > 0){
+               
+                       DataLine += ";";
+                       DataLine += DateTimeEndDataTokens;
+                       
+               }
+
+               DataLine += ":";
+               DataLine += DateTimeEndData;
+               DataLine += "\n";
+               
+               DataLineProcessed = OutputText(&DataLine);
+               
+               *SaveData += DataLineProcessed;
+               
+               DataLine.clear();
+               DataLineProcessed.clear();
+               
+       }
        *SaveData += "END:VFREEBUSY\n";
        
 }
\ No newline at end of file
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