&BusinessRoleListAltID, &BusinessRoleListPID,
&BusinessRoleListType, &BusinessRoleListPref,
&BusinessRoleListTokens, SaveData, "work");
+
+ // Process ORG.
+ SaveOrganisation(&GeneralOrganisationsList, &GeneralOrganisationsListAltID,
+ &GeneralOrganisationsListPID, &GeneralOrganisationsListLanguage,
+ &GeneralOrganisationsListSortAs, &GeneralOrganisationsListType,
+ &GeneralOrganisationsListPref, &GeneralOrganisationsListTokens,
+ SaveData, "");
+ SaveOrganisation(&HomeOrganisationsList, &HomeOrganisationsListAltID,
+ &HomeOrganisationsListPID, &HomeOrganisationsListLanguage,
+ &HomeOrganisationsListSortAs, &HomeOrganisationsListType,
+ &HomeOrganisationsListPref, &HomeOrganisationsListTokens,
+ SaveData, "home");
+ SaveOrganisation(&BusinessOrganisationsList, &BusinessOrganisationsListAltID,
+ &BusinessOrganisationsListPID, &BusinessOrganisationsListLanguage,
+ &BusinessOrganisationsListSortAs, &BusinessOrganisationsListType,
+ &BusinessOrganisationsListPref, &BusinessOrganisationsListTokens,
+ SaveData, "work");
+
// Write the end part of the vCard data file.
SaveData->Append("END:VCARD");
}
+}
+
+void ContactDataObject::SaveOrganisation(map<int, wxString> *OrganisationList, map<int, wxString> *OrganisationListAltID,
+ map<int, wxString> *OrganisationListPID, map<int, wxString> *OrganisationListLanguage,
+ map<int, wxString> *OrganisationListSortAs, map<int, wxString> *OrganisationListType,
+ map<int, int> *OrganisationListPref, map<int, wxString> *OrganisationListTokens,
+ wxString *SaveData, wxString DataType){
+
+ wxString ProcessData = "";
+
+ for (std::map<int, wxString>::iterator OrganisationIter = OrganisationList->begin();
+ OrganisationIter != OrganisationList->end(); OrganisationIter++){
+
+ ProcessData.Append("ORG");
+
+ // 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 ((*OrganisationListAltID)[OrganisationIter->first].size() > 0){
+
+ ProcessData.Append(";ALTID=");
+ ProcessData.Append((*OrganisationListAltID)[OrganisationIter->first]);
+
+ }
+
+ // Check if there is a value for LANGUAGE.
+
+ if ((*OrganisationListLanguage)[OrganisationIter->first].size() > 0){
+
+ ProcessData.Append(";LANGUAGE=");
+ ProcessData.Append((*OrganisationListLanguage)[OrganisationIter->first]);
+
+ }
+
+ // Check if there is a value for PID.
+
+ if ((*OrganisationListPID)[OrganisationIter->first].size() > 0){
+
+ ProcessData.Append(";PID=");
+ ProcessData.Append((*OrganisationListPID)[OrganisationIter->first]);
+
+ }
+
+ // Check if there is a value for PREF.
+
+ if ((*OrganisationListPref)[OrganisationIter->first] > 0){
+
+ ProcessData.Append(";PREF=");
+ ProcessData.Append(wxString::Format("%i", (*OrganisationListPref)[OrganisationIter->first]));
+
+ }
+
+ // Check if there is a value for SORT-AS.
+
+ if ((*OrganisationListSortAs)[OrganisationIter->first].size() > 0){
+
+ ProcessData.Append(";SORT-AS=\"");
+ ProcessData.Append((*OrganisationListSortAs)[OrganisationIter->first]);
+ ProcessData.Append("\"");
+
+ }
+
+ // Check if there is a value for tokens.
+
+ if ((*OrganisationListTokens)[OrganisationIter->first].size() > 0){
+
+ ProcessData.Append(";");
+ ProcessData.Append((*OrganisationListTokens)[OrganisationIter->first]);
+
+ }
+
+ ProcessData.Append(":");
+ ProcessData.Append(OrganisationIter->second);
+ ProcessData.Append("\n");
+
+ ProcessData = OutputText(&ProcessData);
+
+ SaveData->Append(ProcessData);
+ ProcessData.clear();
+
+ }
+
}
\ No newline at end of file
map<int, wxString> *RoleListAltID, map<int, wxString> *RoleListPID,
map<int, wxString> *RoleListType, map<int, int> *RoleListPref,
map<int, wxString> *RoleListTokens, wxString *SaveData, wxString DataType);
+ void SaveOrganisation(map<int, wxString> *OrganisationList, map<int, wxString> *OrganisationListLanguage,
+ map<int, wxString> *OrganisationListAltID, map<int, wxString> *OrganisationListPID,
+ map<int, wxString> *OrganisationListSortAs, map<int, wxString> *OrganisationListType,
+ map<int, int> *OrganisationListPref, map<int, wxString> *OrganisationListTokens,
+ wxString *SaveData, wxString DataType);
public: