&BusinessEmailListPref, &BusinessEmailListTokens,
SaveData, "work");
+ // TODO: Process IMPP.
+
+ // TODO: Process TEL.
+
+ // Process LANG.
+
+ SaveLanguage(&GeneralLanguageList, &GeneralLanguageListAltID,
+ &GeneralLanguageListPID, &GeneralLanguageListType,
+ &GeneralLanguageListPref, &GeneralLanguageListTokens,
+ SaveData, "");
+ SaveLanguage(&HomeLanguageList, &HomeLanguageListAltID,
+ &HomeLanguageListPID, &HomeLanguageListType,
+ &HomeLanguageListPref, &HomeLanguageListTokens,
+ SaveData, "home");
+ SaveLanguage(&BusinessLanguageList, &BusinessLanguageListAltID,
+ &BusinessLanguageListPID, &BusinessLanguageListType,
+ &BusinessLanguageListPref, &BusinessLanguageListTokens,
+ SaveData, "work");
+
// Write the end part of the vCard data file.
SaveData->Append("END:VCARD");
}
+}
+
+void ContactDataObject::SaveLanguage(map<int, wxString> *LanguageList, map<int, wxString> *LanguageListAltID,
+ map<int, wxString> *LanguageListPID, map<int, wxString> *LanguageListType,
+ map<int, int> *LangaugeListPref, map<int, wxString> *LanguageListTokens,
+ wxString *SaveData, wxString DataType){
+
+ wxString ProcessData = "";
+
+ for (std::map<int, wxString>::iterator LanguageIter = LanguageList->begin();
+ LanguageIter != LanguageList->end(); LanguageIter++){
+
+ ProcessData.Append("LANG");
+
+ // Check if there is a value for TYPE.
+
+ if (DataType.size() > 0){
+
+ ProcessData.Append(";TYPE=");
+ ProcessData.Append(DataType);
+
+ }
+
+ // Check if there is a value for ALTID.
+
+ if ((*LanguageListAltID)[LanguageIter->first].size() > 0){
+
+ ProcessData.Append(";ALTID=");
+ ProcessData.Append((*LanguageListAltID)[LanguageIter->first]);
+
+ }
+
+ // Check if there is a value for PID.
+
+ if ((*LanguageListPID)[LanguageIter->first].size() > 0){
+
+ ProcessData.Append(";PID=");
+ ProcessData.Append((*LanguageListPID)[LanguageIter->first]);
+
+ }
+
+ // Check if there is a value for PREF.
+
+ if ((*LangaugeListPref)[LanguageIter->first] > 0){
+
+ ProcessData.Append(";PREF=");
+ ProcessData.Append(wxString::Format("%i", (*LangaugeListPref)[LanguageIter->first]));
+
+ }
+
+ // Check if there is a value for tokens.
+
+ if ((*LanguageListTokens)[LanguageIter->first].size() > 0){
+
+ ProcessData.Append(";");
+ ProcessData.Append((*LanguageListTokens)[LanguageIter->first]);
+
+ }
+
+ ProcessData.Append(":");
+ ProcessData.Append(LanguageIter->second);
+ ProcessData.Append("\n");
+
+ ProcessData = OutputText(&ProcessData);
+
+ SaveData->Append(ProcessData);
+ ProcessData.clear();
+
+ }
+
}
\ No newline at end of file
map<int, wxString> *EmailListPID, map<int, wxString> *EmailListType,
map<int, int> *EmailListPref, map<int, wxString> *EmailListTokens,
wxString *SaveData, wxString DataType);
+ void SaveLanguage(map<int, wxString> *LanguageList, map<int, wxString> *LanguageListAltID,
+ map<int, wxString> *LanguageListPID, map<int, wxString> *LanguageListType,
+ map<int, int> *LangaugeListPref, map<int, wxString> *LanguageListTokens,
+ wxString *SaveData, wxString DataType);
public: