ProcessData.clear();
}
-
+
+ // Process URL.
+
+ SaveURL(&GeneralWebsiteList, &GeneralWebsiteListAltID,
+ &GeneralWebsiteListPID, &GeneralWebsiteListType,
+ &GeneralWebsiteListMediatype, &GeneralWebsiteListPref,
+ &GeneralWebsiteListTokens, SaveData, "");
+ SaveURL(&HomeWebsiteList, &HomeWebsiteListAltID,
+ &HomeWebsiteListPID, &HomeWebsiteListType,
+ &HomeWebsiteListMediatype, &HomeWebsiteListPref,
+ &HomeWebsiteListTokens, SaveData, "home");
+ SaveURL(&BusinessWebsiteList, &BusinessWebsiteListAltID,
+ &BusinessWebsiteListPID, &BusinessWebsiteListType,
+ &BusinessWebsiteListMediatype, &BusinessWebsiteListPref,
+ &BusinessWebsiteListTokens, SaveData, "work");
+
// Write the end part of the vCard data file.
SaveData->Append("END:VCARD");
}
+}
+
+void ContactDataObject::SaveURL(map<int, wxString> *WebsiteList, map<int, wxString> *WebsiteListAltID,
+ map<int, wxString> *WebsiteListPID, map<int, wxString> *WebsiteListType,
+ map<int, wxString> *WebsiteListMediatype, map<int, int> *WebsiteListPref,
+ map<int, wxString> *WebsiteListTokens, wxString *SaveData, wxString DataType){
+
+ wxString ProcessData = "";
+
+ for (std::map<int, wxString>::iterator WebsiteIter = WebsiteList->begin();
+ WebsiteIter != WebsiteList->end(); WebsiteIter++){
+
+ ProcessData.Append("URL");
+
+ // 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 ((*WebsiteListAltID)[WebsiteIter->first].size() > 0){
+
+ ProcessData.Append(";ALTID=");
+ ProcessData.Append((*WebsiteListAltID)[WebsiteIter->first]);
+
+ }
+
+ // Check if there is a value for MEDIATYPE.
+
+ if ((*WebsiteListMediatype)[WebsiteIter->first].size() > 0){
+
+ ProcessData.Append(";MEDIATYPE=");
+ ProcessData.Append((*WebsiteListMediatype)[WebsiteIter->first]);
+
+ }
+
+ // Check if there is a value for PID.
+
+ if ((*WebsiteListPID)[WebsiteIter->first].size() > 0){
+
+ ProcessData.Append(";PID=");
+ ProcessData.Append((*WebsiteListPID)[WebsiteIter->first]);
+
+ }
+
+ // Check if there is a value for PREF.
+
+ if ((*WebsiteListPref)[WebsiteIter->first] > 0){
+
+ ProcessData.Append(";PREF=");
+ ProcessData.Append(wxString::Format("%i", (*WebsiteListPref)[WebsiteIter->first]));
+
+ }
+
+ // Check if there is a value for tokens.
+
+ if ((*WebsiteListTokens)[WebsiteIter->first].size() > 0){
+
+ ProcessData.Append(";");
+ ProcessData.Append((*WebsiteListTokens)[WebsiteIter->first]);
+
+ }
+
+ ProcessData.Append(":");
+ ProcessData.Append(WebsiteIter->second);
+ ProcessData.Append("\n");
+
+ ProcessData = OutputText(&ProcessData);
+
+ SaveData->Append(ProcessData);
+ ProcessData.clear();
+
+ }
+
}
\ No newline at end of file
map<int, wxString> *GeographyListMediatype, map<int, wxString> *GeographyListDataType,
map<int, int> *GeographyListPref, map<int, wxString> *GeographyListTokens,
wxString *SaveData, wxString DataType);
+ void SaveURL(map<int, wxString> *WebsiteList, map<int, wxString> *WebsiteListAltID,
+ map<int, wxString> *WebsiteListPID, map<int, wxString> *WebsiteListType,
+ map<int, wxString> *WebsiteListMediatype, map<int, int> *WebsiteListPref,
+ map<int, wxString> *WebsiteListTokens, wxString *SaveData, wxString DataType);
public: