-
- ProcessSaveData(wxT("TEL"), &strValue2, &boolValue2, &boolValue,
- &iter, &strAddressFinalValue, &ContactData,
- wxT("ALTID"), &ContactEditorData.BusinessTelephoneListAltID,
- wxT("PID"), &ContactEditorData.BusinessTelephoneListPID,
- wxT("TYPE"), &ContactEditorData.BusinessTelephoneListType,
- wxT("PREF"), &ContactEditorData.BusinessTelephoneListPref,
- wxT(""), &ContactEditorData.BusinessTelephoneListTokens );
-
- ResetSaveProcessData();
-
- }
-
- ResetSaveProcessData();
-
- for (std::map<int,wxString>::iterator iter = ContactEditorData.GeneralLanguageList.begin();
- iter != ContactEditorData.GeneralLanguageList.end(); ++iter){
-
- intValue2 = iter->first;
-
- ProcessSaveData(wxT("LANG"), &strValue2, &boolValue2, &boolValue,
- &iter, &ContactEditorData.GeneralLanguageList, &ContactData,
- wxT("ALTID"), &ContactEditorData.GeneralLanguageListAltID,
- wxT("PID"), &ContactEditorData.GeneralLanguageListPID,
- wxT("PREF"), &ContactEditorData.GeneralLanguageListPref,
- wxT(""), &ContactEditorData.GeneralLanguageListTokens );
-
- ResetSaveProcessData();
-
- }
-
- ResetSaveProcessData();
-
- for (std::map<int,wxString>::iterator iter = ContactEditorData.HomeLanguageList.begin();
- iter != ContactEditorData.HomeLanguageList.end(); ++iter){
-
- ProcessSaveData(wxT("LANG;TYPE=home"), &strValue2, &boolValue2, &boolValue,
- &iter, &ContactEditorData.HomeLanguageList, &ContactData,
- wxT("ALTID"), &ContactEditorData.HomeLanguageListAltID,
- wxT("PID"), &ContactEditorData.HomeLanguageListPID,
- wxT("PREF"), &ContactEditorData.HomeLanguageListPref,
- wxT(""), &ContactEditorData.HomeLanguageListTokens );
-
- ResetSaveProcessData();
-
- }
-
- ResetSaveProcessData();
-
- for (std::map<int,wxString>::iterator iter = ContactEditorData.BusinessLanguageList.begin();
- iter != ContactEditorData.BusinessLanguageList.end(); ++iter){
-
- ProcessSaveData(wxT("LANG;TYPE=work"), &strValue2, &boolValue2, &boolValue,
- &iter, &ContactEditorData.BusinessLanguageList, &ContactData,
- wxT("ALTID"), &ContactEditorData.BusinessLanguageListAltID,
- wxT("PID"), &ContactEditorData.BusinessLanguageListPID,
- wxT("PREF"), &ContactEditorData.BusinessLanguageListPref,
- wxT(""), &ContactEditorData.BusinessLanguageListTokens );
-
- ResetSaveProcessData();
-
- }
-
- ResetSaveProcessData();
-
- for (std::map<int,wxString>::iterator iter = ContactEditorData.GeneralTZList.begin();
- iter != ContactEditorData.GeneralTZList.end(); ++iter){
-
- ProcessSaveData(wxT("TZ"), &strValue2, &boolValue2, &boolValue,
- &iter, &ContactEditorData.GeneralTZList, &ContactData,
- wxT("ALTID"), &ContactEditorData.GeneralTZListAltID,
- wxT("PID"), &ContactEditorData.GeneralTZListPID,
- wxT("MEDIATYPE"), &ContactEditorData.GeneralTZListMediatype,
- wxT("PREF"), &ContactEditorData.GeneralTZListPref,
- wxT(""), &ContactEditorData.GeneralTZListTokens );
-
- ResetSaveProcessData();
-
- }
-
- ResetSaveProcessData();
-
- for (std::map<int,wxString>::iterator iter = ContactEditorData.HomeTZList.begin();
- iter != ContactEditorData.HomeTZList.end(); ++iter){
-
- ProcessSaveData(wxT("TZ;TYPE=home"), &strValue2, &boolValue2, &boolValue,
- &iter, &ContactEditorData.HomeTZList, &ContactData,
- wxT("ALTID"), &ContactEditorData.HomeTZListAltID,
- wxT("PID"), &ContactEditorData.HomeTZListPID,
- wxT("MEDIATYPE"), &ContactEditorData.HomeTZListMediatype,
- wxT("PREF"), &ContactEditorData.HomeTZListPref,
- wxT(""), &ContactEditorData.HomeTZListTokens );
-
- ResetSaveProcessData();
-
- }
-
- ResetSaveProcessData();
-
- for (std::map<int,wxString>::iterator iter = ContactEditorData.BusinessTZList.begin();
- iter != ContactEditorData.BusinessTZList.end(); ++iter){
-
- ProcessSaveData(wxT("TZ;TYPE=work"), &strValue2, &boolValue2, &boolValue,
- &iter, &ContactEditorData.BusinessTZList, &ContactData,
- wxT("ALTID"), &ContactEditorData.BusinessTZListAltID,
- wxT("PID"), &ContactEditorData.BusinessTZListPID,
- wxT("MEDIATYPE"), &ContactEditorData.BusinessTZListMediatype,
- wxT("PREF"), &ContactEditorData.BusinessTZListPref,
- wxT(""), &ContactEditorData.BusinessTZListTokens );
-
- ResetSaveProcessData();
-
- }
-
- ResetSaveProcessData();
-
- for (std::map<int,wxString>::iterator iter = ContactEditorData.GeneralGeographyList.begin();
- iter != ContactEditorData.GeneralGeographyList.end(); ++iter){
-
- wxString strAddressFinalValue = iter->second;
-
- ProcessCaptureStrings(&strAddressFinalValue);
-
- strAddressFinalValue.insert(0, wxT("geo:"));
-
- ProcessSaveData(wxT("GEO"), &strValue2, &boolValue2, &boolValue,
- &iter, &strAddressFinalValue, &ContactData,
- wxT("ALTID"), &ContactEditorData.GeneralGeographyListAltID,
- wxT("PID"), &ContactEditorData.GeneralGeographyListPID,
- wxT("MEDIATYPE"), &ContactEditorData.GeneralGeographyListMediatype,
- wxT("PREF"), &ContactEditorData.GeneralGeographyListPref,
- wxT(""), &ContactEditorData.GeneralGeographyListTokens );
-
- ResetSaveProcessData();
-
- }
-
- ResetSaveProcessData();
-
- for (std::map<int,wxString>::iterator iter = ContactEditorData.HomeGeographyList.begin();
- iter != ContactEditorData.HomeGeographyList.end(); ++iter){
-
- wxString strAddressFinalValue = iter->second;
-
- ProcessCaptureStrings(&strAddressFinalValue);
-
- strAddressFinalValue.insert(0, wxT("geo:"));
-
- ProcessSaveData(wxT("GEO;TYPE=home"), &strValue2, &boolValue2, &boolValue,
- &iter, &ContactEditorData.HomeGeographyList, &ContactData,
- wxT("ALTID"), &ContactEditorData.HomeGeographyListAltID,
- wxT("PID"), &ContactEditorData.HomeGeographyListPID,
- wxT("MEDIATYPE"), &ContactEditorData.HomeGeographyListMediatype,
- wxT("PREF"), &ContactEditorData.HomeGeographyListPref,
- wxT(""), &ContactEditorData.HomeGeographyListTokens );
-
- ResetSaveProcessData();
-
- }
-
- ResetSaveProcessData();
-
- for (std::map<int,wxString>::iterator iter = ContactEditorData.BusinessGeographyList.begin();
- iter != ContactEditorData.BusinessGeographyList.end(); ++iter){
-
- wxString strAddressFinalValue = iter->second;
-
- ProcessCaptureStrings(&strAddressFinalValue);
-
- strAddressFinalValue.insert(0, wxT("geo:"));
-
- ProcessSaveData(wxT("GEO;TYPE=work"), &strValue2, &boolValue2, &boolValue,
- &iter, &ContactEditorData.BusinessGeographyList, &ContactData,
- wxT("ALTID"), &ContactEditorData.BusinessGeographyListAltID,
- wxT("PID"), &ContactEditorData.BusinessGeographyListPID,
- wxT("MEDIATYPE"), &ContactEditorData.BusinessGeographyListMediatype,
- wxT("PREF"), &ContactEditorData.BusinessGeographyListPref,
- wxT(""), &ContactEditorData.BusinessGeographyListTokens );
-
- ResetSaveProcessData();
-
- }
-
- ResetSaveProcessData();
-
- for (std::map<int,wxString>::iterator iter = ContactEditorData.GeneralRelatedList.begin();
- iter != ContactEditorData.GeneralRelatedList.end(); ++iter){
-
- ProcessSaveData(wxT("RELATED"), &strValue2, &boolValue2, &boolValue,
- &iter, &ContactEditorData.GeneralRelatedList, &ContactData,
- wxT("ALTID"), &ContactEditorData.GeneralRelatedListAltID,
- wxT("PID"), &ContactEditorData.GeneralRelatedListPID,
- wxT("LANGUAGE"), &ContactEditorData.GeneralRelatedListLanguage,
- wxT("TYPE"), &ContactEditorData.GeneralRelatedListRelType,
- wxT("PREF"), &ContactEditorData.GeneralRelatedListPref,
- wxT(""), &ContactEditorData.GeneralRelatedListTokens );
-
- ResetSaveProcessData();
-
- }
-
- ResetSaveProcessData();
-
- for (std::map<int,wxString>::iterator iter = ContactEditorData.GeneralWebsiteList.begin();
- iter != ContactEditorData.GeneralWebsiteList.end(); ++iter){
-
- ProcessSaveData(wxT("URL"), &strValue2, &boolValue2, &boolValue,
- &iter, &ContactEditorData.GeneralWebsiteList, &ContactData,
- wxT("ALTID"), &ContactEditorData.GeneralWebsiteListAltID,
- wxT("PID"), &ContactEditorData.GeneralWebsiteListPID,
- wxT("MEDIATYPE"), &ContactEditorData.GeneralWebsiteListMediatype,
- wxT("PREF"), &ContactEditorData.GeneralWebsiteListPref,
- wxT(""), &ContactEditorData.GeneralWebsiteListTokens );
-
- ResetSaveProcessData();
-
- }
-
- ResetSaveProcessData();
-
- for (std::map<int,wxString>::iterator iter = ContactEditorData.HomeWebsiteList.begin();
- iter != ContactEditorData.HomeWebsiteList.end(); ++iter){
-
- ProcessSaveData(wxT("URL;TYPE=home"), &strValue2, &boolValue2, &boolValue,
- &iter, &ContactEditorData.HomeWebsiteList, &ContactData,
- wxT("ALTID"), &ContactEditorData.HomeWebsiteListAltID,
- wxT("PID"), &ContactEditorData.HomeWebsiteListPID,
- wxT("MEDIATYPE"), &ContactEditorData.HomeWebsiteListMediatype,
- wxT("PREF"), &ContactEditorData.HomeWebsiteListPref,
- wxT(""), &ContactEditorData.HomeWebsiteListTokens );
-
- ResetSaveProcessData();
-
- }
-
- ResetSaveProcessData();
-
- for (std::map<int,wxString>::iterator iter = ContactEditorData.BusinessWebsiteList.begin();
- iter != ContactEditorData.BusinessWebsiteList.end(); ++iter){
-
- ProcessSaveData(wxT("URL;TYPE=work"), &strValue2, &boolValue2, &boolValue,
- &iter, &ContactEditorData.BusinessWebsiteList, &ContactData,
- wxT("ALTID"), &ContactEditorData.BusinessWebsiteListAltID,
- wxT("PID"), &ContactEditorData.BusinessWebsiteListPID,
- wxT("MEDIATYPE"), &ContactEditorData.BusinessWebsiteListMediatype,
- wxT("PREF"), &ContactEditorData.BusinessWebsiteListPref,
- wxT(""), &ContactEditorData.BusinessWebsiteListTokens );
-
- ResetSaveProcessData();
-
- }
-
- ResetSaveProcessData();
-
- for (std::map<int,wxString>::iterator iter = ContactEditorData.GeneralTitleList.begin();
- iter != ContactEditorData.GeneralTitleList.end(); ++iter){
-
- ProcessSaveData(wxT("TITLE"), &strValue2, &boolValue2, &boolValue,
- &iter, &ContactEditorData.GeneralTitleList, &ContactData,
- wxT("ALTID"), &ContactEditorData.GeneralTitleListAltID,
- wxT("PID"), &ContactEditorData.GeneralTitleListPID,
- wxT("LANGUAGE"), &ContactEditorData.GeneralTitleListLanguage,
- wxT("PREF"), &ContactEditorData.GeneralTitleListPref,
- wxT(""), &ContactEditorData.GeneralTitleListTokens );
-
- ResetSaveProcessData();
-
- }
-
- ResetSaveProcessData();
-
- for (std::map<int,wxString>::iterator iter = ContactEditorData.HomeTitleList.begin();
- iter != ContactEditorData.HomeTitleList.end(); ++iter){
-
- ProcessSaveData(wxT("TITLE;TYPE=home"), &strValue2, &boolValue2, &boolValue,
- &iter, &ContactEditorData.HomeTitleList, &ContactData,
- wxT("ALTID"), &ContactEditorData.HomeTitleListAltID,
- wxT("PID"), &ContactEditorData.HomeTitleListPID,
- wxT("LANGUAGE"), &ContactEditorData.HomeTitleListLanguage,
- wxT("PREF"), &ContactEditorData.HomeTitleListPref,
- wxT(""), &ContactEditorData.HomeTitleListTokens );
-
- ResetSaveProcessData();
-
- }
-
- ResetSaveProcessData();
-
- for (std::map<int,wxString>::iterator iter = ContactEditorData.BusinessTitleList.begin();
- iter != ContactEditorData.BusinessTitleList.end(); ++iter){
-
- ProcessSaveData(wxT("TITLE;TYPE=work"), &strValue2, &boolValue2, &boolValue,
- &iter, &ContactEditorData.BusinessTitleList, &ContactData,
- wxT("ALTID"), &ContactEditorData.BusinessTitleListAltID,
- wxT("PID"), &ContactEditorData.BusinessTitleListPID,
- wxT("LANGUAGE"), &ContactEditorData.BusinessTitleListLanguage,
- wxT("PREF"), &ContactEditorData.BusinessTitleListPref,
- wxT(""), &ContactEditorData.BusinessTitleListTokens );
-
- ResetSaveProcessData();
-
- }
-
- ResetSaveProcessData();
-
- for (std::map<int,wxString>::iterator iter = ContactEditorData.GeneralRoleList.begin();
- iter != ContactEditorData.GeneralRoleList.end(); ++iter){
-
- ProcessSaveData(wxT("ROLE"), &strValue2, &boolValue2, &boolValue,
- &iter, &ContactEditorData.GeneralRoleList, &ContactData,
- wxT("ALTID"), &ContactEditorData.GeneralRoleListAltID,
- wxT("PID"), &ContactEditorData.GeneralRoleListPID,
- wxT("LANGUAGE"), &ContactEditorData.GeneralRoleListLanguage,
- wxT("PREF"), &ContactEditorData.GeneralRoleListPref,
- wxT(""), &ContactEditorData.GeneralRoleListTokens );
-
- ResetSaveProcessData();
-
- }
-
- ResetSaveProcessData();
-
- for (std::map<int,wxString>::iterator iter = ContactEditorData.HomeRoleList.begin();
- iter != ContactEditorData.HomeRoleList.end(); ++iter){
-
- ProcessSaveData(wxT("ROLE;TYPE=home"), &strValue2, &boolValue2, &boolValue,
- &iter, &ContactEditorData.HomeRoleList, &ContactData,
- wxT("ALTID"), &ContactEditorData.HomeRoleListAltID,
- wxT("PID"), &ContactEditorData.HomeRoleListPID,
- wxT("LANGUAGE"), &ContactEditorData.HomeRoleListLanguage,
- wxT("PREF"), &ContactEditorData.HomeRoleListPref,
- wxT(""), &ContactEditorData.HomeRoleListTokens );
-
- ResetSaveProcessData();
-
- }
-
- ResetSaveProcessData();
-
- for (std::map<int,wxString>::iterator iter = ContactEditorData.BusinessRoleList.begin();
- iter != ContactEditorData.BusinessRoleList.end(); ++iter){
-
- ProcessSaveData(wxT("ROLE;TYPE=work"), &strValue2, &boolValue2, &boolValue,
- &iter, &ContactEditorData.BusinessRoleList, &ContactData,
- wxT("ALTID"), &ContactEditorData.BusinessRoleListAltID,
- wxT("PID"), &ContactEditorData.BusinessRoleListPID,
- wxT("LANGUAGE"), &ContactEditorData.BusinessRoleListLanguage,
- wxT("PREF"), &ContactEditorData.BusinessRoleListPref,
- wxT(""), &ContactEditorData.BusinessRoleListTokens );
-
- ResetSaveProcessData();
-
- }
-
- ResetSaveProcessData();
-
- for (std::map<int,wxString>::iterator iter = ContactEditorData.GeneralOrganisationsList.begin();
- iter != ContactEditorData.GeneralOrganisationsList.end(); ++iter){
-
- ProcessSaveData(wxT("ORG"), &strValue2, &boolValue2, &boolValue,
- &iter, &ContactEditorData.GeneralOrganisationsList, &ContactData,
- wxT("ALTID"), &ContactEditorData.GeneralOrganisationsListAltID,
- wxT("PID"), &ContactEditorData.GeneralOrganisationsListPID,
- wxT("LANGUAGE"), &ContactEditorData.GeneralOrganisationsListLanguage,
- wxT("SORT-AS"), &ContactEditorData.GeneralOrganisationsListSortAs,
- wxT("PREF"), &ContactEditorData.GeneralOrganisationsListPref,
- wxT(""), &ContactEditorData.GeneralOrganisationsListTokens );
-
- ResetSaveProcessData();
-
- }
-
- ResetSaveProcessData();
-
- for (std::map<int,wxString>::iterator iter = ContactEditorData.HomeOrganisationsList.begin();
- iter != ContactEditorData.HomeOrganisationsList.end(); ++iter){
-
- ProcessSaveData(wxT("ORG;TYPE=home"), &strValue2, &boolValue2, &boolValue,
- &iter, &ContactEditorData.HomeOrganisationsList, &ContactData,
- wxT("ALTID"), &ContactEditorData.HomeOrganisationsListAltID,
- wxT("PID"), &ContactEditorData.HomeOrganisationsListPID,
- wxT("LANGUAGE"), &ContactEditorData.HomeOrganisationsListLanguage,
- wxT("SORT-AS"), &ContactEditorData.HomeOrganisationsListSortAs,
- wxT("PREF"), &ContactEditorData.HomeOrganisationsListPref,
- wxT(""), &ContactEditorData.HomeOrganisationsListTokens );
-
- ResetSaveProcessData();
-
- }
-
- ResetSaveProcessData();
-
- for (std::map<int,wxString>::iterator iter = ContactEditorData.BusinessOrganisationsList.begin();
- iter != ContactEditorData.BusinessOrganisationsList.end(); ++iter){
-
- ProcessSaveData(wxT("ORG;TYPE=work"), &strValue2, &boolValue2, &boolValue,
- &iter, &ContactEditorData.BusinessOrganisationsList, &ContactData,
- wxT("ALTID"), &ContactEditorData.BusinessOrganisationsListAltID,
- wxT("PID"), &ContactEditorData.BusinessOrganisationsListPID,
- wxT("LANGUAGE"), &ContactEditorData.BusinessOrganisationsListLanguage,
- wxT("SORT-AS"), &ContactEditorData.BusinessOrganisationsListSortAs,
- wxT("PREF"), &ContactEditorData.BusinessOrganisationsListPref,
- wxT(""), &ContactEditorData.BusinessOrganisationsListTokens );
-
- ResetSaveProcessData();
-
- }
-
- ResetSaveProcessData();
-
- for (std::map<int,wxString>::iterator iter = ContactEditorData.GeneralNoteList.begin();
- iter != ContactEditorData.GeneralNoteList.end(); ++iter){
-
- ProcessSaveData(wxT("NOTE"), &strValue2, &boolValue2, &boolValue,
- &iter, &ContactEditorData.GeneralNoteList, &ContactData,
- wxT("ALTID"), &ContactEditorData.GeneralNoteListAltID,
- wxT("PID"), &ContactEditorData.GeneralNoteListPID,
- wxT("LANGUAGE"), &ContactEditorData.GeneralNoteListLanguage,
- wxT("PREF"), &ContactEditorData.GeneralNoteListPref,
- wxT(""), &ContactEditorData.GeneralNoteListTokens );
-
- ResetSaveProcessData();
-
- }
-
- ResetSaveProcessData();
-
- for (std::map<int,wxString>::iterator iter = ContactEditorData.HomeNoteList.begin();
- iter != ContactEditorData.HomeNoteList.end(); ++iter){
-
- ProcessSaveData(wxT("NOTE;TYPE=home"), &strValue2, &boolValue2, &boolValue,
- &iter, &ContactEditorData.HomeNoteList, &ContactData,
- wxT("ALTID"), &ContactEditorData.HomeNoteListAltID,
- wxT("PID"), &ContactEditorData.HomeNoteListPID,
- wxT("LANGUAGE"), &ContactEditorData.HomeNoteListLanguage,
- wxT("PREF"), &ContactEditorData.HomeNoteListPref,
- wxT(""), &ContactEditorData.HomeNoteListTokens );
-
- ResetSaveProcessData();
-
- }
-
- ResetSaveProcessData();
-
- for (std::map<int,wxString>::iterator iter = ContactEditorData.BusinessNoteList.begin();
- iter != ContactEditorData.BusinessNoteList.end(); ++iter){
-
- ProcessSaveData(wxT("NOTE;TYPE=work"), &strValue2, &boolValue2, &boolValue,
- &iter, &ContactEditorData.BusinessNoteList, &ContactData,
- wxT("ALTID"), &ContactEditorData.BusinessNoteListAltID,
- wxT("PID"), &ContactEditorData.BusinessNoteListPID,
- wxT("LANGUAGE"), &ContactEditorData.BusinessNoteListLanguage,
- wxT("PREF"), &ContactEditorData.BusinessNoteListPref,
- wxT(""), &ContactEditorData.BusinessNoteListTokens );
-
- ResetSaveProcessData();
-
- }
-
- ResetSaveProcessData();
-
- for (std::map<int,wxString>::iterator iter = ContactEditorData.CategoriesList.begin();
- iter != ContactEditorData.CategoriesList.end(); ++iter){
-
- ProcessSaveData(wxT("CATEGORIES"), &strValue2, &boolValue2, &boolValue,
- &iter, &ContactEditorData.CategoriesList, &ContactData,
- wxT("ALTID"), &ContactEditorData.CategoriesListAltID,
- wxT("PID"), &ContactEditorData.CategoriesListPID,
- wxT("TYPE"), &ContactEditorData.CategoriesListType,
- wxT("PREF"), &ContactEditorData.CategoriesListPref,
- wxT(""), &ContactEditorData.CategoriesListTokens );
-
- ResetSaveProcessData();
-
- }
-
- // Pictures.
-
- for (std::map<int, std::string>::iterator iter = ContactEditorData.PicturesList.begin();
- iter != ContactEditorData.PicturesList.end(); ++iter){
-
- int intValueIndex = iter->first;
-
- std::map<int, std::string>::iterator stdstriter;
- std::map<int, wxString>::iterator enciter;
-
- striter = ContactEditorData.PicturesListPictureType.find(intValueIndex);
- enciter = ContactEditorData.PicturesListPicEncType.find(intValueIndex);
-
- ProcessSaveData(wxT("PHOTO"), &strValue2, &boolValue2, &boolValue,
- &iter, &ContactEditorData.PicturesList, &striter,
- &enciter, &ContactData,
- wxT("ALTID"), &ContactEditorData.PicturesListAltID,
- wxT("PID"), &ContactEditorData.PicturesListPID,
- wxT("TYPE"), &ContactEditorData.PicturesListType,
- wxT("PREF"), &ContactEditorData.PicturesListPref,
- wxT(""), &ContactEditorData.PicturesListTokens);
-
- ResetSaveProcessData();
-
- }
-
- ResetSaveProcessData();
-
- // Logos.
-
- for (std::map<int, std::string>::iterator iter = ContactEditorData.LogosList.begin();
- iter != ContactEditorData.LogosList.end(); ++iter){
-
- int intValueIndex = iter->first;
-
- std::map<int, std::string>::iterator stdstriter;
- std::map<int, wxString>::iterator enciter;
-
- striter = ContactEditorData.LogosListPictureType.find(intValueIndex);
- enciter = ContactEditorData.LogosListPicEncType.find(intValueIndex);
-
- ProcessSaveData(wxT("LOGO"), &strValue2, &boolValue2, &boolValue,
- &iter, &ContactEditorData.LogosList, &striter,
- &enciter, &ContactData,
- wxT("ALTID"), &ContactEditorData.LogosListAltID,
- wxT("PID"), &ContactEditorData.LogosListPID,
- wxT("TYPE"), &ContactEditorData.LogosListType,
- wxT("PREF"), &ContactEditorData.LogosListPref,
- wxT(""), &ContactEditorData.LogosListTokens );
-
- ResetSaveProcessData();
-
- }
-
- ResetSaveProcessData();
-
- // Sounds.
-
- for (std::map<int, std::string>::iterator iter = ContactEditorData.SoundsList.begin();
- iter != ContactEditorData.SoundsList.end(); ++iter){
-
- int intValueIndex = iter->first;
-
- std::map<int, std::string>::iterator stdstriter;
- std::map<int, wxString>::iterator enciter;
-
- striter = ContactEditorData.SoundsListAudioType.find(intValueIndex);
- enciter = ContactEditorData.SoundsListAudioEncType.find(intValueIndex);
-
- ProcessSaveData(wxT("SOUND"), &strValue2, &boolValue2, &boolValue,
- &iter, &ContactEditorData.SoundsList, &striter,
- &enciter, &ContactData,
- wxT("ALTID"), &ContactEditorData.SoundsListAltID,
- wxT("PID"), &ContactEditorData.SoundsListPID,
- wxT("TYPE"), &ContactEditorData.SoundsListType,
- wxT("PREF"), &ContactEditorData.SoundsListPref,
- wxT(""), &ContactEditorData.SoundsListTokens );
-
- ResetSaveProcessData();
-
- }
-
- ResetSaveProcessData();
-
- for (std::map<int,wxString>::iterator iter = ContactEditorData.CalendarList.begin();
- iter != ContactEditorData.CalendarList.end(); ++iter){
-
- ProcessSaveData(wxT("CALURI"), &strValue2, &boolValue2, &boolValue,
- &iter, &ContactEditorData.CalendarList, &ContactData,
- wxT("ALTID"), &ContactEditorData.CalendarListAltID,
- wxT("PID"), &ContactEditorData.CalendarListPID,
- wxT("MEDIATYPE"), &ContactEditorData.CalendarListMediatype,
- wxT("TYPE"), &ContactEditorData.CalendarListType,
- wxT("PREF"), &ContactEditorData.CalendarListPref,
- wxT(""), &ContactEditorData.CalendarListTokens );
-
- ResetSaveProcessData();
-
- }
-
- ResetSaveProcessData();
-
- for (std::map<int,wxString>::iterator iter = ContactEditorData.CalendarRequestList.begin();
- iter != ContactEditorData.CalendarRequestList.end(); ++iter){
-
- ProcessSaveData(wxT("CALADRURI"), &strValue2, &boolValue2, &boolValue,
- &iter, &ContactEditorData.CalendarRequestList, &ContactData,
- wxT("ALTID"), &ContactEditorData.CalendarRequestListAltID,
- wxT("PID"), &ContactEditorData.CalendarRequestListPID,
- wxT("MEDIATYPE"), &ContactEditorData.CalendarRequestListMediatype,
- wxT("TYPE"), &ContactEditorData.CalendarRequestListType,
- wxT("PREF"), &ContactEditorData.CalendarRequestListPref,
- wxT(""), &ContactEditorData.CalendarRequestListTokens );
-
- ResetSaveProcessData();
-
- }
-
- ResetSaveProcessData();
-
- for (std::map<int,wxString>::iterator iter = ContactEditorData.FreeBusyList.begin();
- iter != ContactEditorData.FreeBusyList.end(); ++iter){
-
- ProcessSaveData(wxT("FBURL"), &strValue2, &boolValue2, &boolValue,
- &iter, &ContactEditorData.FreeBusyList, &ContactData,
- wxT("ALTID"), &ContactEditorData.FreeBusyListAltID,
- wxT("PID"), &ContactEditorData.FreeBusyListPID,
- wxT("MEDIATYPE"), &ContactEditorData.FreeBusyListMediatype,
- wxT("TYPE"), &ContactEditorData.FreeBusyListType,
- wxT("PREF"), &ContactEditorData.FreeBusyListPref,
- wxT(""), &ContactEditorData.FreeBusyListTokens );
-
- ResetSaveProcessData();
-
- }
-
- for (std::map<int, wxString>::iterator iter = ContactEditorData.KeyList.begin();
- iter != ContactEditorData.KeyList.end(); ++iter){
-
- intValue2 = iter->first;
-
- // Process Alternative ID.
-
- striter = ContactEditorData.KeyListAltID.find(intValue2);
-
- if (striter->first == intValue2){
-
- strValue3 = striter->second;
-
- if (!strValue3.IsEmpty()){
-
- strValue3.Trim();
- strValue3.Trim();
-
- if (boolValue2 == TRUE){
-
- strValue2.Append(wxT(";"));
-
- } else {
-
- boolValue2 = TRUE;
-
- }
-
- strValue2.Append(wxT("ALTID=") + strValue3);
-
- boolValue = TRUE;
-
- }
-
- }
-
- // Process PID.
-
- striter = ContactEditorData.KeyListPID.find(intValue2);
-
- if (striter->first == intValue2){
-
- strValue3 = striter->second;
-
- if (!strValue3.IsEmpty()){
-
- strValue3.Trim();
- strValue3.Trim();
-
- if (boolValue2 == TRUE){
-
- strValue2.Append(wxT(";"));
-
- } else {
-
- boolValue2 = TRUE;
-
- }
-
- strValue2.Append(wxT("PID=") + strValue3);
-
- boolValue = TRUE;
-
- }
-
- }
-
- // Process Type.
-
- striter = ContactEditorData.KeyListType.find(intValue2);
-
- if (striter->first == intValue2){
-
- strValue3 = striter->second;
-
- if (!strValue3.IsEmpty()){
-
- strValue3.Trim();
- strValue3.Trim();
-
- if (boolValue2 == TRUE){
-
- strValue2.Append(wxT(";"));
-
- } else {
-
- boolValue2 = TRUE;
-
- }
-
- strValue2.Append(wxT("TYPE=") + strValue3);
-
- boolValue = TRUE;
-
- }
-
- }
-
- intiter = ContactEditorData.KeyListPref.find(intValue2);
-
- if (intiter->first == intValue2){
-
- intValue3 = intiter->second;
-
- if (intValue3){
-
- if (boolValue2 == TRUE){
-
- strValue2.Append(wxT(";"));
-
- } else {
-
- boolValue2 = TRUE;
-
- }
-
- strValue2.Append(wxT("PREF=") + wxString::Format(wxT("%i"), intValue3));
-
- boolValue = TRUE;
-
- }
-
- }
-
- // Process Tokens.
-
- striter = ContactEditorData.KeyListTokens.find(intValue2);
-
- if (striter->first == intValue2){
-
- strValue3 = striter->second;
-
- if (!strValue3.IsEmpty()){
-
- strValue3.Trim();
- strValue3.Trim();
-
- if (boolValue2 == TRUE){
-
- strValue2.Append(wxT(";"));
-
- } else {
-
- boolValue2 = TRUE;
-
- }
-
- strValue2.Append(strValue3);
-
- boolValue = TRUE;
-
- }
-
- }
-
- // Get the key information.
-
- std::map<int, wxString>::iterator enciter;
-
- striter = ContactEditorData.KeyListDataType.find(intValue2);
- //enciter = KeyListAudioEncType.find(intValue2);
-
- wxString strValueData;
-
- strValueData = iter->second;
- //strValueData.insert(0, wxT("data:") + striter->second + wxT(";") + enciter->second + wxT(","));
- strValueData.insert(0, wxT("data:") + striter->second + wxT(";base64,"));
-
-
- // Add to the vCard.
-
- if (boolValue == TRUE){
-
- ContactData.AddRaw(wxT("KEY;") + strValue2, strValueData);
-
- } else {
-
- ContactData.Add(wxT("KEY"), strValueData, TRUE);
-
- }
-
- ResetSaveProcessData();
-
- }
-
- // Vendor specific items.
-
- ResetSaveProcessData();
-
- for (std::map<int,wxString>::iterator iter = ContactEditorData.VendorList.begin();
- iter != ContactEditorData.VendorList.end(); ++iter){
-
- intValue2 = iter->first;
-
- // Get the IANA PEN number.
-
- striter = ContactEditorData.VendorListPEN.find(intValue2);
-
- if (striter->first == intValue2){
-
- strValue2 = striter->second;
-
- }
-
- // Get the element name.
-
- striter = ContactEditorData.VendorListElement.find(intValue2);
-
- if (striter->first == intValue2){
-
- strValue3 = striter->second;
-
- }
-
- // Get the address.
-
- striter = ContactEditorData.VendorList.find(intValue2);
-
- if (striter->first == intValue2){
-
- strValue = striter->second;
-
- }
-
- // Add to the vCard.
-
- if (boolValue == TRUE){
-
- ContactData.AddRaw(wxT("VND-") + strValue2 + wxT("-") + strValue3, strValue);
-
- } else {
-
- ContactData.Add(wxT("VND-") + strValue2 + wxT("-") + strValue3, strValue, FALSE);
-
- }
-
- ResetSaveProcessData();
-
- }
-
- ResetSaveProcessData();
-
- // X-Tokens.
-
- for (std::map<int,wxString>::iterator iter = ContactEditorData.XTokenList.begin();
- iter != ContactEditorData.XTokenList.end(); ++iter){
-
- intValue2 = iter->first;
-
- // Get the element name.
-
- striter = ContactEditorData.XTokenListTokens.find(intValue2);
-
- if (striter->first == intValue2){
-
- strValue2 = striter->second;
-
- }
-
- // Get the address.
-
- striter = ContactEditorData.XTokenList.find(intValue2);
-
- if (striter->first == intValue2){
-
- strValue = striter->second;
-
- }
-
- // Add to the vCard.
-
- if (boolValue == TRUE){
-
- ContactData.AddRaw(wxT("X-") + strValue2, strValue);
-
- } else {
-
- ContactData.Add(wxT("X-") + strValue2, strValue, FALSE);
-
- }
-
- ResetSaveProcessData();
-
- }
-
- ResetSaveProcessData();
-
- if (ContactEditorData.FullNamesList.size() == 0){
-
- wxString FullName = cmbDisplayAs->GetValue();
- ContactEditorData.FullNamesList.insert(std::make_pair(0, FullName));
- ContactEditorData.FullNamesListAltID.insert(std::make_pair(0, wxT("")));
- ContactEditorData.FullNamesListPID.insert(std::make_pair(0, wxT("")));
- ContactEditorData.FullNamesListType.insert(std::make_pair(0, wxT("")));
- ContactEditorData.FullNamesListLanguage.insert(std::make_pair(0, wxT("")));
- ContactEditorData.FullNamesListPref.insert(std::make_pair(0, 0));
- ContactEditorData.FullNamesListTokens.insert(std::make_pair(0, wxT("")));
- FNFirst = FALSE;
-
- }
-
- for (std::map<int, wxString>::iterator iter = ContactEditorData.FullNamesList.begin();
- iter != ContactEditorData.FullNamesList.end(); ++iter){
-
- if (FNFirst == TRUE){
-
- iter->second = cmbDisplayAs->GetValue();
- FNFirst = FALSE;
-
- }
-
- std::map<int,wxString>::iterator mapS;
-
- mapS = ContactEditorData.FullNamesListTokens.find(iter->first);
-
- ProcessSaveData(wxT("FN"), &strValue2, &boolValue2, &boolValue,
- &iter, &ContactEditorData.FullNamesList, &ContactData,
- wxT("ALTID"), &ContactEditorData.FullNamesListAltID,
- wxT("PID"), &ContactEditorData.FullNamesListPID,
- wxT("TYPE"), &ContactEditorData.FullNamesListType,
- wxT("LANGUAGE"), &ContactEditorData.FullNamesListLanguage,
- wxT("PREF"), &ContactEditorData.FullNamesListPref,
- wxT(""), &ContactEditorData.FullNamesListTokens );
-
- // Get the address.
-
- ResetSaveProcessData();
-
- }
-
- //ContactData.Add(wxT("FN"), cmbDisplayAs->GetValue(), FALSE);
-
- // Insert revision (REV) date.
-
- // Get today's date and time.
-
- wxDateTime DateTimeNow = wxDateTime::Now();
-
- wxString DateRev;
-
- // Set year, month and date.
-
- int intYear = DateTimeNow.GetYear();
- int intMonth = DateTimeNow.GetMonth();
- int intDay = DateTimeNow.GetDay();
-
- DateRev.Append(wxT("0") + wxString::Format(wxT("%i"), intYear));
-
- if (intMonth < 10){
-
- DateRev.Append(wxT("0") + wxString::Format(wxT("%i"), intMonth));
-
- } else {
-
- DateRev.Append(wxString::Format(wxT("%i"), intMonth));
-
- }
-
- if (intDay < 10){
-
- DateRev.Append(wxT("0") + wxString::Format(wxT("%i"), intDay));
-
- } else {
-
- DateRev.Append(wxString::Format(wxT("%i"), intDay));
-
- }
-
- //DateRev.Append(wx);
- //DateRev.Append(wx);
- //DateRev.Append(wx);
- DateRev.Append(wxT("T"));
-
- // Set hour, minute and second.
-
- int intHour = DateTimeNow.GetHour();
- int intMinute = DateTimeNow.GetMinute();
- int intSecond = DateTimeNow.GetSecond();
-
- if (intHour < 10){
-
- DateRev.Append(wxT("0") + wxString::Format(wxT("%i"), intHour));
-
- } else {
-
- DateRev.Append(wxString::Format(wxT("%i"), intHour));
-
- }
-
- if (intMinute < 10){
-
- DateRev.Append(wxT("0") + wxString::Format(wxT("%i"), intMinute));
-
- } else {
-
- DateRev.Append(wxString::Format(wxT("%i"), intMinute));
-
- }
-
- if (intSecond < 10){
-
- DateRev.Append(wxT("0") + wxString::Format(wxT("%i"), intSecond));
-
- } else {
-
- DateRev.Append(wxString::Format(wxT("%i"), intSecond));
-
- }
-
- // DateRev.Append(wx);
- // DateRev.Append(wx);
- // DateRev.Append(wxString DateTimeNow->);
- DateRev.Append(wxT("Z"));
-
- ContactData.Add(wxT("UID"), ContactEditorData.UIDToken, FALSE);
-
- // End the vCard File.
-
- ContactData.Add(wxT("END"), wxT("VCARD"), FALSE);
-
- FMTimer.Stop();
- ContactData.WriteFile(FilenameFinal);
-
- vCard34Conv ConvFileFun;
-
- wxString wxSData;
-
- ConvFileFun.ConvertToV3(FilenameFinal, &wxSData);
-
- wxString AccountDirPrefix;
- wxString AccountDir;
- wxString PrefDir;
-
-#if defined(__HAIKU__)
-
- //preffilename = wxT("noo");
-
-#elif defined(__APPLE__)
-
- PrefDir = GetUserPrefDir();
-
- wxStringTokenizer wSTFilename(wxSContactFilename, wxT("/"));
-
-#elif defined(__WIN32__)
-
- PrefDir = GetUserPrefDir();
-
- wxStringTokenizer wSTFilename(wxSContactFilename, wxT("\\"));
-
-#else
-
- PrefDir = GetUserPrefDir();
-
- wxStringTokenizer wSTFilename(wxSContactFilename, wxT("/"));
-
-#endif
-
- XABPreferences PrefData(PrefDir);
-
- wxString AccountType;
-
- for (int i = 0; i < PrefData.accounts.GetCount(); i++){
-
- AccountDir = PrefData.accounts.GetAccountDirectory(i) + wxT(".carddav");
-
- if (AccountDir == wxSContactAccount){
-
- AccountDirPrefix = PrefData.accounts.GetAccountDirPrefix(i);
- AccountDirPrefix.Trim();
- AccountType = PrefData.accounts.GetAccountType(i);
- break;
-
- }
-
- }
-
- wxString wxSplitFilename;
- wxString wxSDataURL;
-
- while(wSTFilename.HasMoreTokens()){
-
- wxSplitFilename = wSTFilename.GetNextToken();
-
- }
-
- wxSDataURL = wxSplitFilename;
- //wxSDataURL.Append(wxSplitFilename);
-
- // Find out if the filename exists in the table.
-
- if (AccountType == wxT("CardDAV") || AccountType == wxT("carddav")){
-
- wxString ETagResult;
- wxString ETagOriginal;
-
- ETagDB *ETagDBPtr = NULL;
-
- ETagDBPtr = ETagTmrPtr->GetPointer(wxSContactAccount);
-
- wxString wxSETag = ETagDBPtr->GetETag(wxSplitFilename);
- wxString wxSETagOrig = ETagDBPtr->GetETagOriginal(wxSplitFilename);
-
- if (wxSETagOrig.IsEmpty()){
-
- // Generate the ETag.
-
- wxSETagOrig = wxString::Format(wxT("%X%X%X%X"), rand() % 1024, rand() % 1024, rand() % 1024, rand() % 1024);
-
- }
-
- if (wxSETag.IsEmpty()){
-
- // Update empty ETag.
-
- wxSETag = wxSETagOrig;
- ETagDBPtr->UpdateETag(wxSplitFilename, wxSETag, wxSETagOrig);
-
- }
- else {
-
- // Don't change original ETag.
-
- wxSETag = wxString::Format(wxT("%X%X%X%X"), rand() % 1024, rand() % 1024, rand() % 1024, rand() % 1024);
- ETagDBPtr->UpdateETag(wxSplitFilename, wxSETag);
-
- }
-
- if (EditMode == FALSE){
-
- ActMgrPtr->AddTask(0, cmbDisplayAs->GetValue(), wxSContactAccount, wxSDataURL, wxSplitFilename, FilenameFinal, wxSData);
- EditMode = TRUE;
- FMTimer.SetFilename(FilenameFinal);
- FMTimer.UpdateTimestamp();
- FMTimer.Start(10000, FALSE);
-
- wxCommandEvent reloadevent(RELOADCONTACTLIST);
- reloadevent.SetString(wxSContactAccount);
- wxPostEvent(this->GetParent(), reloadevent);
-
- }
- else {
-
- ActMgrPtr->AddTask(1, cmbDisplayAs->GetValue(), wxSContactAccount, wxSDataURL, wxSplitFilename, FilenameFinal, wxSData);
- FMTimer.UpdateTimestamp();
- FMTimer.Start(10000, FALSE);
-
- }
-
- }
-
- // Send a notification to update the main window
- // with the new details.
-
- UCNotif *ucd;
- ucd = new UCNotif;
-
- // TODO: Workout nickname settings by priority and
- // type.
-
- ucd->ContactAccount = wxSContactAccount;
- ucd->ContactFilename = FilenameFinal;
- ucd->ContactName = cmbDisplayAs->GetValue();
- ucd->ContactNameArray = ContactData.GetName();
-
- for (std::map<int,wxString>::iterator gniter = ContactEditorData.GeneralNicknamesList.begin();
- gniter != ContactEditorData.GeneralNicknamesList.end(); gniter++){
-
- ucd->ContactNickname = gniter->second;
- break;
-
- }
-
- wxCommandEvent event2(CE_UPDATECONTACTLIST);
- event2.SetClientData(ucd);
- wxPostEvent(MainPtr, event2);
-
-}
-
-void frmContactEditor::SaveCloseContact( wxCommandEvent& event )
-{
-
- // Save the updated contact data and close the form.
-
- wxCommandEvent NullEvent;
- this->SaveContact(NullEvent);
- this->Close();