&BusinessEmailListPref, &BusinessEmailListTokens,
SaveData, "work");
- // TODO: Process IMPP.
-
-
+ // Process IMPP.
+ SaveIMPP(&GeneralIMList, &GeneralIMListAltID,
+ &GeneralIMListPID, &GeneralIMListType,
+ &GeneralIMListTypeInfo, &GeneralIMListMediatype,
+ &GeneralIMListPref, &GeneralIMListTokens,
+ SaveData, "");
+ SaveIMPP(&HomeIMList, &HomeIMListAltID,
+ &HomeIMListPID, &HomeIMListType,
+ &HomeIMListTypeInfo, &HomeIMListMediatype,
+ &HomeIMListPref, &HomeIMListTokens,
+ SaveData, "home");
+ SaveIMPP(&BusinessIMList, &BusinessIMListAltID,
+ &BusinessIMListPID, &BusinessIMListType,
+ &BusinessIMListTypeInfo, &BusinessIMListMediatype,
+ &BusinessIMListPref, &BusinessIMListTokens,
+ SaveData, "work");
+
// TODO: Process TEL.
}
+void ContactDataObject::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, int> *IMListPref, map<int, wxString> *IMListTokens,
+ wxString *SaveData, wxString DataType){
+
+ wxString ProcessData = "";
+
+ for (std::map<int, wxString>::iterator IMIter = IMList->begin();
+ IMIter != IMList->end(); IMIter++){
+
+ ProcessData.Append("IMPP");
+
+ // 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 ((*IMListAltID)[IMIter->first].size() > 0){
+
+ ProcessData.Append(";ALTID=");
+ ProcessData.Append((*IMListAltID)[IMIter->first]);
+
+ }
+
+ // Check if there is a value for MEDIATYPE.
+
+ if ((*IMListMediatype)[IMIter->first].size() > 0){
+
+ ProcessData.Append(";MEDIATYPE=");
+ ProcessData.Append((*IMListMediatype)[IMIter->first]);
+
+ }
+
+ // Check if there is a value for PID.
+
+ if ((*IMListPID)[IMIter->first].size() > 0){
+
+ ProcessData.Append(";PID=");
+ ProcessData.Append((*IMListPID)[IMIter->first]);
+
+ }
+
+ // Check if there is a value for PREF.
+
+ if ((*IMListPref)[IMIter->first] > 0){
+
+ ProcessData.Append(";PREF=");
+ ProcessData.Append(wxString::Format("%i", (*IMListPref)[IMIter->first]));
+
+ }
+
+ // Check if there is a value for tokens.
+
+ if ((*IMListTokens)[IMIter->first].size() > 0){
+
+ ProcessData.Append(";");
+ ProcessData.Append((*IMListTokens)[IMIter->first]);
+
+ }
+
+ ProcessData.Append(":");
+ ProcessData.Append((*IMListTypeInfo)[IMIter->first]);
+ ProcessData.Append(":");
+ ProcessData.Append(IMIter->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,
map<int, wxString> *EmailListPID, map<int, wxString> *EmailListType,
map<int, int> *EmailListPref, map<int, wxString> *EmailListTokens,
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, int> *IMListPref, map<int, wxString> *IMListTokens,
+ 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,