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