Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Added FBURL to the SaveString function of ContactDataObject
[xestiaab/.git] / source / contacteditor / cdo / ContactDataObject-Save.cpp
index bf755f1..39f4a2a 100644 (file)
@@ -606,6 +606,13 @@ ContactSaveStatus ContactDataObject::SaveString(wxString *SaveData){
                &CalendarRequestListType, &CalendarRequestListPref,
                &CalendarRequestListTokens, SaveData);
 
+       // Process FBURL.
+       
+       SaveFreeBusyURI(&FreeBusyList, &FreeBusyListAltID, 
+               &FreeBusyListPID, &FreeBusyListType,
+               &FreeBusyListMediatype, &FreeBusyListPref, 
+               &FreeBusyListTokens, SaveData);
+
        // Write the end part of the vCard data file.
        
        SaveData->Append("END:VCARD");
@@ -2114,4 +2121,83 @@ void ContactDataObject::SaveCalendarRequestURI(map<int, wxString> *CalendarReque
                        
        }
                
+}
+
+void ContactDataObject::SaveFreeBusyURI(std::map<int, wxString> *FreeBusyList, std::map<int, wxString> *FreeBusyListAltID, 
+       std::map<int, wxString> *FreeBusyListPID, std::map<int, wxString> *FreeBusyListType,
+       std::map<int, wxString> *FreeBusyListMediatype, std::map<int, int> *FreeBusyListPref, 
+       std::map<int, wxString> *FreeBusyListTokens, wxString *SaveData){
+
+       wxString ProcessData = "";
+               
+       for (std::map<int, wxString>::iterator FreeBusyIter = FreeBusyList->begin();
+               FreeBusyIter != FreeBusyList->end(); FreeBusyIter++){
+
+               ProcessData.Append("FBURL");
+                       
+               // Check if there is a value for TYPE.
+               
+               if ((*FreeBusyListType)[FreeBusyIter->first].size() > 0){
+               
+                       ProcessData.Append(";TYPE=");
+                       ProcessData.Append((*FreeBusyListType)[FreeBusyIter->first]);
+                       
+               }
+               
+               // Check if there is a value for ALTID.
+               
+               if ((*FreeBusyListAltID)[FreeBusyIter->first].size() > 0){
+               
+                       ProcessData.Append(";ALTID=");
+                       ProcessData.Append((*FreeBusyListAltID)[FreeBusyIter->first]);
+                       
+               }
+
+               // Check if there is a value for MEDIATYPE.
+               
+               if ((*FreeBusyListMediatype)[FreeBusyIter->first].size() > 0){
+               
+                       ProcessData.Append(";MEDIATYPE=");
+                       ProcessData.Append((*FreeBusyListMediatype)[FreeBusyIter->first]);
+                       
+               }
+               
+               // Check if there is a value for PID.
+
+               if ((*FreeBusyListPID)[FreeBusyIter->first].size() > 0){
+               
+                       ProcessData.Append(";PID=");
+                       ProcessData.Append((*FreeBusyListPID)[FreeBusyIter->first]);
+                       
+               }
+
+               // Check if there is a value for PREF.
+
+               if ((*FreeBusyListPref)[FreeBusyIter->first] > 0){
+               
+                       ProcessData.Append(";PREF=");
+                       ProcessData.Append(wxString::Format("%i", (*FreeBusyListPref)[FreeBusyIter->first]));
+                       
+               }
+
+               // Check if there is a value for tokens.
+
+               if ((*FreeBusyListTokens)[FreeBusyIter->first].size() > 0){
+               
+                       ProcessData.Append(";");
+                       ProcessData.Append((*FreeBusyListTokens)[FreeBusyIter->first]);
+                       
+               }
+                       
+               ProcessData.Append(":");
+               ProcessData.Append(FreeBusyIter->second);
+               ProcessData.Append("\n");
+
+               ProcessData = OutputText(&ProcessData);
+               
+               SaveData->Append(ProcessData);
+               ProcessData.clear();
+                       
+       }
+               
 }
\ 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