&BusinessIMListPref, &BusinessIMListTokens,
SaveData, "work");
- // TODO: Process TEL.
-
-
+ // Process TEL.
+ SaveTelephone(&GeneralTelephoneList, &GeneralTelephoneListAltID,
+ &GeneralTelephoneListPID, &GeneralTelephoneListType,
+ &GeneralTelephoneListTypeInfo, &GeneralTelephoneListDataType,
+ &GeneralTelephoneListPref, &GeneralTelephoneListTokens,
+ SaveData, "");
+ SaveTelephone(&HomeTelephoneList, &HomeTelephoneListAltID,
+ &HomeTelephoneListPID, &HomeTelephoneListType,
+ &HomeTelephoneListTypeInfo, &HomeTelephoneListDataType,
+ &HomeTelephoneListPref, &HomeTelephoneListTokens,
+ SaveData, "home");
+ SaveTelephone(&BusinessTelephoneList, &BusinessTelephoneListAltID,
+ &BusinessTelephoneListPID, &BusinessTelephoneListType,
+ &BusinessTelephoneListTypeInfo, &BusinessTelephoneListDataType,
+ &BusinessTelephoneListPref, &BusinessTelephoneListTokens,
+ SaveData, "work");
+
// Process LANG.
SaveLanguage(&GeneralLanguageList, &GeneralLanguageListAltID,
}
+void ContactDataObject::SaveTelephone(map<int, wxString> *TelephoneList, map<int, wxString> *TelephoneListAltID,
+ map<int, wxString> *TelephoneListPID, map<int, wxString> *TelephoneListType,
+ map<int, wxString> *TelephoneListTypeInfo, map<int, wxString> *TelephoneListDataType,
+ map<int, int> *TelephoneListPref, map<int, wxString> *TelephoneListTokens,
+ wxString *SaveData, wxString DataType){
+
+ wxString ProcessData = "";
+
+ for (std::map<int, wxString>::iterator TelephoneIter = TelephoneList->begin();
+ TelephoneIter != TelephoneList->end(); TelephoneIter++){
+
+ ProcessData.Append("TEL");
+
+ // Check if there is a value for TYPE.
+
+ if (DataType.size() > 0 || (*TelephoneListAltID)[TelephoneIter->first].size() > 0){
+
+ ProcessData.Append(";TYPE=\"");
+
+ bool ProcessedType = false;
+
+ if (DataType.size() > 0){
+
+ ProcessData.Append(DataType);
+ ProcessedType = true;
+
+ }
+
+ if ((*TelephoneListAltID)[TelephoneIter->first].size() > 0){
+
+ if (ProcessedType == true){
+ ProcessData.Append(",");
+ }
+ ProcessData.Append((*TelephoneListTypeInfo)[TelephoneIter->first]);
+
+ }
+
+ ProcessData.Append("\"");
+
+ }
+
+ // Check if there is a value for ALTID.
+
+ if ((*TelephoneListAltID)[TelephoneIter->first].size() > 0){
+
+ ProcessData.Append(";ALTID=");
+ ProcessData.Append((*TelephoneListAltID)[TelephoneIter->first]);
+
+ }
+
+ // Check if there is a value for PID.
+
+ if ((*TelephoneListPID)[TelephoneIter->first].size() > 0){
+
+ ProcessData.Append(";PID=");
+ ProcessData.Append((*TelephoneListPID)[TelephoneIter->first]);
+
+ }
+
+ // Check if there is a value for PREF.
+
+ if ((*TelephoneListPref)[TelephoneIter->first] > 0){
+
+ ProcessData.Append(";PREF=");
+ ProcessData.Append(wxString::Format("%i", (*TelephoneListPref)[TelephoneIter->first]));
+
+ }
+
+ // Check if there is a value for tokens.
+
+ if ((*TelephoneListTokens)[TelephoneIter->first].size() > 0){
+
+ ProcessData.Append(";");
+ ProcessData.Append((*TelephoneListTokens)[TelephoneIter->first]);
+
+ }
+
+ ProcessData.Append(":");
+ ProcessData.Append((*TelephoneListDataType)[TelephoneIter->first]);
+ ProcessData.Append(":");
+ ProcessData.Append(TelephoneIter->second);
+ ProcessData.Append("\n");
+
+ ProcessData = OutputText(&ProcessData);
+
+ SaveData->Append(ProcessData);
+ ProcessData.clear();
+
+ }
+
+}
+
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);
void SaveIMPP(map<int, wxString> *IMList, map<int, wxString> *IMListAltID,
map<int, wxString> *IMListPID, map<int, wxString> *IMListType,
- map<int, wxString> *IMListTypeInfo, map<int, wxString> *IMListMediatype,
+ map<int, wxString> *IMListTypeInfo, map<int, wxString> *IMListDataType,
map<int, int> *IMListPref, map<int, wxString> *IMListTokens,
wxString *SaveData, wxString DataType);
+ void SaveTelephone(map<int, wxString> *TelephoneList, map<int, wxString> *TelephoneListAltID,
+ map<int, wxString> *TelephoneListPID, map<int, wxString> *TelephoneListType,
+ map<int, wxString> *TelephoneListTypeInfo, map<int, wxString> *TelephoneListMediatype,
+ map<int, int> *TelephoneListPref, map<int, wxString> *TelephoneListTokens,
+ 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,