&SoundsListPref, &SoundsListTokens,
SaveData);
+ // Process CALURI.
+
+ SaveCalendarURI(&CalendarList, &CalendarListMediatype,
+ &CalendarListAltID, &CalendarListPID,
+ &CalendarListType, &CalendarListPref,
+ &CalendarListTokens, SaveData);
+
// Write the end part of the vCard data file.
SaveData->Append("END:VCARD");
}
+}
+
+void ContactDataObject::SaveCalendarURI(map<int, wxString> *CalendarList, map<int, wxString> *CalendarListMediatype,
+ map<int, wxString> *CalendarListAltID, map<int, wxString> *CalendarListPID,
+ map<int, wxString> *CalendarListType, map<int, int> *CalendarListPref,
+ map<int, wxString> *CalendarListTokens, wxString *SaveData){
+
+ wxString ProcessData = "";
+
+ for (std::map<int, wxString>::iterator CalendarIter = CalendarList->begin();
+ CalendarIter != CalendarList->end(); CalendarIter++){
+
+ ProcessData.Append("CALURI");
+
+ // Check if there is a value for TYPE.
+
+ if ((*CalendarListType)[CalendarIter->first].size() > 0){
+
+ ProcessData.Append(";TYPE=");
+ ProcessData.Append((*CalendarListType)[CalendarIter->first]);
+
+ }
+
+ // Check if there is a value for ALTID.
+
+ if ((*CalendarListAltID)[CalendarIter->first].size() > 0){
+
+ ProcessData.Append(";ALTID=");
+ ProcessData.Append((*CalendarListAltID)[CalendarIter->first]);
+
+ }
+
+ // Check if there is a value for MEDIATYPE.
+
+ if ((*CalendarListMediatype)[CalendarIter->first].size() > 0){
+
+ ProcessData.Append(";MEDIATYPE=");
+ ProcessData.Append((*CalendarListMediatype)[CalendarIter->first]);
+
+ }
+
+ // Check if there is a value for PID.
+
+ if ((*CalendarListPID)[CalendarIter->first].size() > 0){
+
+ ProcessData.Append(";PID=");
+ ProcessData.Append((*CalendarListPID)[CalendarIter->first]);
+
+ }
+
+ // Check if there is a value for PREF.
+
+ if ((*CalendarListPref)[CalendarIter->first] > 0){
+
+ ProcessData.Append(";PREF=");
+ ProcessData.Append(wxString::Format("%i", (*CalendarListPref)[CalendarIter->first]));
+
+ }
+
+ // Check if there is a value for tokens.
+
+ if ((*CalendarListTokens)[CalendarIter->first].size() > 0){
+
+ ProcessData.Append(";");
+ ProcessData.Append((*CalendarListTokens)[CalendarIter->first]);
+
+ }
+
+ ProcessData.Append(":");
+ ProcessData.Append(CalendarIter->second);
+ ProcessData.Append("\n");
+
+ ProcessData = OutputText(&ProcessData);
+
+ SaveData->Append(ProcessData);
+ ProcessData.clear();
+
+ }
+
}
\ No newline at end of file