&BusinessOrganisationsListPref, &BusinessOrganisationsListTokens,
SaveData, "work");
+ // Process NOTE.
+
+ SaveNote(&GeneralNoteList, &GeneralNoteListLanguage,
+ &GeneralNoteListAltID, &GeneralNoteListPID,
+ &GeneralNoteListType, &GeneralNoteListPref,
+ &GeneralNoteListTokens, SaveData, "");
+ SaveNote(&HomeNoteList, &HomeNoteListLanguage,
+ &HomeNoteListAltID, &HomeNoteListPID,
+ &HomeNoteListType, &HomeNoteListPref,
+ &HomeNoteListTokens, SaveData, "home");
+ SaveNote(&BusinessNoteList, &BusinessNoteListLanguage,
+ &BusinessNoteListAltID, &BusinessNoteListPID,
+ &BusinessNoteListType, &BusinessNoteListPref,
+ &BusinessNoteListTokens, SaveData, "work");
+
// Write the end part of the vCard data file.
SaveData->Append("END:VCARD");
}
+}
+
+void ContactDataObject::SaveNote(map<int, wxString> *NoteList, map<int, wxString> *NoteListLanguage,
+ map<int, wxString> *NoteListAltID, map<int, wxString> *NoteListPID,
+ map<int, wxString> *NoteListType, map<int, int> *NoteListPref,
+ map<int, wxString> *NoteListTokens, wxString *SaveData, wxString DataType){
+
+ wxString ProcessData = "";
+
+ for (std::map<int, wxString>::iterator NoteIter = NoteList->begin();
+ NoteIter != NoteList->end(); NoteIter++){
+
+ ProcessData.Append("NOTE");
+
+ // 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 ((*NoteListAltID)[NoteIter->first].size() > 0){
+
+ ProcessData.Append(";ALTID=");
+ ProcessData.Append((*NoteListAltID)[NoteIter->first]);
+
+ }
+
+ // Check if there is a value for LANGUAGE.
+
+ if ((*NoteListLanguage)[NoteIter->first].size() > 0){
+
+ ProcessData.Append(";LANGUAGE=");
+ ProcessData.Append((*NoteListLanguage)[NoteIter->first]);
+
+ }
+
+ // Check if there is a value for PID.
+
+ if ((*NoteListPID)[NoteIter->first].size() > 0){
+
+ ProcessData.Append(";PID=");
+ ProcessData.Append((*NoteListPID)[NoteIter->first]);
+
+ }
+
+ // Check if there is a value for PREF.
+
+ if ((*NoteListPref)[NoteIter->first] > 0){
+
+ ProcessData.Append(";PREF=");
+ ProcessData.Append(wxString::Format("%i", (*NoteListPref)[NoteIter->first]));
+
+ }
+
+ // Check if there is a value for tokens.
+
+ if ((*NoteListTokens)[NoteIter->first].size() > 0){
+
+ ProcessData.Append(";");
+ ProcessData.Append((*NoteListTokens)[NoteIter->first]);
+
+ }
+
+ ProcessData.Append(":");
+ ProcessData.Append(NoteIter->second);
+ ProcessData.Replace("\n", "\\n", true);
+ ProcessData.Append("\n");
+
+ ProcessData = OutputText(&ProcessData);
+
+ SaveData->Append(ProcessData);
+ ProcessData.clear();
+
+ }
+
}
\ No newline at end of file
map<int, wxString> *OrganisationListSortAs, map<int, wxString> *OrganisationListType,
map<int, int> *OrganisationListPref, map<int, wxString> *OrganisationListTokens,
wxString *SaveData, wxString DataType);
+ void SaveNote(map<int, wxString> *NoteList, map<int, wxString> *NoteListLanguage,
+ map<int, wxString> *NoteListAltID, map<int, wxString> *NoteListPID,
+ map<int, wxString> *NoteListType, map<int, int> *NoteListPref,
+ map<int, wxString> *NoteListTokens, wxString *SaveData, wxString DataType);
public: