&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
map<int, wxString> *SoundsListMediatype, map<int, wxString> *SoundsListLanguage,
map<int, int> *SoundsListPref, map<int, wxString> *SoundsListTokens,
wxString *SaveData);
+ void SaveCalendarURI(std::map<int, wxString> *CalendarList, std::map<int, wxString> *CalendarListAltID,
+ std::map<int, wxString> *CalendarListPID, std::map<int, wxString> *CalendarListType,
+ std::map<int, wxString> *CalendarListMediatype, std::map<int, int> *CalendarListPref,
+ std::map<int, wxString> *CalendarListTokens, wxString *SaveData);
public:
" rOiaKk49EpYoqYecozQYDhT04juULDYbJn7IXeksuXpi2v2irciAXICHx2PAvM4SVoUKcberP+c9\n"
" c+Pj7unVvPkyBqbwKmHWBSOj4S4e7W5oSH9nHhrW1jnyCtQZClVD86hh6E7vpEDb8Ny+AbwuSlI+\n"
" b4KyFDt6/fEADBnCOeFgDID42jkBQ+wFjNEAGMJtbcK5WgAODg==\n"
+ "CALURI;ALTID=34;MEDIATYPE=text/plain;PID=31;PREF=32;CALENDARS=FLYING:http://e\n"
+ " xample.com\n"
+ "CALURI;TYPE=home;ALTID=44;MEDIATYPE=text/dryplain;PID=41;PREF=42;CALENDARS=GR\n"
+ " OUNDED:http://example.com/home\n"
+ "CALURI;TYPE=work;ALTID=54;MEDIATYPE=text/stillwetink;PID=51;PREF=52;CALENDARS\n"
+ " =CANCELLED:http://example.com/business\n"
"END:VCARD";
ASSERT_EQ(CONTACTLOAD_OK, TestFile3.LoadFile("LoadCheck-Load4.vcf"));