&BusinessLanguageListPref, &BusinessLanguageListTokens,
SaveData, "work");
+ // Process GEO.
+
+ SaveGeoposition(&GeneralGeographyList, &GeneralGeographyListAltID,
+ &GeneralGeographyListPID, &GeneralGeographyListType,
+ &GeneralGeographyListMediatype, &GeneralGeographyListDataType,
+ &GeneralGeographyListPref, &GeneralGeographyListTokens,
+ SaveData, "");
+ SaveGeoposition(&HomeGeographyList, &HomeGeographyListAltID,
+ &HomeGeographyListPID, &HomeGeographyListType,
+ &HomeGeographyListMediatype, &HomeGeographyListDataType,
+ &HomeGeographyListPref, &HomeGeographyListTokens,
+ SaveData, "home");
+ SaveGeoposition(&BusinessGeographyList, &BusinessGeographyListAltID,
+ &BusinessGeographyListPID, &BusinessGeographyListType,
+ &BusinessGeographyListMediatype, &BusinessGeographyListDataType,
+ &BusinessGeographyListPref, &BusinessGeographyListTokens,
+ SaveData, "work");
+
// Write the end part of the vCard data file.
SaveData->Append("END:VCARD");
}
+}
+
+void ContactDataObject::SaveGeoposition(map<int, wxString> *GeographyList, map<int, wxString> *GeographyListAltID,
+ map<int, wxString> *GeographyListPID, map<int, wxString> *GeographyListType,
+ map<int, wxString> *GeographyListMediatype, map<int, wxString> *GeographyListDataType,
+ map<int, int> *GeographyListPref, map<int, wxString> *GeographyListTokens,
+ wxString *SaveData, wxString DataType){
+
+ wxString ProcessData = "";
+
+ for (std::map<int, wxString>::iterator GeographyIter = GeographyList->begin();
+ GeographyIter != GeographyList->end(); GeographyIter++){
+
+ ProcessData.Append("GEO");
+
+ // 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 ((*GeographyListAltID)[GeographyIter->first].size() > 0){
+
+ ProcessData.Append(";ALTID=");
+ ProcessData.Append((*GeographyListAltID)[GeographyIter->first]);
+
+ }
+
+ // Check if there is a value for MEDIATYPE.
+
+ if ((*GeographyListMediatype)[GeographyIter->first].size() > 0){
+
+ ProcessData.Append(";MEDIATYPE=");
+ ProcessData.Append((*GeographyListMediatype)[GeographyIter->first]);
+
+ }
+
+ // Check if there is a value for PID.
+
+ if ((*GeographyListPID)[GeographyIter->first].size() > 0){
+
+ ProcessData.Append(";PID=");
+ ProcessData.Append((*GeographyListPID)[GeographyIter->first]);
+
+ }
+
+ // Check if there is a value for PREF.
+
+ if ((*GeographyListPref)[GeographyIter->first] > 0){
+
+ ProcessData.Append(";PREF=");
+ ProcessData.Append(wxString::Format("%i", (*GeographyListPref)[GeographyIter->first]));
+
+ }
+
+ // Check if there is a value for tokens.
+
+ if ((*GeographyListTokens)[GeographyIter->first].size() > 0){
+
+ ProcessData.Append(";");
+ ProcessData.Append((*GeographyListTokens)[GeographyIter->first]);
+
+ }
+
+ ProcessData.Append(":");
+ ProcessData.Append((*GeographyListDataType)[GeographyIter->first]);
+ ProcessData.Append(":");
+ ProcessData.Append(GeographyIter->second);
+ ProcessData.Append("\n");
+
+ ProcessData = OutputText(&ProcessData);
+
+ SaveData->Append(ProcessData);
+ ProcessData.clear();
+
+ }
+
}
\ No newline at end of file
map<int, wxString> *LanguageListPID, map<int, wxString> *LanguageListType,
map<int, int> *LangaugeListPref, map<int, wxString> *LanguageListTokens,
wxString *SaveData, wxString DataType);
+ void SaveGeoposition(map<int, wxString> *GeographyList, map<int, wxString> *GeographyListAltID,
+ map<int, wxString> *GeographyListPID, map<int, wxString> *GeographyListType,
+ map<int, wxString> *GeographyListMediatype, map<int, wxString> *GeographyListDataType,
+ map<int, int> *GeographyListPref, map<int, wxString> *GeographyListTokens,
+ wxString *SaveData, wxString DataType);
public: