&BusinessTitleListType, &BusinessTitleListPref,
&BusinessTitleListTokens, SaveData, "work");
+ // Process TZ.
+
+ SaveTimezone(&GeneralTZList, &GeneralTZListAltID,
+ &GeneralTZListPID, &GeneralTZListType,
+ &GeneralTZListMediatype, &GeneralTZListPref,
+ &GeneralTZListTokens, SaveData, "");
+ SaveTimezone(&HomeTZList, &HomeTZListAltID,
+ &HomeTZListPID, &HomeTZListType,
+ &HomeTZListMediatype, &HomeTZListPref,
+ &HomeTZListTokens, SaveData, "home");
+ SaveTimezone(&BusinessTZList, &BusinessTZListAltID,
+ &BusinessTZListPID, &BusinessTZListType,
+ &BusinessTZListMediatype, &BusinessTZListPref,
+ &BusinessTZListTokens, SaveData, "work");
+
// Write the end part of the vCard data file.
SaveData->Append("END:VCARD");
}
+}
+
+void ContactDataObject::SaveTimezone(map<int, wxString> *TZList, map<int, wxString> *TZListAltID,
+ map<int, wxString> *TZListPID, map<int, wxString> *TZListType,
+ map<int, wxString> *TZListMediatype, map<int, int> *TZListPref,
+ map<int, wxString> *TZListTokens, wxString *SaveData, wxString DataType){
+
+ wxString ProcessData = "";
+
+ for (std::map<int, wxString>::iterator TZIter = TZList->begin();
+ TZIter != TZList->end(); TZIter++){
+
+ ProcessData.Append("TZ");
+
+ // 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 ((*TZListAltID)[TZIter->first].size() > 0){
+
+ ProcessData.Append(";ALTID=");
+ ProcessData.Append((*TZListAltID)[TZIter->first]);
+
+ }
+
+ // Check if there is a value for MEDIATYPE.
+
+ if ((*TZListMediatype)[TZIter->first].size() > 0){
+
+ ProcessData.Append(";MEDIATYPE=");
+ ProcessData.Append((*TZListMediatype)[TZIter->first]);
+
+ }
+
+ // Check if there is a value for PID.
+
+ if ((*TZListPID)[TZIter->first].size() > 0){
+
+ ProcessData.Append(";PID=");
+ ProcessData.Append((*TZListPID)[TZIter->first]);
+
+ }
+
+ // Check if there is a value for PREF.
+
+ if ((*TZListPref)[TZIter->first] > 0){
+
+ ProcessData.Append(";PREF=");
+ ProcessData.Append(wxString::Format("%i", (*TZListPref)[TZIter->first]));
+
+ }
+
+ // Check if there is a value for tokens.
+
+ if ((*TZListTokens)[TZIter->first].size() > 0){
+
+ ProcessData.Append(";");
+ ProcessData.Append((*TZListTokens)[TZIter->first]);
+
+ }
+
+ ProcessData.Append(":");
+ ProcessData.Append(TZIter->second);
+ ProcessData.Append("\n");
+
+ ProcessData = OutputText(&ProcessData);
+
+ SaveData->Append(ProcessData);
+ ProcessData.clear();
+
+ }
+
}
\ No newline at end of file
map<int, wxString> *NicknameListPID, map<int, wxString> *NicknameListType,
map<int, wxString> *NicknameListLanguage, map<int, int> *NicknameListPref,
map<int, wxString> *NicknameListTokens, wxString *SaveData, wxString DataType);
+ void SaveTimezone(map<int, wxString> *TZList, map<int, wxString> *TZListAltID,
+ map<int, wxString> *TZListPID, map<int, wxString> *TZListType,
+ map<int, wxString> *TZListMediatype, map<int, int> *TZListPref,
+ map<int, wxString> *TZListTokens, wxString *SaveData, wxString DataType);
public: