} else if (PropertyName == wxT("PREF")){
- ProcessIntegerValue(this, &SourceListPref, &PropertyValue, SourceCount);
+ ProcessIntegerValue(&SourceListPref, &PropertyValue, SourceCount);
} else if (PropertyName == wxT("MEDIATYPE")){
} else if (PropertyName == wxT("PREF")){
- ProcessIntegerValue(this, &GroupsListPref, &PropertyValue, GroupCount);
+ ProcessIntegerValue(&GroupsListPref, &PropertyValue, GroupCount);
} else if (PropertyName == wxT("MEDIATYPE")){
} else if (PropertyName == wxT("PREF")){
- ProcessIntegerValue(this, &FullNamesListPref, &PropertyValue, FNCount);
+ ProcessIntegerValue(&FullNamesListPref, &PropertyValue, FNCount);
} else if (!PropertyName.IsEmpty() && !PropertyValue.IsEmpty()){
} else if (PropertyName == wxT("PREF")){
- ProcessIntegerValue(this, NicknamesListPref, &PropertyValue, NicknameCount);
+ ProcessIntegerValue(NicknamesListPref, &PropertyValue, NicknameCount);
} else if (PropertyName == wxT("LANGUAGE")){
} else if (PropertyName == wxT("PREF")){
- ProcessIntegerValue(this, TZListPref, &PropertyValue, TimeZoneCount);
+ ProcessIntegerValue(TZListPref, &PropertyValue, TimeZoneCount);
} else if (PropertyName == wxT("MEDIATYPE")){
} else if (PropertyName == wxT("PREF")){
- ProcessIntegerValue(this, AddressListPref, &PropertyValue, AddressCount);
+ ProcessIntegerValue(AddressListPref, &PropertyValue, AddressCount);
} else {
} else if (PropertyName == wxT("PREF")){
- ProcessIntegerValue(this, EmailListPref, &PropertyValue, EmailCount);
+ ProcessIntegerValue(EmailListPref, &PropertyValue, EmailCount);
} else {
} else if (PropertyName == wxT("PREF")){
- ProcessIntegerValue(this, IMListPref, &PropertyValue, IMCount);
+ ProcessIntegerValue(IMListPref, &PropertyValue, IMCount);
} else {
} else if (PropertyName == wxT("PREF")){
- ProcessIntegerValue(this, TelephoneListPref, &PropertyValue, TelephoneCount);
+ ProcessIntegerValue(TelephoneListPref, &PropertyValue, TelephoneCount);
} else {
} else if (PropertyName == wxT("PREF")){
- ProcessIntegerValue(this, LanguageListPref, &PropertyValue, LanguageCount);
+ ProcessIntegerValue(LanguageListPref, &PropertyValue, LanguageCount);
} else {
} else if (PropertyName == wxT("PREF")){
- ProcessIntegerValue(this, GeopositionListPref, &PropertyValue, GeographicCount);
+ ProcessIntegerValue(GeopositionListPref, &PropertyValue, GeographicCount);
} else {
} else if (PropertyName == wxT("LANGUAGE")){
- ProcessIntegerValue(this, &GeneralRelatedListPref, &PropertyValue, RelatedCount);
+ ProcessIntegerValue(&GeneralRelatedListPref, &PropertyValue, RelatedCount);
} else if (PropertyName != wxT("TYPE")) {
} else if (PropertyName == wxT("PREF")){
- ProcessIntegerValue(this, WebsiteListPref, &PropertyValue, URLCount);
+ ProcessIntegerValue(WebsiteListPref, &PropertyValue, URLCount);
} else if (PropertyName == wxT("MEDIATYPE")){
} else if (PropertyName == wxT("PREF")){
- ProcessIntegerValue(this, TitleListPref, &PropertyValue, TitleCount);
+ ProcessIntegerValue(TitleListPref, &PropertyValue, TitleCount);
} else if (PropertyName == wxT("LANGUAGE")){
} else if (PropertyName == wxT("PREF")){
- ProcessIntegerValue(this, RoleListPref, &PropertyValue, RoleCount);
+ ProcessIntegerValue(RoleListPref, &PropertyValue, RoleCount);
} else if (PropertyName == wxT("LANGUAGE")){
} else if (PropertyName == wxT("PREF")){
- ProcessIntegerValue(this, OrganisationsListPref, &PropertyValue, OrganisationCount);
+ ProcessIntegerValue(OrganisationsListPref, &PropertyValue, OrganisationCount);
} else if (PropertyName == wxT("LANGUAGE")){
} else if (PropertyName == wxT("PREF")){
- ProcessIntegerValue(this, NoteListPref, &PropertyValue, NoteCount);
+ ProcessIntegerValue(NoteListPref, &PropertyValue, NoteCount);
} else if (PropertyName == wxT("LANGUAGE")){
} else if (PropertyName == wxT("PREF")){
- ProcessIntegerValue(this, &CategoriesListPref, &PropertyValue, CategoryCount);
+ ProcessIntegerValue(&CategoriesListPref, &PropertyValue, CategoryCount);
} else if (PropertyName == wxT("LANGUAGE")){
} else if (PropertyName == wxT("PREF")){
- ProcessIntegerValue(this, &PicturesListPref, &PropertyValue, PhotoCount);
+ ProcessIntegerValue(&PicturesListPref, &PropertyValue, PhotoCount);
} else if (PropertyName == wxT("MEDIATYPE")){
} else if (PropertyName == wxT("PREF")){
- ProcessIntegerValue(this, &LogosListPref, &PropertyValue, LogoCount);
+ ProcessIntegerValue(&LogosListPref, &PropertyValue, LogoCount);
} else if (PropertyName == wxT("MEDIATYPE")){
} else if (PropertyName == wxT("PREF")){
- ProcessIntegerValue(this, &SoundsListPref, &PropertyValue, SoundCount);
+ ProcessIntegerValue(&SoundsListPref, &PropertyValue, SoundCount);
} else if (PropertyName == wxT("MEDIATYPE")){
} else if (PropertyName == wxT("PREF")){
- ProcessIntegerValue(this, &CalendarListPref, &PropertyValue, CalURICount);
+ ProcessIntegerValue(&CalendarListPref, &PropertyValue, CalURICount);
} else if (PropertyName == wxT("MEDIATYPE")){
} else if (PropertyName == wxT("PREF")){
- ProcessIntegerValue(this, &CalendarRequestListPref, &PropertyValue, CalAdrURICount);
+ ProcessIntegerValue(&CalendarRequestListPref, &PropertyValue, CalAdrURICount);
} else if (PropertyName == wxT("MEDIATYPE")){
} else if (PropertyName == wxT("PREF")){
- ProcessIntegerValue(this, &FreeBusyListPref, &PropertyValue, FreeBusyAddressCount);
+ ProcessIntegerValue(&FreeBusyListPref, &PropertyValue, FreeBusyAddressCount);
} else if (PropertyName == wxT("MEDIATYPE")){
KeyListPID.insert(std::make_pair(*KeyCount, PropertyValue));
} else if (PropertyName == wxT("PREF")){
-
- int PriorityNumber = 0;
- bool ValidNumber = TRUE;
-
- try{
- PriorityNumber = std::stoi(PropertyValue.ToStdString());
- }
-
- catch(std::invalid_argument &e){
- ValidNumber = FALSE;
- }
- if (ValidNumber == TRUE){
-
- KeyListPref.erase(*KeyCount);
- KeyListPref.insert(std::make_pair(*KeyCount, PriorityNumber));
-
- }
+ ProcessIntegerValue(&KeyListPref, &PropertyValue, KeyCount);
} else {
}
-void ProcessIntegerValue(ContactDataObject *ContactData,
- std::map<int,int> *PrefPtr,
+void ProcessStringValue(wxString *PropertyName,
+ wxString PropertyNameMatch,
+ std::map<int,wxString> *MapPtr,
+ wxString *PropertyValue,
+ int *ItemCount){
+
+ if (*PropertyName == PropertyNameMatch){
+ MapPtr->erase(*ItemCount);
+ MapPtr->insert(std::make_pair(*ItemCount, *PropertyValue));
+ }
+
+}
+
+void ProcessIntegerValue(std::map<int,int> *PrefPtr,
wxString *PropertyValue,
int *ItemCount){