1 // ContactDataObject.h - Client Data Object header.
3 // (c) 2012-2016 Xestia Software Development.
5 // This file is part of Xestia Address Book.
7 // Xestia Address Book is free software: you can redistribute it and/or modify
8 // it under the terms of the GNU General Public License as published by the
9 // Free Software Foundation, version 3 of the license.
11 // Xestia Address Book is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU General Public License for more details.
16 // You should have received a copy of the GNU General Public License along
17 // with Xestia Address Book. If not, see <http://www.gnu.org/licenses/>
19 #ifndef __CLIENTDATAOBJECT_H__
20 #define __CLIENTDATAOBJECT_H__
25 #include <wx/tokenzr.h>
28 #include "../../vcard/vcard.h"
29 #include "../../common/textprocessing.h"
33 enum ContactLoadStatus{
34 CONTACTLOAD_UNITTESTFAIL = -1,
36 CONTACTLOAD_FILEMISSING,
37 CONTACTLOAD_FILEERROR,
38 CONTACTLOAD_FILEINVALIDFORMAT,
39 CONTACTLOAD_FILEBASESPECFAIL
42 enum ContactSaveStatus{
43 CONTACTSAVE_UNITTESTFAIL = -1,
45 CONTACTSAVE_FILEERROR,
46 CONTACTSAVE_WRITEERROR
51 CONTACTKIND_INDIVIDUAL,
53 CONTACTKIND_ORGANISATION,
63 class ContactDataObject{
67 void ProcessKind(wxString KindData);
68 void ProcessRevision(wxString PropertySeg1, wxString PropertySeg2);
69 void ProcessSource(wxString PropertySeg1, wxString PropertySeg2, int *SourceCount);
70 void ProcessXML(wxString PropertySeg1, wxString PropertySeg2, int *XMLCount);
71 void ProcessMember(wxString PropertySeg1, wxString PropertySeg2, int *GroupCount);
72 void ProcessFN(wxString PropertySeg1, wxString PropertySeg2, int *FNCount);
73 void ProcessN(wxString PropertySeg1, wxString PropertySeg2);
74 void ProcessClientPIDMap(wxString PropertySeg1, wxString PropertySeg2, int *ClientPIDCount);
75 void ProcessNickname(wxString PropertySeg1, wxString PropertySeg2, int *NicknameCount);
76 void ProcessGender(wxString PropertySeg1, wxString PropertySeg2);
77 void ProcessBirthday(wxString PropertySeg1, wxString PropertySeg2);
78 void ProcessAnniversary(wxString PropertySeg1, wxString PropertySeg2);
79 void ProcessTimeZone(wxString PropertySeg1, wxString PropertySeg2, int *TimeZoneCount);
80 void ProcessAddress(wxString PropertySeg1, wxString PropertySeg2, int *AddressCount);
81 void ProcessEmail(wxString PropertySeg1, wxString PropertySeg2, int *EmailCount);
82 void ProcessIM(wxString PropertySeg1, wxString PropertySeg2, int *IMCount);
83 void ProcessTelephone(wxString PropertySeg1, wxString PropertySeg2, int *TelephoneCount);
84 void ProcessLanguage(wxString PropertySeg1, wxString PropertySeg2, int *LanguageCount);
85 void ProcessGeographic(wxString PropertySeg1, wxString PropertySeg2, int *GeographicCount);
86 void ProcessRelated(wxString PropertySeg1, wxString PropertySeg2, int *RelatedCount);
87 void ProcessURL(wxString PropertySeg1, wxString PropertySeg2, int *URLCount);
88 void ProcessTitle(wxString PropertySeg1, wxString PropertySeg2, int *TitleCount);
89 void ProcessRole(wxString PropertySeg1, wxString PropertySeg2, int *RoleCount);
90 void ProcessOrganisation(wxString PropertySeg1, wxString PropertySeg2, int *OrganisationCount);
91 void ProcessNote(wxString PropertySeg1, wxString PropertySeg2, int *NoteCount);
92 void ProcessCategory(wxString PropertySeg1, wxString PropertySeg2, int *CategoryCount);
93 void ProcessPhoto(wxString PropertySeg1, wxString PropertySeg2, int *PhotoCount);
94 void ProcessLogo(wxString PropertySeg1, wxString PropertySeg2, int *LogoCount);
95 void ProcessSound(wxString PropertySeg1, wxString PropertySeg2, int *SoundCount);
96 void ProcessCalendarURI(wxString PropertySeg1, wxString PropertySeg2, int *CalAdrCount);
97 void ProcessCalendarAddressURI(wxString PropertySeg1, wxString PropertySeg2, int *CalAdrURICount);
98 void ProcessCalendarFreeBusy(wxString PropertySeg1, wxString PropertySeg2, int *FreeBusyAddressCount);
99 void ProcessKey(wxString PropertySeg1, wxString PropertySeg2, int *KeyCount);
100 void ProcessVendor(wxString PropertySeg1, wxString PropertySeg2, int *VendorCount);
104 void SaveTitle(map<int, wxString> *TitleList, map<int, wxString> *TitleListLanguage,
105 map<int, wxString> *TitleListAltID, map<int, wxString> *TitleListPID,
106 map<int, wxString> *TitleListType, map<int, int> *TitleListPref,
107 map<int, wxString> *TitleListTokens, wxString *SaveData, wxString DataType);
108 void SaveSource(map<int, wxString> *SourceList, map<int, wxString> *SourceListAltID,
109 map<int, wxString> *SourceListPID, map<int, wxString> *SourceListType,
110 map<int, wxString> *SourceListMediatype, map<int, int> *SourceListPref,
111 map<int, wxString> *SourceListTokens, wxString *SaveData);
112 void SaveMember(std::map<int, wxString> *GroupsList, std::map<int, wxString> *GroupsListAltID,
113 std::map<int, wxString> *GroupsListPID, std::map<int, wxString> *GroupsListType,
114 std::map<int, wxString> *GroupsListMediatype, std::map<int, int> *GroupsListPref,
115 std::map<int, wxString> *GroupsListTokens, wxString *SaveData);
116 void SaveNickname(map<int, wxString> *NicknameList, map<int, wxString> *NicknameListAltID,
117 map<int, wxString> *NicknameListPID, map<int, wxString> *NicknameListType,
118 map<int, wxString> *NicknameListLanguage, map<int, int> *NicknameListPref,
119 map<int, wxString> *NicknameListTokens, wxString *SaveData, wxString DataType);
120 void SaveTimezone(map<int, wxString> *TZList, map<int, wxString> *TZListAltID,
121 map<int, wxString> *TZListPID, map<int, wxString> *TZListType,
122 map<int, wxString> *TZListMediatype, map<int, int> *TZListPref,
123 map<int, wxString> *TZListTokens, wxString *SaveData, wxString DataType);
124 void SaveAddress(map<int, wxString> *AddressList, map<int, wxString> *AddressListTown,
125 map<int, wxString> *AddressListCounty, map<int, wxString> *AddressListPostCode,
126 map<int, wxString> *AddressListCountry, map<int, wxString> *AddressListLabel,
127 map<int, wxString> *AddressListLang, map<int, wxString> *AddressListAltID,
128 map<int, wxString> *AddressListPID, map<int, wxString> *AddressListGeo,
129 map<int, wxString> *AddressListTimezone, map<int, wxString> *AddressListType,
130 map<int, wxString> *AddressListMediatype, map<int, int> *AddressListPref,
131 map<int, wxString> *AddressListTokens, wxString *SaveData, wxString DataType);
132 void SaveEmail(map<int, wxString> *EmailList, map<int, wxString> *EmailListAltID,
133 map<int, wxString> *EmailListPID, map<int, wxString> *EmailListType,
134 map<int, int> *EmailListPref, map<int, wxString> *EmailListTokens,
135 wxString *SaveData, wxString DataType);
136 void SaveIMPP(map<int, wxString> *IMList, map<int, wxString> *IMListAltID,
137 map<int, wxString> *IMListPID, map<int, wxString> *IMListType,
138 map<int, wxString> *IMListTypeInfo, map<int, wxString> *IMListDataType,
139 map<int, int> *IMListPref, map<int, wxString> *IMListTokens,
140 wxString *SaveData, wxString DataType);
141 void SaveTelephone(map<int, wxString> *TelephoneList, map<int, wxString> *TelephoneListAltID,
142 map<int, wxString> *TelephoneListPID, map<int, wxString> *TelephoneListType,
143 map<int, wxString> *TelephoneListTypeInfo, map<int, wxString> *TelephoneListMediatype,
144 map<int, int> *TelephoneListPref, map<int, wxString> *TelephoneListTokens,
145 wxString *SaveData, wxString DataType);
146 void SaveLanguage(map<int, wxString> *LanguageList, map<int, wxString> *LanguageListAltID,
147 map<int, wxString> *LanguageListPID, map<int, wxString> *LanguageListType,
148 map<int, int> *LangaugeListPref, map<int, wxString> *LanguageListTokens,
149 wxString *SaveData, wxString DataType);
150 void SaveGeoposition(map<int, wxString> *GeographyList, map<int, wxString> *GeographyListAltID,
151 map<int, wxString> *GeographyListPID, map<int, wxString> *GeographyListType,
152 map<int, wxString> *GeographyListMediatype, map<int, wxString> *GeographyListDataType,
153 map<int, int> *GeographyListPref, map<int, wxString> *GeographyListTokens,
154 wxString *SaveData, wxString DataType);
155 void SaveURL(map<int, wxString> *WebsiteList, map<int, wxString> *WebsiteListAltID,
156 map<int, wxString> *WebsiteListPID, map<int, wxString> *WebsiteListType,
157 map<int, wxString> *WebsiteListMediatype, map<int, int> *WebsiteListPref,
158 map<int, wxString> *WebsiteListTokens, wxString *SaveData, wxString DataType);
159 void SaveRole(map<int, wxString> *RoleList, map<int, wxString> *RoleListLanguage,
160 map<int, wxString> *RoleListAltID, map<int, wxString> *RoleListPID,
161 map<int, wxString> *RoleListType, map<int, int> *RoleListPref,
162 map<int, wxString> *RoleListTokens, wxString *SaveData, wxString DataType);
163 void SaveOrganisation(map<int, wxString> *OrganisationList, map<int, wxString> *OrganisationListLanguage,
164 map<int, wxString> *OrganisationListAltID, map<int, wxString> *OrganisationListPID,
165 map<int, wxString> *OrganisationListSortAs, map<int, wxString> *OrganisationListType,
166 map<int, int> *OrganisationListPref, map<int, wxString> *OrganisationListTokens,
167 wxString *SaveData, wxString DataType);
168 void SaveNote(map<int, wxString> *NoteList, map<int, wxString> *NoteListLanguage,
169 map<int, wxString> *NoteListAltID, map<int, wxString> *NoteListPID,
170 map<int, wxString> *NoteListType, map<int, int> *NoteListPref,
171 map<int, wxString> *NoteListTokens, wxString *SaveData, wxString DataType);
172 void SaveCategory(map<int, wxString> *CategoryList, map<int, wxString> *CategoryListLanguage,
173 map<int, wxString> *CategoryListAltID, map<int, wxString> *CategoryListPID,
174 map<int, wxString> *CategoryListType, map<int, int> *CategoryListPref,
175 map<int, wxString> *CategoryListTokens, wxString *SaveData);
176 void SavePhoto(map<int, string> *PicturesList, map<int, wxString> *PicturesListAltID,
177 map<int, wxString> *PicturesListPID, map<int, wxString> *PicturesListType,
178 map<int, wxString> *PicturesListPicEncType, map<int, wxString> *PicturesListPictureType,
179 map<int, wxString> *PicturesListMediatype, map<int, int> *PicturesListPref,
180 map<int, wxString> *PicturesListTokens, wxString *SaveData);
181 void SaveLogo(map<int, string> *LogosList, map<int, wxString> *LogosListAltID,
182 map<int, wxString> *LogosListPID, map<int, wxString> *LogosListType,
183 map<int, wxString> *LogosListPicEncType, map<int, wxString> *LogosListPictureType,
184 map<int, wxString> *LogosListMediatype, map<int, int> *LogosListPref,
185 map<int, wxString> *LogosListTokens, wxString *SaveData);
186 void SaveSound(map<int, string> *SoundsList, map<int, wxString> *SoundsListAltID,
187 map<int, wxString> *SoundsListPID, map<int, wxString> *SoundsListType,
188 map<int, wxString> *SoundsListAudioEncType, map<int, wxString> *SoundsListAudioType,
189 map<int, wxString> *SoundsListMediatype, map<int, wxString> *SoundsListLanguage,
190 map<int, int> *SoundsListPref, map<int, wxString> *SoundsListTokens,
192 void SaveCalendarURI(std::map<int, wxString> *CalendarList, std::map<int, wxString> *CalendarListAltID,
193 std::map<int, wxString> *CalendarListPID, std::map<int, wxString> *CalendarListType,
194 std::map<int, wxString> *CalendarListMediatype, std::map<int, int> *CalendarListPref,
195 std::map<int, wxString> *CalendarListTokens, wxString *SaveData);
196 void SaveCalendarRequestURI(std::map<int, wxString> *CalendarRequestList, std::map<int, wxString> *CalendarRequestListAltID,
197 std::map<int, wxString> *CalendarRequestListPID, std::map<int, wxString> *CalendarRequestListType,
198 std::map<int, wxString> *CalendarRequestListMediatype, std::map<int, int> *CalendarRequestListPref,
199 std::map<int, wxString> *CalendarRequestListTokens, wxString *SaveData);
200 void SaveFreeBusyURI(std::map<int, wxString> *FreeBusyList, std::map<int, wxString> *FreeBusyListAltID,
201 std::map<int, wxString> *FreeBusyListPID, std::map<int, wxString> *FreeBusyListType,
202 std::map<int, wxString> *FreeBusyListMediatype, std::map<int, int> *FreeBusyListPref,
203 std::map<int, wxString> *FreeBusyListTokens, wxString *SaveData);
204 void SaveKey(map<int, wxString> *KeyList, map<int, wxString> *KeyListAltID,
205 map<int, wxString> *KeyListPID, map<int, wxString> *KeyListType,
206 map<int, bool> *KeyListKeyType, map<int, wxString> *KeyListDataEncType,
207 map<int, wxString> *KeyListDataType, map<int, int> *KeyListPref,
208 map<int, wxString> *KeyListTokens, wxString *SaveData);
209 void SaveVendor(map<int, wxString> *VendorList, map<int, wxString> *VendorListPEN,
210 map<int, wxString> *VendorListElement, wxString *SaveData);
211 void SaveXToken(map<int, wxString> *XTokenList, map<int, wxString> *XTokenListTokens,
216 ContactKindType ContactKind = CONTACTKIND_NONE;
218 /* Items on General Tab */
221 wxString NameForename;
222 wxString NameSurname;
223 wxString NameOtherNames;
225 wxString NameNickname;
226 wxString NameDisplayAs;
227 wxString NameLanguage;
232 wxString BirthdayAltID;
233 wxString BirthdayCalScale;
234 wxString BirthdayTokens;
235 bool BirthdayText = FALSE;
237 wxString Anniversary;
238 wxString AnniversaryAltID;
239 wxString AnniversaryCalScale;
240 wxString AnniversaryTokens;
241 bool AnniversaryText = FALSE;
244 wxString GenderDetails;
245 wxString GenderTokens;
249 wxString RevisionTokens;
251 std::map<int, wxString> SourceList;
252 std::map<int, wxString> SourceListAltID;
253 std::map<int, wxString> SourceListPID;
254 std::map<int, wxString> SourceListType;
255 std::map<int, wxString> SourceListTokens;
256 std::map<int, wxString> SourceListMediatype;
257 std::map<int, int> SourceListPref;
259 std::map<int, wxString> XMLList;
260 std::map<int, wxString> XMLListAltID;
262 std::map<int, wxString> ClientPIDList;
263 std::map<int, wxString> ClientPIDListTokens;
265 std::map<int, wxString> FullNamesList;
266 std::map<int, wxString> FullNamesListType;
267 std::map<int, wxString> FullNamesListLanguage;
268 std::map<int, wxString> FullNamesListAltID;
269 std::map<int, wxString> FullNamesListPID;
270 std::map<int, wxString> FullNamesListTokens;
271 std::map<int, int> FullNamesListPref;
273 std::map<int, wxString> GeneralNicknamesList;
274 std::map<int, wxString> GeneralNicknamesListType;
275 std::map<int, wxString> GeneralNicknamesListLanguage;
276 std::map<int, wxString> GeneralNicknamesListAltID;
277 std::map<int, wxString> GeneralNicknamesListPID;
278 std::map<int, wxString> GeneralNicknamesListTokens;
279 std::map<int, int> GeneralNicknamesListPref;
281 std::map<int, wxString> GeneralAddressList;
282 std::map<int, wxString> GeneralAddressListTown;
283 std::map<int, wxString> GeneralAddressListCounty;
284 std::map<int, wxString> GeneralAddressListPostCode;
285 std::map<int, wxString> GeneralAddressListCountry;
286 std::map<int, wxString> GeneralAddressListLabel;
287 std::map<int, wxString> GeneralAddressListLang;
288 std::map<int, wxString> GeneralAddressListAltID;
289 std::map<int, wxString> GeneralAddressListPID;
290 std::map<int, wxString> GeneralAddressListTokens;
291 std::map<int, wxString> GeneralAddressListGeo;
292 std::map<int, wxString> GeneralAddressListTimezone;
293 std::map<int, wxString> GeneralAddressListType;
294 std::map<int, wxString> GeneralAddressListMediatype;
295 std::map<int, int> GeneralAddressListPref;
297 std::map<int, wxString> GeneralEmailList;
298 std::map<int, wxString> GeneralEmailListAltID;
299 std::map<int, wxString> GeneralEmailListPID;
300 std::map<int, wxString> GeneralEmailListType;
301 std::map<int, wxString> GeneralEmailListTokens;
302 std::map<int, int> GeneralEmailListPref;
304 std::map<int, wxString> GeneralIMList;
305 std::map<int, wxString> GeneralIMListAltID;
306 std::map<int, wxString> GeneralIMListPID;
307 std::map<int, wxString> GeneralIMListType;
308 std::map<int, wxString> GeneralIMListTypeInfo;
309 std::map<int, wxString> GeneralIMListTokens;
310 std::map<int, wxString> GeneralIMListMediatype;
311 std::map<int, int> GeneralIMListPref;
313 std::map<int, wxString> GeneralTelephoneList;
314 std::map<int, wxString> GeneralTelephoneListAltID;
315 std::map<int, wxString> GeneralTelephoneListPID;
316 std::map<int, wxString> GeneralTelephoneListType;
317 std::map<int, wxString> GeneralTelephoneListTokens;
318 std::map<int, wxString> GeneralTelephoneListTypeInfo;
319 std::map<int, wxString> GeneralTelephoneListDataType;
320 std::map<int, int> GeneralTelephoneListPref;
322 std::map<int, wxString> GeneralLanguageList;
323 std::map<int, wxString> GeneralLanguageListAltID;
324 std::map<int, wxString> GeneralLanguageListPID;
325 std::map<int, wxString> GeneralLanguageListType;
326 std::map<int, wxString> GeneralLanguageListTokens;
327 std::map<int, int> GeneralLanguageListPref;
329 std::map<int, wxString> GeneralTZList;
330 std::map<int, wxString> GeneralTZListAltID;
331 std::map<int, wxString> GeneralTZListPID;
332 std::map<int, wxString> GeneralTZListType;
333 std::map<int, wxString> GeneralTZListTokens;
334 std::map<int, wxString> GeneralTZListMediatype;
335 std::map<int, int> GeneralTZListPref;
337 std::map<int, wxString> GeneralGeographyList;
338 std::map<int, wxString> GeneralGeographyListAltID;
339 std::map<int, wxString> GeneralGeographyListPID;
340 std::map<int, wxString> GeneralGeographyListType;
341 std::map<int, wxString> GeneralGeographyListTokens;
342 std::map<int, wxString> GeneralGeographyListMediatype;
343 std::map<int, wxString> GeneralGeographyListDataType;
344 std::map<int, int> GeneralGeographyListPref;
346 std::map<int, wxString> GeneralRelatedList;
347 std::map<int, wxString> GeneralRelatedListRelType;
348 std::map<int, wxString> GeneralRelatedListLanguage;
349 std::map<int, wxString> GeneralRelatedListAltID;
350 std::map<int, wxString> GeneralRelatedListPID;
351 std::map<int, wxString> GeneralRelatedListType;
352 std::map<int, wxString> GeneralRelatedListTokens;
353 std::map<int, int> GeneralRelatedListPref;
355 std::map<int, wxString> GeneralWebsiteList;
356 std::map<int, wxString> GeneralWebsiteListAltID;
357 std::map<int, wxString> GeneralWebsiteListPID;
358 std::map<int, wxString> GeneralWebsiteListType;
359 std::map<int, wxString> GeneralWebsiteListTokens;
360 std::map<int, wxString> GeneralWebsiteListMediatype;
361 std::map<int, int> GeneralWebsiteListPref;
363 std::map<int, wxString> GeneralTitleList;
364 std::map<int, wxString> GeneralTitleListLanguage;
365 std::map<int, wxString> GeneralTitleListAltID;
366 std::map<int, wxString> GeneralTitleListPID;
367 std::map<int, wxString> GeneralTitleListType;
368 std::map<int, wxString> GeneralTitleListTokens;
369 std::map<int, int> GeneralTitleListPref;
371 std::map<int, wxString> GeneralRoleList;
372 std::map<int, wxString> GeneralRoleListLanguage;
373 std::map<int, wxString> GeneralRoleListAltID;
374 std::map<int, wxString> GeneralRoleListPID;
375 std::map<int, wxString> GeneralRoleListType;
376 std::map<int, wxString> GeneralRoleListTokens;
377 std::map<int, int> GeneralRoleListPref;
379 std::map<int, wxString> GeneralOrganisationsList;
380 std::map<int, wxString> GeneralOrganisationsListLanguage;
381 std::map<int, wxString> GeneralOrganisationsListAltID;
382 std::map<int, wxString> GeneralOrganisationsListPID;
383 std::map<int, wxString> GeneralOrganisationsListType;
384 std::map<int, wxString> GeneralOrganisationsListTokens;
385 std::map<int, wxString> GeneralOrganisationsListSortAs;
386 std::map<int, int> GeneralOrganisationsListPref;
388 std::map<int, wxString> GeneralNoteList;
389 std::map<int, wxString> GeneralNoteListLanguage;
390 std::map<int, wxString> GeneralNoteListAltID;
391 std::map<int, wxString> GeneralNoteListPID;
392 std::map<int, wxString> GeneralNoteListType;
393 std::map<int, wxString> GeneralNoteListTokens;
394 std::map<int, int> GeneralNoteListPref;
396 /* Items on Home Tab */
398 std::map<int, wxString> HomeNicknamesList;
399 std::map<int, wxString> HomeNicknamesListType;
400 std::map<int, wxString> HomeNicknamesListLanguage;
401 std::map<int, wxString> HomeNicknamesListAltID;
402 std::map<int, wxString> HomeNicknamesListPID;
403 std::map<int, wxString> HomeNicknamesListTokens;
404 std::map<int, int> HomeNicknamesListPref;
406 std::map<int, wxString> HomeAddressList;
407 std::map<int, wxString> HomeAddressListTown;
408 std::map<int, wxString> HomeAddressListCounty;
409 std::map<int, wxString> HomeAddressListPostCode;
410 std::map<int, wxString> HomeAddressListCountry;
411 std::map<int, wxString> HomeAddressListLabel;
412 std::map<int, wxString> HomeAddressListLang;
413 std::map<int, wxString> HomeAddressListAltID;
414 std::map<int, wxString> HomeAddressListPID;
415 std::map<int, wxString> HomeAddressListTokens;
416 std::map<int, wxString> HomeAddressListGeo;
417 std::map<int, wxString> HomeAddressListTimezone;
418 std::map<int, wxString> HomeAddressListType;
419 std::map<int, wxString> HomeAddressListMediatype;
420 std::map<int, int> HomeAddressListPref;
422 std::map<int, wxString> HomeEmailList;
423 std::map<int, wxString> HomeEmailListAltID;
424 std::map<int, wxString> HomeEmailListPID;
425 std::map<int, wxString> HomeEmailListType;
426 std::map<int, wxString> HomeEmailListTokens;
427 std::map<int, int> HomeEmailListPref;
429 std::map<int, wxString> HomeIMList;
430 std::map<int, wxString> HomeIMListAltID;
431 std::map<int, wxString> HomeIMListPID;
432 std::map<int, wxString> HomeIMListType;
433 std::map<int, wxString> HomeIMListTypeInfo;
434 std::map<int, wxString> HomeIMListTokens;
435 std::map<int, wxString> HomeIMListMediatype;
436 std::map<int, int> HomeIMListPref;
438 std::map<int, wxString> HomeTelephoneList;
439 std::map<int, wxString> HomeTelephoneListAltID;
440 std::map<int, wxString> HomeTelephoneListPID;
441 std::map<int, wxString> HomeTelephoneListType;
442 std::map<int, wxString> HomeTelephoneListTokens;
443 std::map<int, wxString> HomeTelephoneListTypeInfo;
444 std::map<int, wxString> HomeTelephoneListDataType;
445 std::map<int, int> HomeTelephoneListPref;
447 std::map<int, wxString> HomeLanguageList;
448 std::map<int, wxString> HomeLanguageListAltID;
449 std::map<int, wxString> HomeLanguageListPID;
450 std::map<int, wxString> HomeLanguageListType;
451 std::map<int, wxString> HomeLanguageListTokens;
452 std::map<int, int> HomeLanguageListPref;
454 std::map<int, wxString> HomeTZList;
455 std::map<int, wxString> HomeTZListAltID;
456 std::map<int, wxString> HomeTZListPID;
457 std::map<int, wxString> HomeTZListType;
458 std::map<int, wxString> HomeTZListTokens;
459 std::map<int, wxString> HomeTZListMediatype;
460 std::map<int, int> HomeTZListPref;
462 std::map<int, wxString> HomeGeographyList;
463 std::map<int, wxString> HomeGeographyListAltID;
464 std::map<int, wxString> HomeGeographyListPID;
465 std::map<int, wxString> HomeGeographyListType;
466 std::map<int, wxString> HomeGeographyListTokens;
467 std::map<int, wxString> HomeGeographyListMediatype;
468 std::map<int, wxString> HomeGeographyListDataType;
469 std::map<int, int> HomeGeographyListPref;
471 std::map<int, wxString> HomeWebsiteList;
472 std::map<int, wxString> HomeWebsiteListAltID;
473 std::map<int, wxString> HomeWebsiteListPID;
474 std::map<int, wxString> HomeWebsiteListType;
475 std::map<int, wxString> HomeWebsiteListTokens;
476 std::map<int, wxString> HomeWebsiteListMediatype;
477 std::map<int, int> HomeWebsiteListPref;
479 std::map<int, wxString> HomeTitleList;
480 std::map<int, wxString> HomeTitleListLanguage;
481 std::map<int, wxString> HomeTitleListAltID;
482 std::map<int, wxString> HomeTitleListPID;
483 std::map<int, wxString> HomeTitleListType;
484 std::map<int, wxString> HomeTitleListTokens;
485 std::map<int, int> HomeTitleListPref;
487 std::map<int, wxString> HomeRoleList;
488 std::map<int, wxString> HomeRoleListLanguage;
489 std::map<int, wxString> HomeRoleListAltID;
490 std::map<int, wxString> HomeRoleListPID;
491 std::map<int, wxString> HomeRoleListType;
492 std::map<int, wxString> HomeRoleListTokens;
493 std::map<int, int> HomeRoleListPref;
495 std::map<int, wxString> HomeOrganisationsList;
496 std::map<int, wxString> HomeOrganisationsListLanguage;
497 std::map<int, wxString> HomeOrganisationsListAltID;
498 std::map<int, wxString> HomeOrganisationsListPID;
499 std::map<int, wxString> HomeOrganisationsListType;
500 std::map<int, wxString> HomeOrganisationsListTokens;
501 std::map<int, wxString> HomeOrganisationsListSortAs;
502 std::map<int, int> HomeOrganisationsListPref;
504 std::map<int, wxString> HomeNoteList;
505 std::map<int, wxString> HomeNoteListLanguage;
506 std::map<int, wxString> HomeNoteListAltID;
507 std::map<int, wxString> HomeNoteListPID;
508 std::map<int, wxString> HomeNoteListType;
509 std::map<int, wxString> HomeNoteListTokens;
510 std::map<int, int> HomeNoteListPref;
512 /* Items on the Business tab */
514 std::map<int, wxString> BusinessNicknamesList;
515 std::map<int, wxString> BusinessNicknamesListType;
516 std::map<int, wxString> BusinessNicknamesListLanguage;
517 std::map<int, wxString> BusinessNicknamesListAltID;
518 std::map<int, wxString> BusinessNicknamesListPID;
519 std::map<int, wxString> BusinessNicknamesListTokens;
520 std::map<int, int> BusinessNicknamesListPref;
522 std::map<int, wxString> BusinessAddressList;
523 std::map<int, wxString> BusinessAddressListTown;
524 std::map<int, wxString> BusinessAddressListCounty;
525 std::map<int, wxString> BusinessAddressListPostCode;
526 std::map<int, wxString> BusinessAddressListCountry;
527 std::map<int, wxString> BusinessAddressListLabel;
528 std::map<int, wxString> BusinessAddressListLang;
529 std::map<int, wxString> BusinessAddressListAltID;
530 std::map<int, wxString> BusinessAddressListPID;
531 std::map<int, wxString> BusinessAddressListTokens;
532 std::map<int, wxString> BusinessAddressListGeo;
533 std::map<int, wxString> BusinessAddressListTimezone;
534 std::map<int, wxString> BusinessAddressListType;
535 std::map<int, wxString> BusinessAddressListMediatype;
536 std::map<int, int> BusinessAddressListPref;
538 std::map<int, wxString> BusinessEmailList;
539 std::map<int, wxString> BusinessEmailListAltID;
540 std::map<int, wxString> BusinessEmailListPID;
541 std::map<int, wxString> BusinessEmailListType;
542 std::map<int, wxString> BusinessEmailListTokens;
543 std::map<int, int> BusinessEmailListPref;
545 std::map<int, wxString> BusinessIMList;
546 std::map<int, wxString> BusinessIMListAltID;
547 std::map<int, wxString> BusinessIMListPID;
548 std::map<int, wxString> BusinessIMListType;
549 std::map<int, wxString> BusinessIMListTypeInfo;
550 std::map<int, wxString> BusinessIMListTokens;
551 std::map<int, wxString> BusinessIMListMediatype;
552 std::map<int, int> BusinessIMListPref;
554 std::map<int, wxString> BusinessTelephoneList;
555 std::map<int, wxString> BusinessTelephoneListAltID;
556 std::map<int, wxString> BusinessTelephoneListPID;
557 std::map<int, wxString> BusinessTelephoneListType;
558 std::map<int, wxString> BusinessTelephoneListTypeInfo;
559 std::map<int, wxString> BusinessTelephoneListTokens;
560 std::map<int, wxString> BusinessTelephoneListDataType;
561 std::map<int, int> BusinessTelephoneListPref;
563 std::map<int, wxString> BusinessLanguageList;
564 std::map<int, wxString> BusinessLanguageListAltID;
565 std::map<int, wxString> BusinessLanguageListPID;
566 std::map<int, wxString> BusinessLanguageListType;
567 std::map<int, wxString> BusinessLanguageListTokens;
568 std::map<int, int> BusinessLanguageListPref;
570 std::map<int, wxString> BusinessTZList;
571 std::map<int, wxString> BusinessTZListAltID;
572 std::map<int, wxString> BusinessTZListPID;
573 std::map<int, wxString> BusinessTZListType;
574 std::map<int, wxString> BusinessTZListTokens;
575 std::map<int, wxString> BusinessTZListMediatype;
576 std::map<int, int> BusinessTZListPref;
578 std::map<int, wxString> BusinessGeographyList;
579 std::map<int, wxString> BusinessGeographyListAltID;
580 std::map<int, wxString> BusinessGeographyListPID;
581 std::map<int, wxString> BusinessGeographyListType;
582 std::map<int, wxString> BusinessGeographyListTokens;
583 std::map<int, wxString> BusinessGeographyListMediatype;
584 std::map<int, wxString> BusinessGeographyListDataType;
585 std::map<int, int> BusinessGeographyListPref;
587 std::map<int, wxString> BusinessWebsiteList;
588 std::map<int, wxString> BusinessWebsiteListAltID;
589 std::map<int, wxString> BusinessWebsiteListPID;
590 std::map<int, wxString> BusinessWebsiteListType;
591 std::map<int, wxString> BusinessWebsiteListTokens;
592 std::map<int, wxString> BusinessWebsiteListMediatype;
593 std::map<int, int> BusinessWebsiteListPref;
595 std::map<int, wxString> BusinessTitleList;
596 std::map<int, wxString> BusinessTitleListLanguage;
597 std::map<int, wxString> BusinessTitleListAltID;
598 std::map<int, wxString> BusinessTitleListPID;
599 std::map<int, wxString> BusinessTitleListType;
600 std::map<int, wxString> BusinessTitleListTokens;
601 std::map<int, int> BusinessTitleListPref;
603 std::map<int, wxString> BusinessRoleList;
604 std::map<int, wxString> BusinessRoleListLanguage;
605 std::map<int, wxString> BusinessRoleListAltID;
606 std::map<int, wxString> BusinessRoleListPID;
607 std::map<int, wxString> BusinessRoleListType;
608 std::map<int, wxString> BusinessRoleListTokens;
609 std::map<int, int> BusinessRoleListPref;
611 std::map<int, wxString> BusinessOrganisationsList;
612 std::map<int, wxString> BusinessOrganisationsListLanguage;
613 std::map<int, wxString> BusinessOrganisationsListAltID;
614 std::map<int, wxString> BusinessOrganisationsListPID;
615 std::map<int, wxString> BusinessOrganisationsListType;
616 std::map<int, wxString> BusinessOrganisationsListTokens;
617 std::map<int, wxString> BusinessOrganisationsListSortAs;
618 std::map<int, int> BusinessOrganisationsListPref;
620 std::map<int, wxString> BusinessNoteList;
621 std::map<int, wxString> BusinessNoteListLanguage;
622 std::map<int, wxString> BusinessNoteListAltID;
623 std::map<int, wxString> BusinessNoteListPID;
624 std::map<int, wxString> BusinessNoteListType;
625 std::map<int, wxString> BusinessNoteListTokens;
626 std::map<int, int> BusinessNoteListPref;
628 /* Items on the Categories tab */
630 std::map<int, wxString> CategoriesList;
631 std::map<int, wxString> CategoriesListAltID;
632 std::map<int, wxString> CategoriesListPID;
633 std::map<int, wxString> CategoriesListType;
634 std::map<int, wxString> CategoriesListTokens;
635 std::map<int, wxString> CategoriesListLanguage;
636 std::map<int, int> CategoriesListPref;
638 /* Items on the Groups tab */
640 std::map<int, wxString> GroupsList;
641 std::map<int, wxString> GroupsListAltID;
642 std::map<int, wxString> GroupsListPID;
643 std::map<int, wxString> GroupsListType;
644 std::map<int, wxString> GroupsListMediaType;
645 std::map<int, wxString> GroupsListTokens;
646 std::map<int, int> GroupsListPref;
648 /* Items on the Pictures tab */
650 std::map<int, std::string> PicturesList;
651 std::map<int, wxString> PicturesListAltID;
652 std::map<int, wxString> PicturesListPID;
653 std::map<int, wxString> PicturesListType;
654 std::map<int, wxString> PicturesListPicEncType;
655 std::map<int, wxString> PicturesListPictureType;
656 std::map<int, wxString> PicturesListTokens;
657 std::map<int, wxString> PicturesListMediatype;
658 std::map<int, int> PicturesListPref;
660 /* Items on the Logos tab */
662 std::map<int, std::string> LogosList;
663 std::map<int, wxString> LogosListAltID;
664 std::map<int, wxString> LogosListPID;
665 std::map<int, wxString> LogosListType;
666 std::map<int, wxString> LogosListPicEncType;
667 std::map<int, wxString> LogosListPictureType;
668 std::map<int, wxString> LogosListTokens;
669 std::map<int, wxString> LogosListMediatype;
670 std::map<int, int> LogosListPref;
672 /* Items on the Sounds tab */
674 std::map<int, std::string> SoundsList;
675 std::map<int, wxString> SoundsListAltID;
676 std::map<int, wxString> SoundsListPID;
677 std::map<int, wxString> SoundsListType;
678 std::map<int, wxString> SoundsListAudioEncType;
679 std::map<int, wxString> SoundsListAudioType;
680 std::map<int, wxString> SoundsListTokens;
681 std::map<int, wxString> SoundsListMediatype;
682 std::map<int, wxString> SoundsListLanguage;
683 std::map<int, int> SoundsListPref;
685 /* Items on the Calendaring tab */
687 std::map<int, wxString> CalendarList;
688 std::map<int, wxString> CalendarListAltID;
689 std::map<int, wxString> CalendarListPID;
690 std::map<int, wxString> CalendarListType;
691 std::map<int, wxString> CalendarListTokens;
692 std::map<int, wxString> CalendarListMediatype;
693 std::map<int, int> CalendarListPref;
695 std::map<int, wxString> CalendarRequestList;
696 std::map<int, wxString> CalendarRequestListAltID;
697 std::map<int, wxString> CalendarRequestListPID;
698 std::map<int, wxString> CalendarRequestListType;
699 std::map<int, wxString> CalendarRequestListTokens;
700 std::map<int, wxString> CalendarRequestListMediatype;
701 std::map<int, int> CalendarRequestListPref;
703 std::map<int, wxString> FreeBusyList;
704 std::map<int, wxString> FreeBusyListAltID;
705 std::map<int, wxString> FreeBusyListPID;
706 std::map<int, wxString> FreeBusyListType;
707 std::map<int, wxString> FreeBusyListTokens;
708 std::map<int, wxString> FreeBusyListMediatype;
709 std::map<int, int> FreeBusyListPref;
711 /* Items on the Security tab */
713 std::map<int, wxString> KeyList;
714 std::map<int, wxString> KeyListAltID;
715 std::map<int, wxString> KeyListPID;
716 std::map<int, bool> KeyListKeyType;
717 std::map<int, wxString> KeyListDataType;
718 std::map<int, wxString> KeyListDataEncType;
719 std::map<int, wxString> KeyListType;
720 std::map<int, wxString> KeyListTokens;
721 std::map<int, int> KeyListPref;
723 /* Items on the Other tab */
725 std::map<int, wxString> VendorList;
726 std::map<int, wxString> VendorListPEN;
727 std::map<int, wxString> VendorListElement;
729 std::map<int, wxString> XTokenList;
730 std::map<int, wxString> XTokenListTokens;
734 ContactLoadStatus LoadFile(wxString Filename);
735 ContactSaveStatus SaveFile(wxString Filename);
736 ContactSaveStatus SaveString(wxString *Data);
741 void SplitValues(wxString *PropertyLine,
742 std::map<int,int> *SplitPoints,
743 std::map<int,int> *SplitLength,
746 void CheckType(wxString *PropertySeg1,
747 std::map<int,int> *SplitPoints,
748 std::map<int,int> *SplitLength,
750 PropertyType *intType);
752 void ProcessNameValue(wxString *PropertyData,
753 wxString *PropertyName,
754 wxString *PropertyValue);
756 void ProcessTokens(wxString *PropertyName,
757 wxString *PropertyValue,
758 wxString *PropertyTokens,
761 void ProcessIntegerValue(wxString *PropertyName,
762 wxString PropertyNameMatch,
763 std::map<int,int> *PrefPtr,
764 wxString *PropertyValue,
766 bool *PropertyMatched);
768 void ProcessStringValue(wxString *PropertyName,
769 wxString PropertyNameMatch,
770 std::map<int,wxString> *MapPtr,
771 wxString *PropertyValue,
773 bool *PropertyMatched);