&BusinessNoteListType, &BusinessNoteListPref,
&BusinessNoteListTokens, SaveData, "work");
+ // Process CATEGORIES.
+
+ SaveCategory(&CategoriesList, &CategoriesListLanguage,
+ &CategoriesListAltID, &CategoriesListPID,
+ &CategoriesListType, &CategoriesListPref,
+ &CategoriesListTokens, SaveData);
+
// Write the end part of the vCard data file.
SaveData->Append("END:VCARD");
}
+}
+
+void ContactDataObject::SaveCategory(map<int, wxString> *CategoryList, map<int, wxString> *CategoryListLanguage,
+ map<int, wxString> *CategoryListAltID, map<int, wxString> *CategoryListPID,
+ map<int, wxString> *CategoryListType, map<int, int> *CategoryListPref,
+ map<int, wxString> *CategoryListTokens, wxString *SaveData){
+
+ wxString ProcessData = "";
+
+ for (std::map<int, wxString>::iterator CategoryIter = CategoryList->begin();
+ CategoryIter != CategoryList->end(); CategoryIter++){
+
+ ProcessData.Append("CATEGORIES");
+
+ // Check if there is a value for TYPE.
+
+ if ((*CategoryListType)[CategoryIter->first].size() > 0){
+
+ ProcessData.Append(";TYPE=");
+ ProcessData.Append((*CategoryListType)[CategoryIter->first]);
+
+ }
+
+ // Check if there is a value for ALTID.
+
+ if ((*CategoryListAltID)[CategoryIter->first].size() > 0){
+
+ ProcessData.Append(";ALTID=");
+ ProcessData.Append((*CategoryListAltID)[CategoryIter->first]);
+
+ }
+
+ // Check if there is a value for LANGUAGE.
+
+ if ((*CategoryListLanguage)[CategoryIter->first].size() > 0){
+
+ ProcessData.Append(";LANGUAGE=");
+ ProcessData.Append((*CategoryListLanguage)[CategoryIter->first]);
+
+ }
+
+ // Check if there is a value for PID.
+
+ if ((*CategoryListPID)[CategoryIter->first].size() > 0){
+
+ ProcessData.Append(";PID=");
+ ProcessData.Append((*CategoryListPID)[CategoryIter->first]);
+
+ }
+
+ // Check if there is a value for PREF.
+
+ if ((*CategoryListPref)[CategoryIter->first] > 0){
+
+ ProcessData.Append(";PREF=");
+ ProcessData.Append(wxString::Format("%i", (*CategoryListPref)[CategoryIter->first]));
+
+ }
+
+ // Check if there is a value for tokens.
+
+ if ((*CategoryListTokens)[CategoryIter->first].size() > 0){
+
+ ProcessData.Append(";");
+ ProcessData.Append((*CategoryListTokens)[CategoryIter->first]);
+
+ }
+
+ ProcessData.Append(":");
+ ProcessData.Append(CategoryIter->second);
+ ProcessData.Append("\n");
+
+ ProcessData = OutputText(&ProcessData);
+
+ SaveData->Append(ProcessData);
+ ProcessData.clear();
+
+ }
+
}
\ No newline at end of file
map<int, wxString> *NoteListAltID, map<int, wxString> *NoteListPID,
map<int, wxString> *NoteListType, map<int, int> *NoteListPref,
map<int, wxString> *NoteListTokens, wxString *SaveData, wxString DataType);
+ void SaveCategory(map<int, wxString> *CategoryList, map<int, wxString> *CategoryListLanguage,
+ map<int, wxString> *CategoryListAltID, map<int, wxString> *CategoryListPID,
+ map<int, wxString> *CategoryListType, map<int, int> *CategoryListPref,
+ map<int, wxString> *CategoryListTokens, wxString *SaveData);
public: