Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Added CALURI to the SaveString function of ContactDataObject
[xestiaab/.git] / source / contacteditor / cdo / ContactDataObject-Save.cpp
1 // ContactDataObject-Save.cpp - Client Data Object.
2 //
3 // (c) 2012-2016 Xestia Software Development.
4 //
5 // This file is part of Xestia Address Book.
6 //
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.
10 //
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.
15 //
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 #include "ContactDataObject.h"
20 #include "../../version.h"
22 ContactSaveStatus ContactDataObject::SaveString(wxString *SaveData){
23         
24         ContactSaveStatus SaveDataStatus = CONTACTSAVE_UNITTESTFAIL;
25         
26         // Write the header for the vCard data file.
27         
28         SaveData->Append("BEGIN:VCARD\n");
29         SaveData->Append("VERSION:4.0\n");
30         
31         // Write the product ID.
32         
33 #ifdef XAB_UNITTEST
34         
35         SaveData->Append("PRODID:-//Xestia//Address Book Unit Testing//KW\n");
36         
37 #else
38         
39         SaveData->Append(wxT("PRODID:-//Xestia//Address Book Version "));
40         SaveData->Append(wxT(XSDAB_VERSION));
41         SaveData->Append(wxT("//KW\n"));
42         
43 #endif
45         wxString ProcessData = "";
47         // Process UID.
49         if (UIDToken.size() > 0){
50                 
51                 ProcessData.Append("UID:");
52                 ProcessData.Append(UIDToken);
53                 ProcessData.Append("\n");
54                 SaveData->Append(ProcessData);
55                 ProcessData.clear();
56                 
57         }
58         
59         // Process KIND.
60         
61         switch(ContactKind){
63                 case CONTACTKIND_NONE:
64                         break;
65                 case CONTACTKIND_INDIVIDUAL:
66                         SaveData->Append("KIND:individual\n");
67                         break;
68                 case CONTACTKIND_GROUP:
69                         SaveData->Append("KIND:group\n");
70                         break;
71                 case CONTACTKIND_ORGANISATION:
72                         SaveData->Append("KIND:org\n");
73                         break;
74                 case CONTACTKIND_LOCATION:
75                         SaveData->Append("KIND:location\n");
76                         break;
77                 default:
78                         break;
79                 
80         }
81         
82         // TODO: Sortout REV.
83         
84         // Process XML.
86         for (std::map<int, wxString>::iterator XMLIter = XMLList.begin();
87                 XMLIter != XMLList.end(); XMLIter++){
88         
89                 ProcessData.Append("XML");
90                         
91                 if (XMLListAltID[XMLIter->first].size() > 0){
92                 
93                         ProcessData.Append(";ALTID=");
94                         ProcessData.Append(XMLListAltID[XMLIter->first]);
95                         
96                 }
97                         
98                 ProcessData.Append(":");
99                 ProcessData.Append(XMLIter->second);
100                 ProcessData.Append("\n");
101                 
102                 ProcessData = OutputText(&ProcessData);
103                 
104                 SaveData->Append(ProcessData);
105                 ProcessData.clear();
106                         
107         }
108         
109         // Process SOURCE.
110         
111         SaveSource(&SourceList, &SourceListAltID, 
112                 &SourceListPID, &SourceListType,
113                 &SourceListMediatype, &SourceListPref, 
114                 &SourceListTokens, SaveData);
115         
116         // Process CLIENTPIDMAP.
117         
118         for (std::map<int, wxString>::iterator CPIDIter = ClientPIDList.begin();
119                 CPIDIter != ClientPIDList.end(); CPIDIter++){
120         
121                 ProcessData.Append("CLIENTPIDMAP");
122                         
123                 if (ClientPIDListTokens[CPIDIter->first].size() > 0){
124                 
125                         ProcessData.Append(";");
126                         ProcessData.Append(ClientPIDListTokens[CPIDIter->first]);
127                         
128                 }
129                         
130                 ProcessData.Append(":");
131                 ProcessData.Append(CPIDIter->second);
132                 ProcessData.Append("\n");
133                 
134                 ProcessData = OutputText(&ProcessData);
135                 
136                 SaveData->Append(ProcessData);
137                 ProcessData.clear();
138                         
139         }
140         
141         // Process FN.
142         
143         for (std::map<int, wxString>::iterator FNIter = FullNamesList.begin();
144                 FNIter != FullNamesList.end(); FNIter++){
145                 
146                 ProcessData.Append("FN");
148                 // Check if there is a value for TYPE.
149                 
150                 if (FullNamesListType[FNIter->first].size() > 0){
151                 
152                         ProcessData.Append(";TYPE=");
153                         ProcessData.Append(FullNamesListType[FNIter->first]);
154                         
155                 }
157                 // Check if there is a value for LANGUAGE.
158                 
159                 if (FullNamesListLanguage[FNIter->first].size() > 0){
160                 
161                         ProcessData.Append(";LANGUAGE=");
162                         ProcessData.Append(FullNamesListLanguage[FNIter->first]);
163                         
164                 }
165                 
166                 // Check if there is a value for ALTID.
167                 
168                 if (FullNamesListAltID[FNIter->first].size() > 0){
169                 
170                         ProcessData.Append(";ALTID=");
171                         ProcessData.Append(FullNamesListAltID[FNIter->first]);
172                         
173                 }
174                 
175                 // Check if there is a value for PID.
177                 if (FullNamesListPID[FNIter->first].size() > 0){
178                 
179                         ProcessData.Append(";PID=");
180                         ProcessData.Append(FullNamesListPID[FNIter->first]);
181                         
182                 }
184                 // Check if there is a value for PREF.
186                 if (FullNamesListPref[FNIter->first] > 0){
187                 
188                         ProcessData.Append(";PREF=");
189                         ProcessData.Append(wxString::Format("%i", FullNamesListPref[FNIter->first]));
190                         
191                 }
193                 // Check if there is a value for tokens.
195                 if (FullNamesListTokens[FNIter->first].size() > 0){
196                 
197                         ProcessData.Append(";");
198                         ProcessData.Append(FullNamesListTokens[FNIter->first]);
199                         
200                 }
201                 
202                 ProcessData.Append(":");
203                 ProcessData.Append(FNIter->second);
204                 ProcessData.Append("\n");
205                 
206                 ProcessData = OutputText(&ProcessData);
207                 
208                 SaveData->Append(ProcessData);
209                 ProcessData.clear();
210                         
211         }
212         
213         // Process NICKNAME.
214         
215         SaveNickname(&GeneralNicknamesList, &GeneralNicknamesListAltID, 
216                 &GeneralNicknamesListPID, &GeneralNicknamesListType,
217                 &GeneralNicknamesListLanguage, &GeneralNicknamesListPref, 
218                 &GeneralNicknamesListTokens, SaveData, "");
219         SaveNickname(&HomeNicknamesList, &HomeNicknamesListAltID, 
220                 &HomeNicknamesListPID, &HomeNicknamesListType,
221                 &HomeNicknamesListLanguage, &HomeNicknamesListPref, 
222                 &HomeNicknamesListTokens, SaveData, "home");
223         SaveNickname(&BusinessNicknamesList, &BusinessNicknamesListAltID, 
224                 &BusinessNicknamesListPID, &BusinessNicknamesListType,
225                 &BusinessNicknamesListLanguage, &BusinessNicknamesListPref, 
226                 &BusinessNicknamesListTokens, SaveData, "work");
227         
228         // Process TITLE.
230         SaveTitle(&GeneralTitleList, &GeneralTitleListLanguage,
231                 &GeneralTitleListAltID, &GeneralTitleListPID,
232                 &GeneralTitleListType, &GeneralTitleListPref,
233                 &GeneralTitleListTokens, SaveData, "");
234         SaveTitle(&HomeTitleList, &HomeTitleListLanguage,
235                 &HomeTitleListAltID, &HomeTitleListPID,
236                 &HomeTitleListType, &HomeTitleListPref,
237                 &HomeTitleListTokens, SaveData, "home");
238         SaveTitle(&BusinessTitleList, &BusinessTitleListLanguage,
239                 &BusinessTitleListAltID, &BusinessTitleListPID,
240                 &BusinessTitleListType, &BusinessTitleListPref,
241                 &BusinessTitleListTokens, SaveData, "work");
242         
243         // Process TZ.
244         
245         SaveTimezone(&GeneralTZList, &GeneralTZListAltID, 
246                 &GeneralTZListPID, &GeneralTZListType,
247                 &GeneralTZListMediatype, &GeneralTZListPref, 
248                 &GeneralTZListTokens, SaveData, "");
249         SaveTimezone(&HomeTZList, &HomeTZListAltID, 
250                 &HomeTZListPID, &HomeTZListType,
251                 &HomeTZListMediatype, &HomeTZListPref, 
252                 &HomeTZListTokens, SaveData, "home");
253         SaveTimezone(&BusinessTZList, &BusinessTZListAltID, 
254                 &BusinessTZListPID, &BusinessTZListType,
255                 &BusinessTZListMediatype, &BusinessTZListPref, 
256                 &BusinessTZListTokens, SaveData, "work");
258         // Process ADR.
259         
260         SaveAddress(&GeneralAddressList, &GeneralAddressListTown,
261                 &GeneralAddressListCounty, &GeneralAddressListPostCode,
262                 &GeneralAddressListCountry, &GeneralAddressListLabel,
263                 &GeneralAddressListLang, &GeneralAddressListAltID,
264                 &GeneralAddressListPID, &GeneralAddressListGeo, 
265                 &GeneralAddressListTimezone, &GeneralAddressListType, 
266                 &GeneralAddressListMediatype, &GeneralAddressListPref,
267                 &GeneralAddressListTokens, SaveData, "");
268         SaveAddress(&HomeAddressList, &HomeAddressListTown,
269                 &HomeAddressListCounty, &HomeAddressListPostCode,
270                 &HomeAddressListCountry, &HomeAddressListLabel,
271                 &HomeAddressListLang, &HomeAddressListAltID,
272                 &HomeAddressListPID, &HomeAddressListGeo, 
273                 &HomeAddressListTimezone, &HomeAddressListType, 
274                 &HomeAddressListMediatype, &HomeAddressListPref,
275                 &HomeAddressListTokens, SaveData, "home");
276         SaveAddress(&BusinessAddressList, &BusinessAddressListTown,
277                 &BusinessAddressListCounty, &BusinessAddressListPostCode,
278                 &BusinessAddressListCountry, &BusinessAddressListLabel,
279                 &BusinessAddressListLang, &BusinessAddressListAltID,
280                 &BusinessAddressListPID, &BusinessAddressListGeo, 
281                 &BusinessAddressListTimezone, &BusinessAddressListType, 
282                 &BusinessAddressListMediatype, &BusinessAddressListPref,
283                 &BusinessAddressListTokens, SaveData, "work");
285         // Process EMAIL.
286         
287         SaveEmail(&GeneralEmailList, &GeneralEmailListAltID, 
288                 &GeneralEmailListPID, &GeneralEmailListType,
289                 &GeneralEmailListPref, &GeneralEmailListTokens, 
290                 SaveData, "");
291         SaveEmail(&HomeEmailList, &HomeEmailListAltID, 
292                 &HomeEmailListPID, &HomeEmailListType,
293                 &HomeEmailListPref, &HomeEmailListTokens, 
294                 SaveData, "home");
295         SaveEmail(&BusinessEmailList, &BusinessEmailListAltID, 
296                 &BusinessEmailListPID, &BusinessEmailListType,
297                 &BusinessEmailListPref, &BusinessEmailListTokens, 
298                 SaveData, "work");
300         // TODO: Process IMPP.
301         
302         // TODO: Process TEL.
303         
304         // Process LANG.
305         
306         SaveLanguage(&GeneralLanguageList, &GeneralLanguageListAltID, 
307                 &GeneralLanguageListPID, &GeneralLanguageListType,
308                 &GeneralLanguageListPref, &GeneralLanguageListTokens, 
309                 SaveData, "");
310         SaveLanguage(&HomeLanguageList, &HomeLanguageListAltID, 
311                 &HomeLanguageListPID, &HomeLanguageListType,
312                 &HomeLanguageListPref, &HomeLanguageListTokens, 
313                 SaveData, "home");
314         SaveLanguage(&BusinessLanguageList, &BusinessLanguageListAltID, 
315                 &BusinessLanguageListPID, &BusinessLanguageListType,
316                 &BusinessLanguageListPref, &BusinessLanguageListTokens, 
317                 SaveData, "work");
319         // Process GEO.
320         
321         SaveGeoposition(&GeneralGeographyList, &GeneralGeographyListAltID, 
322                 &GeneralGeographyListPID, &GeneralGeographyListType,
323                 &GeneralGeographyListMediatype, &GeneralGeographyListDataType,
324                 &GeneralGeographyListPref, &GeneralGeographyListTokens, 
325                 SaveData, "");
326         SaveGeoposition(&HomeGeographyList, &HomeGeographyListAltID, 
327                 &HomeGeographyListPID, &HomeGeographyListType,
328                 &HomeGeographyListMediatype, &HomeGeographyListDataType,
329                 &HomeGeographyListPref, &HomeGeographyListTokens, 
330                 SaveData, "home");
331         SaveGeoposition(&BusinessGeographyList, &BusinessGeographyListAltID, 
332                 &BusinessGeographyListPID, &BusinessGeographyListType,
333                 &BusinessGeographyListMediatype, &BusinessGeographyListDataType,
334                 &BusinessGeographyListPref, &BusinessGeographyListTokens, 
335                 SaveData, "work");
337         // Process RELATED.
338         
339         int Moo = 0;
341         for (std::map<int, wxString>::iterator RelatedIter = GeneralRelatedList.begin();
342                 RelatedIter != GeneralRelatedList.end(); RelatedIter++){
343                 
344                 ProcessData.Append("RELATED");
346                 // Check if there is a value for TYPE.
347                 
348                 if (GeneralRelatedListRelType[RelatedIter->first].size() > 0){
349                 
350                         wxString RelatedType = "";
351                         
352                         ProcessData.Append(";TYPE=");
353                         
354                         if (GeneralRelatedListRelType[RelatedIter->first] == _("Contact")){
356                                 RelatedType = wxT("contact");
358                         } else if (GeneralRelatedListRelType[RelatedIter->first] == _("Acquaintance")){
360                                 RelatedType = wxT("acquaintance");
362                         } else if (GeneralRelatedListRelType[RelatedIter->first] == _("Friend")){
364                                 RelatedType = wxT("friend");
366                         } else if (GeneralRelatedListRelType[RelatedIter->first] == _("Met")){
368                                 RelatedType = wxT("met");
370                         } else if (GeneralRelatedListRelType[RelatedIter->first] == _("Co-worker")){
372                                 RelatedType = wxT("co-worker");
374                         } else if (GeneralRelatedListRelType[RelatedIter->first] == _("Colleague")){
376                                 RelatedType = wxT("colleague");
378                         } else if (GeneralRelatedListRelType[RelatedIter->first] == _("Co-resident")){
380                                 RelatedType = wxT("co-resident");
382                         } else if (GeneralRelatedListRelType[RelatedIter->first] == _("Neighbour")){
384                                 RelatedType = wxT("neighbor");
386                         } else if (GeneralRelatedListRelType[RelatedIter->first] == _("Child")){
388                                 RelatedType = wxT("child");
390                         } else if (GeneralRelatedListRelType[RelatedIter->first] == _("Parent")){
392                                 RelatedType = wxT("parent");
394                         } else if (GeneralRelatedListRelType[RelatedIter->first] == _("Sibling")){
396                                 RelatedType = wxT("sibling");
398                         } else if (GeneralRelatedListRelType[RelatedIter->first] == _("Spouse")){
400                                 RelatedType = wxT("spouse");
402                         } else if (GeneralRelatedListRelType[RelatedIter->first] == _("Kin")){
404                                 RelatedType = wxT("kin");
406                         } else if (GeneralRelatedListRelType[RelatedIter->first] == _("Muse")){
408                                 RelatedType = wxT("muse");
410                         } else if (GeneralRelatedListRelType[RelatedIter->first] == _("Crush")){
412                                 RelatedType = wxT("crush");
414                         } else if (GeneralRelatedListRelType[RelatedIter->first] == _("Date")){
416                                 RelatedType = wxT("date");
418                         } else if (GeneralRelatedListRelType[RelatedIter->first]== _("Sweetheart")){
420                                 RelatedType = wxT("sweetheart");
422                         } else if (GeneralRelatedListRelType[RelatedIter->first] == _("Me")){
424                                 RelatedType = wxT("me");
426                         } else if (GeneralRelatedListRelType[RelatedIter->first] == _("Agent")){
428                                 RelatedType = wxT("agent");
430                         } else if (GeneralRelatedListRelType[RelatedIter->first] == _("Emergency")){
432                                 RelatedType = wxT("emergency");
434                         } else {
436                                 RelatedType = GeneralRelatedListRelType[RelatedIter->first];
438                         }
439                         
440                         ProcessData.Append(RelatedType);
441                         
442                 }
444                 // Check if there is a value for LANGUAGE.
445                 
446                 if (GeneralRelatedListLanguage[RelatedIter->first].size() > 0){
447                 
448                         ProcessData.Append(";LANGUAGE=");
449                         ProcessData.Append(GeneralRelatedListLanguage[RelatedIter->first]);
450                         
451                 }
452                 
453                 // Check if there is a value for ALTID.
454                 
455                 if (GeneralRelatedListAltID[RelatedIter->first].size() > 0){
456                 
457                         ProcessData.Append(";ALTID=");
458                         ProcessData.Append(GeneralRelatedListAltID[RelatedIter->first]);
459                         
460                 }
461                 
462                 // Check if there is a value for PID.
464                 if (GeneralRelatedListPID[RelatedIter->first].size() > 0){
465                 
466                         ProcessData.Append(";PID=");
467                         ProcessData.Append(GeneralRelatedListPID[RelatedIter->first]);
468                         
469                 }
471                 // Check if there is a value for PREF.
473                 if (GeneralRelatedListPref[RelatedIter->first] > 0){
474                 
475                         ProcessData.Append(";PREF=");
476                         ProcessData.Append(wxString::Format("%i", GeneralRelatedListPref[RelatedIter->first]));
477                         
478                 }
480                 // Check if there is a value for tokens.
482                 if (GeneralRelatedListTokens[RelatedIter->first].size() > 0){
483                 
484                         ProcessData.Append(";");
485                         ProcessData.Append(GeneralRelatedListTokens[RelatedIter->first]);
486                         
487                 }
488                 
489                 ProcessData.Append(":");
490                 ProcessData.Append(RelatedIter->second);
491                 ProcessData.Append("\n");
492                 
493                 ProcessData = OutputText(&ProcessData);
494                 
495                 SaveData->Append(ProcessData);
496                 ProcessData.clear();
497                         
498         }
499         
500         // Process URL.
501         
502         SaveURL(&GeneralWebsiteList, &GeneralWebsiteListAltID, 
503                 &GeneralWebsiteListPID, &GeneralWebsiteListType,
504                 &GeneralWebsiteListMediatype, &GeneralWebsiteListPref, 
505                 &GeneralWebsiteListTokens, SaveData, "");
506         SaveURL(&HomeWebsiteList, &HomeWebsiteListAltID, 
507                 &HomeWebsiteListPID, &HomeWebsiteListType,
508                 &HomeWebsiteListMediatype, &HomeWebsiteListPref, 
509                 &HomeWebsiteListTokens, SaveData, "home");
510         SaveURL(&BusinessWebsiteList, &BusinessWebsiteListAltID, 
511                 &BusinessWebsiteListPID, &BusinessWebsiteListType,
512                 &BusinessWebsiteListMediatype, &BusinessWebsiteListPref, 
513                 &BusinessWebsiteListTokens, SaveData, "work");
515         // Process ROLE.
516         
517         SaveRole(&GeneralRoleList, &GeneralRoleListLanguage,
518                 &GeneralRoleListAltID, &GeneralRoleListPID,
519                 &GeneralRoleListType, &GeneralRoleListPref,
520                 &GeneralRoleListTokens, SaveData, "");
521         SaveRole(&HomeRoleList, &HomeRoleListLanguage,
522                 &HomeRoleListAltID, &HomeRoleListPID,
523                 &HomeRoleListType, &HomeRoleListPref,
524                 &HomeRoleListTokens, SaveData, "home");
525         SaveRole(&BusinessRoleList, &BusinessRoleListLanguage,
526                 &BusinessRoleListAltID, &BusinessRoleListPID,
527                 &BusinessRoleListType, &BusinessRoleListPref,
528                 &BusinessRoleListTokens, SaveData, "work");
530         // Process ORG.
531         
532         SaveOrganisation(&GeneralOrganisationsList, &GeneralOrganisationsListAltID,
533                 &GeneralOrganisationsListPID, &GeneralOrganisationsListLanguage, 
534                 &GeneralOrganisationsListSortAs, &GeneralOrganisationsListType, 
535                 &GeneralOrganisationsListPref, &GeneralOrganisationsListTokens, 
536                 SaveData, "");
537         SaveOrganisation(&HomeOrganisationsList, &HomeOrganisationsListAltID,
538                 &HomeOrganisationsListPID, &HomeOrganisationsListLanguage, 
539                 &HomeOrganisationsListSortAs, &HomeOrganisationsListType, 
540                 &HomeOrganisationsListPref, &HomeOrganisationsListTokens, 
541                 SaveData, "home");
542         SaveOrganisation(&BusinessOrganisationsList, &BusinessOrganisationsListAltID,
543                 &BusinessOrganisationsListPID, &BusinessOrganisationsListLanguage, 
544                 &BusinessOrganisationsListSortAs, &BusinessOrganisationsListType, 
545                 &BusinessOrganisationsListPref, &BusinessOrganisationsListTokens, 
546                 SaveData, "work");
548         // Process NOTE.
549         
550         SaveNote(&GeneralNoteList, &GeneralNoteListLanguage,
551                 &GeneralNoteListAltID, &GeneralNoteListPID,
552                 &GeneralNoteListType, &GeneralNoteListPref,
553                 &GeneralNoteListTokens, SaveData, "");
554         SaveNote(&HomeNoteList, &HomeNoteListLanguage,
555                 &HomeNoteListAltID, &HomeNoteListPID,
556                 &HomeNoteListType, &HomeNoteListPref,
557                 &HomeNoteListTokens, SaveData, "home");
558         SaveNote(&BusinessNoteList, &BusinessNoteListLanguage,
559                 &BusinessNoteListAltID, &BusinessNoteListPID,
560                 &BusinessNoteListType, &BusinessNoteListPref,
561                 &BusinessNoteListTokens, SaveData, "work");
563         // Process CATEGORIES.
564         
565         SaveCategory(&CategoriesList, &CategoriesListLanguage,
566                 &CategoriesListAltID, &CategoriesListPID,
567                 &CategoriesListType, &CategoriesListPref,
568                 &CategoriesListTokens, SaveData);
570         // Process PHOTO.
571         
572         SavePhoto(&PicturesList, &PicturesListAltID, 
573                 &PicturesListPID, &PicturesListType,
574                 &PicturesListPicEncType, &PicturesListPictureType,
575                 &PicturesListMediatype, &PicturesListPref,
576                 &PicturesListTokens, SaveData);
577         
578         // Process LOGO.
579         
580         SaveLogo(&LogosList, &LogosListAltID, 
581                 &LogosListPID, &LogosListType,
582                 &LogosListPicEncType, &LogosListPictureType,
583                 &LogosListMediatype, &LogosListPref,
584                 &LogosListTokens, SaveData);
585         
586         // Process SOUND.
588         SaveSound(&SoundsList, &SoundsListAltID, 
589                 &SoundsListPID, &SoundsListType,
590                 &SoundsListAudioEncType, &SoundsListAudioType,
591                 &SoundsListMediatype, &SoundsListLanguage, 
592                 &SoundsListPref, &SoundsListTokens, 
593                 SaveData);
595         // Process CALURI.
596         
597         SaveCalendarURI(&CalendarList, &CalendarListMediatype,
598                 &CalendarListAltID, &CalendarListPID,
599                 &CalendarListType, &CalendarListPref,
600                 &CalendarListTokens, SaveData);
602         // Write the end part of the vCard data file.
603         
604         SaveData->Append("END:VCARD");
605         
606         SaveDataStatus = CONTACTSAVE_OK;
607         
608         return SaveDataStatus;
609         
612 void ContactDataObject::SaveTitle(map<int, wxString> *TitleList, map<int, wxString> *TitleListLanguage,
613         map<int, wxString> *TitleListAltID, map<int, wxString> *TitleListPID,
614         map<int, wxString> *TitleListType, map<int, int> *TitleListPref,
615         map<int, wxString> *TitleListTokens, wxString *SaveData, wxString DataType){
617         wxString ProcessData = "";
618                 
619         for (std::map<int, wxString>::iterator TitleIter = TitleList->begin();
620                 TitleIter != TitleList->end(); TitleIter++){
622                 ProcessData.Append("TITLE");
623                         
624                 // Check if there is a value for TYPE.
625                 
626                 if (DataType.size() > 0){
627                 
628                         ProcessData.Append(";TYPE=");
629                         ProcessData.Append(DataType);
630                         
631                 }
632                 
633                 // Check if there is a value for ALTID.
634                 
635                 if ((*TitleListAltID)[TitleIter->first].size() > 0){
636                 
637                         ProcessData.Append(";ALTID=");
638                         ProcessData.Append((*TitleListAltID)[TitleIter->first]);
639                         
640                 }
642                 // Check if there is a value for LANGUAGE.
643                 
644                 if ((*TitleListLanguage)[TitleIter->first].size() > 0){
645                 
646                         ProcessData.Append(";LANGUAGE=");
647                         ProcessData.Append((*TitleListLanguage)[TitleIter->first]);
648                         
649                 }
650                 
651                 // Check if there is a value for PID.
653                 if ((*TitleListPID)[TitleIter->first].size() > 0){
654                 
655                         ProcessData.Append(";PID=");
656                         ProcessData.Append((*TitleListPID)[TitleIter->first]);
657                         
658                 }
660                 // Check if there is a value for PREF.
662                 if ((*TitleListPref)[TitleIter->first] > 0){
663                 
664                         ProcessData.Append(";PREF=");
665                         ProcessData.Append(wxString::Format("%i", (*TitleListPref)[TitleIter->first]));
666                         
667                 }
669                 // Check if there is a value for tokens.
671                 if ((*TitleListTokens)[TitleIter->first].size() > 0){
672                 
673                         ProcessData.Append(";");
674                         ProcessData.Append((*TitleListTokens)[TitleIter->first]);
675                         
676                 }
677                         
678                 ProcessData.Append(":");
679                 ProcessData.Append(TitleIter->second);
680                 ProcessData.Append("\n");
682                 ProcessData = OutputText(&ProcessData);
683                         
684                 SaveData->Append(ProcessData);
685                 ProcessData.clear();
686                         
687         }
688                 
691 void ContactDataObject::SaveSource(map<int, wxString> *SourceList, map<int, wxString> *SourceListAltID, 
692         map<int, wxString> *SourceListPID, map<int, wxString> *SourceListType,
693         map<int, wxString> *SourceListMediatype, map<int, int> *SourceListPref, 
694         map<int, wxString> *SourceListTokens, wxString *SaveData){
696         wxString ProcessData = "";
697         
698         for (std::map<int, wxString>::iterator SourceIter = SourceList->begin();
699                 SourceIter != SourceList->end(); SourceIter++){
701                 ProcessData.Append("SOURCE");
702                         
703                 // Check if there is a value for TYPE.
704                 
705                 if ((*SourceListType)[SourceIter->first].size() > 0){
706                 
707                         ProcessData.Append(";TYPE=");
708                         ProcessData.Append((*SourceListType)[SourceIter->first]);
709                         
710                 }
711                 
712                 // Check if there is a value for ALTID.
713                 
714                 if ((*SourceListAltID)[SourceIter->first].size() > 0){
715                 
716                         ProcessData.Append(";ALTID=");
717                         ProcessData.Append((*SourceListAltID)[SourceIter->first]);
718                         
719                 }
721                 // Check if there is a value for MEDIATYPE.
722                 
723                 if ((*SourceListMediatype)[SourceIter->first].size() > 0){
724                 
725                         ProcessData.Append(";MEDIATYPE=");
726                         ProcessData.Append((*SourceListMediatype)[SourceIter->first]);
727                         
728                 }
729                 
730                 // Check if there is a value for PID.
732                 if ((*SourceListPID)[SourceIter->first].size() > 0){
733                 
734                         ProcessData.Append(";PID=");
735                         ProcessData.Append((*SourceListPID)[SourceIter->first]);
736                         
737                 }
739                 // Check if there is a value for PREF.
741                 if ((*SourceListPref)[SourceIter->first] > 0){
742                 
743                         ProcessData.Append(";PREF=");
744                         ProcessData.Append(wxString::Format("%i", (*SourceListPref)[SourceIter->first]));
745                         
746                 }
748                 // Check if there is a value for tokens.
750                 if ((*SourceListTokens)[SourceIter->first].size() > 0){
751                 
752                         ProcessData.Append(";");
753                         ProcessData.Append((*SourceListTokens)[SourceIter->first]);
754                         
755                 }
756                         
757                 ProcessData.Append(":");
758                 ProcessData.Append(SourceIter->second);
759                 ProcessData.Append("\n");
761                 ProcessData = OutputText(&ProcessData);
762                         
763                 SaveData->Append(ProcessData);
764                 ProcessData.clear();
765                         
766         }
767                 
770 void ContactDataObject::SaveNickname(map<int, wxString> *NicknameList, map<int, wxString> *NicknameListAltID, 
771         map<int, wxString> *NicknameListPID, map<int, wxString> *NicknameListType,
772         map<int, wxString> *NicknameListLanguage, map<int, int> *NicknameListPref, 
773         map<int, wxString> *NicknameListTokens, wxString *SaveData, wxString DataType){
775         wxString ProcessData = "";
776         
777         for (std::map<int, wxString>::iterator NicknameIter = NicknameList->begin();
778                 NicknameIter != NicknameList->end(); NicknameIter++){
780                 ProcessData.Append("NICKNAME");
781                         
782                 // Check if there is a value for TYPE.
783                 
784                 if (DataType.size() > 0){
785                 
786                         ProcessData.Append(";TYPE=");
787                         ProcessData.Append(DataType);
788                         
789                 }
790                 
791                 // Check if there is a value for ALTID.
792                 
793                 if ((*NicknameListAltID)[NicknameIter->first].size() > 0){
794                 
795                         ProcessData.Append(";ALTID=");
796                         ProcessData.Append((*NicknameListAltID)[NicknameIter->first]);
797                         
798                 }
800                 // Check if there is a value for MEDIATYPE.
801                 
802                 if ((*NicknameListLanguage)[NicknameIter->first].size() > 0){
803                 
804                         ProcessData.Append(";LANGUAGE=");
805                         ProcessData.Append((*NicknameListLanguage)[NicknameIter->first]);
806                         
807                 }
808                 
809                 // Check if there is a value for PID.
811                 if ((*NicknameListPID)[NicknameIter->first].size() > 0){
812                 
813                         ProcessData.Append(";PID=");
814                         ProcessData.Append((*NicknameListPID)[NicknameIter->first]);
815                         
816                 }
818                 // Check if there is a value for PREF.
820                 if ((*NicknameListPref)[NicknameIter->first] > 0){
821                 
822                         ProcessData.Append(";PREF=");
823                         ProcessData.Append(wxString::Format("%i", (*NicknameListPref)[NicknameIter->first]));
824                         
825                 }
827                 // Check if there is a value for tokens.
829                 if ((*NicknameListTokens)[NicknameIter->first].size() > 0){
830                 
831                         ProcessData.Append(";");
832                         ProcessData.Append((*NicknameListTokens)[NicknameIter->first]);
833                         
834                 }
835                         
836                 ProcessData.Append(":");
837                 ProcessData.Append(NicknameIter->second);
838                 ProcessData.Append("\n");
840                 ProcessData = OutputText(&ProcessData);
841                         
842                 SaveData->Append(ProcessData);
843                 ProcessData.clear();
844                         
845         }
846                 
849 void ContactDataObject::SaveTimezone(map<int, wxString> *TZList, map<int, wxString> *TZListAltID, 
850         map<int, wxString> *TZListPID, map<int, wxString> *TZListType,
851         map<int, wxString> *TZListMediatype, map<int, int> *TZListPref, 
852         map<int, wxString> *TZListTokens, wxString *SaveData, wxString DataType){
854         wxString ProcessData = "";
855         
856         for (std::map<int, wxString>::iterator TZIter = TZList->begin();
857                 TZIter != TZList->end(); TZIter++){
859                 ProcessData.Append("TZ");
860                         
861                 // Check if there is a value for TYPE.
862                 
863                 if (DataType.size() > 0){
864                 
865                         ProcessData.Append(";TYPE=");
866                         ProcessData.Append(DataType);
867                         
868                 }
869                 
870                 // Check if there is a value for ALTID.
871                 
872                 if ((*TZListAltID)[TZIter->first].size() > 0){
873                 
874                         ProcessData.Append(";ALTID=");
875                         ProcessData.Append((*TZListAltID)[TZIter->first]);
876                         
877                 }
879                 // Check if there is a value for MEDIATYPE.
880                 
881                 if ((*TZListMediatype)[TZIter->first].size() > 0){
882                 
883                         ProcessData.Append(";MEDIATYPE=");
884                         ProcessData.Append((*TZListMediatype)[TZIter->first]);
885                         
886                 }
887                 
888                 // Check if there is a value for PID.
890                 if ((*TZListPID)[TZIter->first].size() > 0){
891                 
892                         ProcessData.Append(";PID=");
893                         ProcessData.Append((*TZListPID)[TZIter->first]);
894                         
895                 }
897                 // Check if there is a value for PREF.
899                 if ((*TZListPref)[TZIter->first] > 0){
900                 
901                         ProcessData.Append(";PREF=");
902                         ProcessData.Append(wxString::Format("%i", (*TZListPref)[TZIter->first]));
903                         
904                 }
906                 // Check if there is a value for tokens.
908                 if ((*TZListTokens)[TZIter->first].size() > 0){
909                 
910                         ProcessData.Append(";");
911                         ProcessData.Append((*TZListTokens)[TZIter->first]);
912                         
913                 }
914                         
915                 ProcessData.Append(":");
916                 ProcessData.Append(TZIter->second);
917                 ProcessData.Append("\n");
919                 ProcessData = OutputText(&ProcessData);
920                         
921                 SaveData->Append(ProcessData);
922                 ProcessData.clear();
923                         
924         }
925                 
928 void ContactDataObject::SaveAddress(map<int, wxString> *AddressList, map<int, wxString> *AddressListTown,
929                 map<int, wxString> *AddressListCounty, map<int, wxString> *AddressListPostCode,
930                 map<int, wxString> *AddressListCountry, map<int, wxString> *AddressListLabel,
931                 map<int, wxString> *AddressListLang, map<int, wxString> *AddressListAltID,
932                 map<int, wxString> *AddressListPID, map<int, wxString> *AddressListGeo, 
933                 map<int, wxString> *AddressListTimezone, map<int, wxString> *AddressListType, 
934                 map<int, wxString> *AddressListMediatype, map<int, int> *AddressListPref, 
935                 map<int, wxString> *AddressListTokens, wxString *SaveData, wxString DataType){
937         wxString ProcessData = "";
938                         
939         for (std::map<int, wxString>::iterator AddressIter = AddressList->begin();
940                 AddressIter != AddressList->end(); AddressIter++){
941                         
942                 ProcessData.Append("ADR");
943                         
944                 // Check if there is a value for TYPE.
945                 
946                 if (DataType.size() > 0){
947                 
948                         ProcessData.Append(";TYPE=");
949                         ProcessData.Append(DataType);
950                         
951                 }
952                 
953                 // Check if there is a value for ALTID.
954                 
955                 if ((*AddressListAltID)[AddressIter->first].size() > 0){
956                 
957                         ProcessData.Append(";ALTID=");
958                         ProcessData.Append((*AddressListAltID)[AddressIter->first]);
959                         
960                 }
962                 // Check if there is a value for GEO.
963                 
964                 if ((*AddressListGeo)[AddressIter->first].size() > 0){
965                 
966                         ProcessData.Append(";GEO=\"");
967                         ProcessData.Append((*AddressListGeo)[AddressIter->first]);
968                         ProcessData.Append("\"");
969                         
970                 }
972                 // Check if there is a value for LABEL.
974                 if ((*AddressListLabel)[AddressIter->first].size() > 0){
975                 
976                         wxString AddressProcessed = "";
977                         AddressProcessed = (*AddressListLabel)[AddressIter->first];
978                         
979                         AddressProcessed.Replace("\n", "\\n", true);
980                         
981                         ProcessData.Append(";LABEL=");
982                         ProcessData.Append(AddressProcessed);
983                         
984                 }
985                 
986                 // Check if there is a value for LANGUAGE.
987                 
988                 if ((*AddressListLang)[AddressIter->first].size() > 0){
989                 
990                         ProcessData.Append(";LANGUAGE=");
991                         ProcessData.Append((*AddressListLang)[AddressIter->first]);
992                         
993                 }
994                 
995                 // Check if there is a value for MEDIATYPE.
996                 
997                 if ((*AddressListMediatype)[AddressIter->first].size() > 0){
998                 
999                         ProcessData.Append(";MEDIATYPE=");
1000                         ProcessData.Append((*AddressListMediatype)[AddressIter->first]);
1001                         
1002                 }
1003                 
1004                 // Check if there is a value for PID.
1006                 if ((*AddressListPID)[AddressIter->first].size() > 0){
1007                 
1008                         ProcessData.Append(";PID=");
1009                         ProcessData.Append((*AddressListPID)[AddressIter->first]);
1010                         
1011                 }
1013                 // Check if there is a value for PREF.
1015                 if ((*AddressListPref)[AddressIter->first] > 0){
1016                 
1017                         ProcessData.Append(";PREF=");
1018                         ProcessData.Append(wxString::Format("%i", (*AddressListPref)[AddressIter->first]));
1019                         
1020                 }
1022                 // Check if there is a value for TZ.
1024                 if ((*AddressListTimezone)[AddressIter->first].size() > 0){
1025                 
1026                         ProcessData.Append(";TZ=");
1027                         ProcessData.Append((*AddressListTimezone)[AddressIter->first]);
1028                         
1029                 }
1030                 
1031                 // Check if there is a value for tokens.
1033                 if ((*AddressListTokens)[AddressIter->first].size() > 0){
1034                 
1035                         ProcessData.Append(";");
1036                         ProcessData.Append((*AddressListTokens)[AddressIter->first]);
1037                         
1038                 }
1039                 
1040                 // Build the address.
1041                 
1042                 ProcessData.Append(":;;");
1043                 ProcessData.Append((*AddressList)[AddressIter->first]);
1044                 ProcessData.Append(";");
1045                 ProcessData.Append((*AddressListTown)[AddressIter->first]);
1046                 ProcessData.Append(";");
1047                 ProcessData.Append((*AddressListCounty)[AddressIter->first]);
1048                 ProcessData.Append(";");
1049                 ProcessData.Append((*AddressListPostCode)[AddressIter->first]);
1050                 ProcessData.Append(";");
1051                 ProcessData.Append((*AddressListCountry)[AddressIter->first]);
1052                 ProcessData.Append("\n");
1053                 
1054                 ProcessData = OutputText(&ProcessData);
1055                         
1056                 SaveData->Append(ProcessData);
1057                 ProcessData.clear();
1058                         
1059         }
1060                         
1063 void ContactDataObject::SaveEmail(map<int, wxString> *EmailList, map<int, wxString> *EmailListAltID, 
1064         map<int, wxString> *EmailListPID, map<int, wxString> *EmailListType,
1065         map<int, int> *EmailListPref, map<int, wxString> *EmailListTokens, 
1066         wxString *SaveData, wxString DataType){
1068         wxString ProcessData = "";
1069         
1070         for (std::map<int, wxString>::iterator EmailIter = EmailList->begin();
1071                 EmailIter != EmailList->end(); EmailIter++){
1073                 ProcessData.Append("EMAIL");
1074                         
1075                 // Check if there is a value for TYPE.
1076                 
1077                 if (DataType.size() > 0){
1078                 
1079                         ProcessData.Append(";TYPE=");
1080                         ProcessData.Append(DataType);
1081                         
1082                 }
1083                 
1084                 // Check if there is a value for ALTID.
1085                 
1086                 if ((*EmailListAltID)[EmailIter->first].size() > 0){
1087                 
1088                         ProcessData.Append(";ALTID=");
1089                         ProcessData.Append((*EmailListAltID)[EmailIter->first]);
1090                         
1091                 }
1092                 
1093                 // Check if there is a value for PID.
1095                 if ((*EmailListPID)[EmailIter->first].size() > 0){
1096                 
1097                         ProcessData.Append(";PID=");
1098                         ProcessData.Append((*EmailListPID)[EmailIter->first]);
1099                         
1100                 }
1102                 // Check if there is a value for PREF.
1104                 if ((*EmailListPref)[EmailIter->first] > 0){
1105                 
1106                         ProcessData.Append(";PREF=");
1107                         ProcessData.Append(wxString::Format("%i", (*EmailListPref)[EmailIter->first]));
1108                         
1109                 }
1111                 // Check if there is a value for tokens.
1113                 if ((*EmailListTokens)[EmailIter->first].size() > 0){
1114                 
1115                         ProcessData.Append(";");
1116                         ProcessData.Append((*EmailListTokens)[EmailIter->first]);
1117                         
1118                 }
1119                         
1120                 ProcessData.Append(":");
1121                 ProcessData.Append(EmailIter->second);
1122                 ProcessData.Append("\n");
1124                 ProcessData = OutputText(&ProcessData);
1125                         
1126                 SaveData->Append(ProcessData);
1127                 ProcessData.clear();
1128                         
1129         }
1130                 
1133 void ContactDataObject::SaveLanguage(map<int, wxString> *LanguageList, map<int, wxString> *LanguageListAltID, 
1134         map<int, wxString> *LanguageListPID, map<int, wxString> *LanguageListType,
1135         map<int, int> *LangaugeListPref, map<int, wxString> *LanguageListTokens, 
1136         wxString *SaveData, wxString DataType){
1138         wxString ProcessData = "";
1139         
1140         for (std::map<int, wxString>::iterator LanguageIter = LanguageList->begin();
1141                 LanguageIter != LanguageList->end(); LanguageIter++){
1143                 ProcessData.Append("LANG");
1144                         
1145                 // Check if there is a value for TYPE.
1146                 
1147                 if (DataType.size() > 0){
1148                 
1149                         ProcessData.Append(";TYPE=");
1150                         ProcessData.Append(DataType);
1151                         
1152                 }
1153                 
1154                 // Check if there is a value for ALTID.
1155                 
1156                 if ((*LanguageListAltID)[LanguageIter->first].size() > 0){
1157                 
1158                         ProcessData.Append(";ALTID=");
1159                         ProcessData.Append((*LanguageListAltID)[LanguageIter->first]);
1160                         
1161                 }
1162                 
1163                 // Check if there is a value for PID.
1165                 if ((*LanguageListPID)[LanguageIter->first].size() > 0){
1166                 
1167                         ProcessData.Append(";PID=");
1168                         ProcessData.Append((*LanguageListPID)[LanguageIter->first]);
1169                         
1170                 }
1172                 // Check if there is a value for PREF.
1174                 if ((*LangaugeListPref)[LanguageIter->first] > 0){
1175                 
1176                         ProcessData.Append(";PREF=");
1177                         ProcessData.Append(wxString::Format("%i", (*LangaugeListPref)[LanguageIter->first]));
1178                         
1179                 }
1181                 // Check if there is a value for tokens.
1183                 if ((*LanguageListTokens)[LanguageIter->first].size() > 0){
1184                 
1185                         ProcessData.Append(";");
1186                         ProcessData.Append((*LanguageListTokens)[LanguageIter->first]);
1187                         
1188                 }
1189                         
1190                 ProcessData.Append(":");
1191                 ProcessData.Append(LanguageIter->second);
1192                 ProcessData.Append("\n");
1194                 ProcessData = OutputText(&ProcessData);
1195                         
1196                 SaveData->Append(ProcessData);
1197                 ProcessData.clear();
1198                         
1199         }
1200                 
1203 void ContactDataObject::SaveGeoposition(map<int, wxString> *GeographyList, map<int, wxString> *GeographyListAltID, 
1204         map<int, wxString> *GeographyListPID, map<int, wxString> *GeographyListType,
1205         map<int, wxString> *GeographyListMediatype, map<int, wxString> *GeographyListDataType,
1206         map<int, int> *GeographyListPref, map<int, wxString> *GeographyListTokens, 
1207         wxString *SaveData, wxString DataType){
1209         wxString ProcessData = "";
1210         
1211         for (std::map<int, wxString>::iterator GeographyIter = GeographyList->begin();
1212                 GeographyIter != GeographyList->end(); GeographyIter++){
1214                 ProcessData.Append("GEO");
1215                         
1216                 // Check if there is a value for TYPE.
1217                 
1218                 if (DataType.size() > 0){
1219                 
1220                         ProcessData.Append(";TYPE=");
1221                         ProcessData.Append(DataType);
1222                         
1223                 }
1224                 
1225                 // Check if there is a value for ALTID.
1226                 
1227                 if ((*GeographyListAltID)[GeographyIter->first].size() > 0){
1228                 
1229                         ProcessData.Append(";ALTID=");
1230                         ProcessData.Append((*GeographyListAltID)[GeographyIter->first]);
1231                         
1232                 }
1233                 
1234                 // Check if there is a value for MEDIATYPE.
1235                 
1236                 if ((*GeographyListMediatype)[GeographyIter->first].size() > 0){
1237                 
1238                         ProcessData.Append(";MEDIATYPE=");
1239                         ProcessData.Append((*GeographyListMediatype)[GeographyIter->first]);
1240                         
1241                 }
1242                 
1243                 // Check if there is a value for PID.
1245                 if ((*GeographyListPID)[GeographyIter->first].size() > 0){
1246                 
1247                         ProcessData.Append(";PID=");
1248                         ProcessData.Append((*GeographyListPID)[GeographyIter->first]);
1249                         
1250                 }
1252                 // Check if there is a value for PREF.
1254                 if ((*GeographyListPref)[GeographyIter->first] > 0){
1255                 
1256                         ProcessData.Append(";PREF=");
1257                         ProcessData.Append(wxString::Format("%i", (*GeographyListPref)[GeographyIter->first]));
1258                         
1259                 }
1261                 // Check if there is a value for tokens.
1263                 if ((*GeographyListTokens)[GeographyIter->first].size() > 0){
1264                 
1265                         ProcessData.Append(";");
1266                         ProcessData.Append((*GeographyListTokens)[GeographyIter->first]);
1267                         
1268                 }
1269                         
1270                 ProcessData.Append(":");
1271                 ProcessData.Append((*GeographyListDataType)[GeographyIter->first]);
1272                 ProcessData.Append(":");
1273                 ProcessData.Append(GeographyIter->second);
1274                 ProcessData.Append("\n");
1276                 ProcessData = OutputText(&ProcessData);
1277                         
1278                 SaveData->Append(ProcessData);
1279                 ProcessData.clear();
1280                         
1281         }
1282                 
1285 void ContactDataObject::SaveURL(map<int, wxString> *WebsiteList, map<int, wxString> *WebsiteListAltID, 
1286                 map<int, wxString> *WebsiteListPID, map<int, wxString> *WebsiteListType,
1287                 map<int, wxString> *WebsiteListMediatype, map<int, int> *WebsiteListPref, 
1288                 map<int, wxString> *WebsiteListTokens, wxString *SaveData, wxString DataType){
1290         wxString ProcessData = "";
1291         
1292         for (std::map<int, wxString>::iterator WebsiteIter = WebsiteList->begin();
1293                 WebsiteIter != WebsiteList->end(); WebsiteIter++){
1295                 ProcessData.Append("URL");
1296                         
1297                 // Check if there is a value for TYPE.
1298                 
1299                 if (DataType.size() > 0){
1300                 
1301                         ProcessData.Append(";TYPE=");
1302                         ProcessData.Append(DataType);
1303                         
1304                 }
1305                 
1306                 // Check if there is a value for ALTID.
1307                 
1308                 if ((*WebsiteListAltID)[WebsiteIter->first].size() > 0){
1309                 
1310                         ProcessData.Append(";ALTID=");
1311                         ProcessData.Append((*WebsiteListAltID)[WebsiteIter->first]);
1312                         
1313                 }
1314                 
1315                 // Check if there is a value for MEDIATYPE.
1316                 
1317                 if ((*WebsiteListMediatype)[WebsiteIter->first].size() > 0){
1318                 
1319                         ProcessData.Append(";MEDIATYPE=");
1320                         ProcessData.Append((*WebsiteListMediatype)[WebsiteIter->first]);
1321                         
1322                 }
1323                 
1324                 // Check if there is a value for PID.
1326                 if ((*WebsiteListPID)[WebsiteIter->first].size() > 0){
1327                 
1328                         ProcessData.Append(";PID=");
1329                         ProcessData.Append((*WebsiteListPID)[WebsiteIter->first]);
1330                         
1331                 }
1333                 // Check if there is a value for PREF.
1335                 if ((*WebsiteListPref)[WebsiteIter->first] > 0){
1336                 
1337                         ProcessData.Append(";PREF=");
1338                         ProcessData.Append(wxString::Format("%i", (*WebsiteListPref)[WebsiteIter->first]));
1339                         
1340                 }
1342                 // Check if there is a value for tokens.
1344                 if ((*WebsiteListTokens)[WebsiteIter->first].size() > 0){
1345                 
1346                         ProcessData.Append(";");
1347                         ProcessData.Append((*WebsiteListTokens)[WebsiteIter->first]);
1348                         
1349                 }
1350                         
1351                 ProcessData.Append(":");
1352                 ProcessData.Append(WebsiteIter->second);
1353                 ProcessData.Append("\n");
1355                 ProcessData = OutputText(&ProcessData);
1356                         
1357                 SaveData->Append(ProcessData);
1358                 ProcessData.clear();
1359                         
1360         }
1361                         
1364 void ContactDataObject::SaveRole(map<int, wxString> *RoleList, map<int, wxString> *RoleListLanguage,
1365         map<int, wxString> *RoleListAltID, map<int, wxString> *RoleListPID,
1366         map<int, wxString> *RoleListType, map<int, int> *RoleListPref,
1367         map<int, wxString> *RoleListTokens, wxString *SaveData, wxString DataType){
1369         wxString ProcessData = "";
1370                 
1371         for (std::map<int, wxString>::iterator RoleIter = RoleList->begin();
1372                 RoleIter != RoleList->end(); RoleIter++){
1374                 ProcessData.Append("ROLE");
1375                         
1376                 // Check if there is a value for TYPE.
1377                 
1378                 if (DataType.size() > 0){
1379                 
1380                         ProcessData.Append(";TYPE=");
1381                         ProcessData.Append(DataType);
1382                         
1383                 }
1384                 
1385                 // Check if there is a value for ALTID.
1386                 
1387                 if ((*RoleListAltID)[RoleIter->first].size() > 0){
1388                 
1389                         ProcessData.Append(";ALTID=");
1390                         ProcessData.Append((*RoleListAltID)[RoleIter->first]);
1391                         
1392                 }
1394                 // Check if there is a value for LANGUAGE.
1395                 
1396                 if ((*RoleListLanguage)[RoleIter->first].size() > 0){
1397                 
1398                         ProcessData.Append(";LANGUAGE=");
1399                         ProcessData.Append((*RoleListLanguage)[RoleIter->first]);
1400                         
1401                 }
1402                 
1403                 // Check if there is a value for PID.
1405                 if ((*RoleListPID)[RoleIter->first].size() > 0){
1406                 
1407                         ProcessData.Append(";PID=");
1408                         ProcessData.Append((*RoleListPID)[RoleIter->first]);
1409                         
1410                 }
1412                 // Check if there is a value for PREF.
1414                 if ((*RoleListPref)[RoleIter->first] > 0){
1415                 
1416                         ProcessData.Append(";PREF=");
1417                         ProcessData.Append(wxString::Format("%i", (*RoleListPref)[RoleIter->first]));
1418                         
1419                 }
1421                 // Check if there is a value for tokens.
1423                 if ((*RoleListTokens)[RoleIter->first].size() > 0){
1424                 
1425                         ProcessData.Append(";");
1426                         ProcessData.Append((*RoleListTokens)[RoleIter->first]);
1427                         
1428                 }
1429                         
1430                 ProcessData.Append(":");
1431                 ProcessData.Append(RoleIter->second);
1432                 ProcessData.Append("\n");
1434                 ProcessData = OutputText(&ProcessData);
1435                 
1436                 SaveData->Append(ProcessData);
1437                 ProcessData.clear();
1438                         
1439         }
1440                 
1443 void ContactDataObject::SaveOrganisation(map<int, wxString> *OrganisationList, map<int, wxString> *OrganisationListAltID,
1444         map<int, wxString> *OrganisationListPID, map<int, wxString> *OrganisationListLanguage, 
1445         map<int, wxString> *OrganisationListSortAs, map<int, wxString> *OrganisationListType, 
1446         map<int, int> *OrganisationListPref, map<int, wxString> *OrganisationListTokens, 
1447         wxString *SaveData, wxString DataType){
1449         wxString ProcessData = "";
1450                 
1451         for (std::map<int, wxString>::iterator OrganisationIter = OrganisationList->begin();
1452                 OrganisationIter != OrganisationList->end(); OrganisationIter++){
1454                 ProcessData.Append("ORG");
1455                         
1456                 // Check if there is a value for TYPE.
1457                 
1458                 if (DataType.size() > 0){
1459                 
1460                         ProcessData.Append(";TYPE=");
1461                         ProcessData.Append(DataType);
1462                         
1463                 }
1464                 
1465                 // Check if there is a value for ALTID.
1466                 
1467                 if ((*OrganisationListAltID)[OrganisationIter->first].size() > 0){
1468                 
1469                         ProcessData.Append(";ALTID=");
1470                         ProcessData.Append((*OrganisationListAltID)[OrganisationIter->first]);
1471                         
1472                 }
1474                 // Check if there is a value for LANGUAGE.
1475                 
1476                 if ((*OrganisationListLanguage)[OrganisationIter->first].size() > 0){
1477                 
1478                         ProcessData.Append(";LANGUAGE=");
1479                         ProcessData.Append((*OrganisationListLanguage)[OrganisationIter->first]);
1480                         
1481                 }
1482                 
1483                 // Check if there is a value for PID.
1485                 if ((*OrganisationListPID)[OrganisationIter->first].size() > 0){
1486                 
1487                         ProcessData.Append(";PID=");
1488                         ProcessData.Append((*OrganisationListPID)[OrganisationIter->first]);
1489                         
1490                 }
1492                 // Check if there is a value for PREF.
1494                 if ((*OrganisationListPref)[OrganisationIter->first] > 0){
1495                 
1496                         ProcessData.Append(";PREF=");
1497                         ProcessData.Append(wxString::Format("%i", (*OrganisationListPref)[OrganisationIter->first]));
1498                         
1499                 }
1500                 
1501                 // Check if there is a value for SORT-AS.
1502                 
1503                 if ((*OrganisationListSortAs)[OrganisationIter->first].size() > 0){
1504                 
1505                         ProcessData.Append(";SORT-AS=\"");
1506                         ProcessData.Append((*OrganisationListSortAs)[OrganisationIter->first]);
1507                         ProcessData.Append("\"");
1508                         
1509                 }
1511                 // Check if there is a value for tokens.
1513                 if ((*OrganisationListTokens)[OrganisationIter->first].size() > 0){
1514                 
1515                         ProcessData.Append(";");
1516                         ProcessData.Append((*OrganisationListTokens)[OrganisationIter->first]);
1517                         
1518                 }
1519                         
1520                 ProcessData.Append(":");
1521                 ProcessData.Append(OrganisationIter->second);
1522                 ProcessData.Append("\n");
1524                 ProcessData = OutputText(&ProcessData);
1525                 
1526                 SaveData->Append(ProcessData);
1527                 ProcessData.clear();
1528                         
1529         }
1530                 
1533 void ContactDataObject::SaveNote(map<int, wxString> *NoteList, map<int, wxString> *NoteListLanguage,
1534         map<int, wxString> *NoteListAltID, map<int, wxString> *NoteListPID,
1535         map<int, wxString> *NoteListType, map<int, int> *NoteListPref,
1536         map<int, wxString> *NoteListTokens, wxString *SaveData, wxString DataType){
1538         wxString ProcessData = "";
1539                 
1540         for (std::map<int, wxString>::iterator NoteIter = NoteList->begin();
1541                 NoteIter != NoteList->end(); NoteIter++){
1543                 ProcessData.Append("NOTE");
1544                         
1545                 // Check if there is a value for TYPE.
1546                 
1547                 if (DataType.size() > 0){
1548                 
1549                         ProcessData.Append(";TYPE=");
1550                         ProcessData.Append(DataType);
1551                         
1552                 }
1553                 
1554                 // Check if there is a value for ALTID.
1555                 
1556                 if ((*NoteListAltID)[NoteIter->first].size() > 0){
1557                 
1558                         ProcessData.Append(";ALTID=");
1559                         ProcessData.Append((*NoteListAltID)[NoteIter->first]);
1560                         
1561                 }
1563                 // Check if there is a value for LANGUAGE.
1564                 
1565                 if ((*NoteListLanguage)[NoteIter->first].size() > 0){
1566                 
1567                         ProcessData.Append(";LANGUAGE=");
1568                         ProcessData.Append((*NoteListLanguage)[NoteIter->first]);
1569                         
1570                 }
1571                 
1572                 // Check if there is a value for PID.
1574                 if ((*NoteListPID)[NoteIter->first].size() > 0){
1575                 
1576                         ProcessData.Append(";PID=");
1577                         ProcessData.Append((*NoteListPID)[NoteIter->first]);
1578                         
1579                 }
1581                 // Check if there is a value for PREF.
1583                 if ((*NoteListPref)[NoteIter->first] > 0){
1584                 
1585                         ProcessData.Append(";PREF=");
1586                         ProcessData.Append(wxString::Format("%i", (*NoteListPref)[NoteIter->first]));
1587                         
1588                 }
1590                 // Check if there is a value for tokens.
1592                 if ((*NoteListTokens)[NoteIter->first].size() > 0){
1593                 
1594                         ProcessData.Append(";");
1595                         ProcessData.Append((*NoteListTokens)[NoteIter->first]);
1596                         
1597                 }
1598                         
1599                 ProcessData.Append(":");
1600                 ProcessData.Append(NoteIter->second);
1601                 ProcessData.Replace("\n", "\\n", true);
1602                 ProcessData.Append("\n");
1604                 ProcessData = OutputText(&ProcessData);
1605                 
1606                 SaveData->Append(ProcessData);
1607                 ProcessData.clear();
1608                         
1609         }
1610                 
1613 void ContactDataObject::SaveCategory(map<int, wxString> *CategoryList, map<int, wxString> *CategoryListLanguage,
1614         map<int, wxString> *CategoryListAltID, map<int, wxString> *CategoryListPID,
1615         map<int, wxString> *CategoryListType, map<int, int> *CategoryListPref,
1616         map<int, wxString> *CategoryListTokens, wxString *SaveData){
1618         wxString ProcessData = "";
1619                 
1620         for (std::map<int, wxString>::iterator CategoryIter = CategoryList->begin();
1621                 CategoryIter != CategoryList->end(); CategoryIter++){
1623                 ProcessData.Append("CATEGORIES");
1624                         
1625                 // Check if there is a value for TYPE.
1626                 
1627                 if ((*CategoryListType)[CategoryIter->first].size() > 0){
1628                 
1629                         ProcessData.Append(";TYPE=");
1630                         ProcessData.Append((*CategoryListType)[CategoryIter->first]);
1631                         
1632                 }
1633                 
1634                 // Check if there is a value for ALTID.
1635                 
1636                 if ((*CategoryListAltID)[CategoryIter->first].size() > 0){
1637                 
1638                         ProcessData.Append(";ALTID=");
1639                         ProcessData.Append((*CategoryListAltID)[CategoryIter->first]);
1640                         
1641                 }
1643                 // Check if there is a value for LANGUAGE.
1644                 
1645                 if ((*CategoryListLanguage)[CategoryIter->first].size() > 0){
1646                 
1647                         ProcessData.Append(";LANGUAGE=");
1648                         ProcessData.Append((*CategoryListLanguage)[CategoryIter->first]);
1649                         
1650                 }
1651                 
1652                 // Check if there is a value for PID.
1654                 if ((*CategoryListPID)[CategoryIter->first].size() > 0){
1655                 
1656                         ProcessData.Append(";PID=");
1657                         ProcessData.Append((*CategoryListPID)[CategoryIter->first]);
1658                         
1659                 }
1661                 // Check if there is a value for PREF.
1663                 if ((*CategoryListPref)[CategoryIter->first] > 0){
1664                 
1665                         ProcessData.Append(";PREF=");
1666                         ProcessData.Append(wxString::Format("%i", (*CategoryListPref)[CategoryIter->first]));
1667                         
1668                 }
1670                 // Check if there is a value for tokens.
1672                 if ((*CategoryListTokens)[CategoryIter->first].size() > 0){
1673                 
1674                         ProcessData.Append(";");
1675                         ProcessData.Append((*CategoryListTokens)[CategoryIter->first]);
1676                         
1677                 }
1678                         
1679                 ProcessData.Append(":");
1680                 ProcessData.Append(CategoryIter->second);
1681                 ProcessData.Append("\n");
1683                 ProcessData = OutputText(&ProcessData);
1684                 
1685                 SaveData->Append(ProcessData);
1686                 ProcessData.clear();
1687                         
1688         }
1689                 
1692 void ContactDataObject::SavePhoto(map<int, string> *PicturesList, map<int, wxString> *PicturesListAltID, 
1693                 map<int, wxString> *PicturesListPID, map<int, wxString> *PicturesListType,
1694                 map<int, wxString> *PicturesListPicEncType, map<int, wxString> *PicturesListPictureType,
1695                 map<int, wxString> *PicturesListMediatype, map<int, int> *PicturesListPref,
1696                 map<int, wxString> *PicturesListTokens, wxString *SaveData){
1698         wxString ProcessData = "";
1699                 
1700         for (std::map<int, string>::iterator PicturesIter = PicturesList->begin();
1701                 PicturesIter != PicturesList->end(); PicturesIter++){
1703                 ProcessData.Append("PHOTO");
1704                         
1705                 // Check if there is a value for TYPE.
1706                 
1707                 if ((*PicturesListType)[PicturesIter->first].size() > 0){
1708                 
1709                         ProcessData.Append(";TYPE=");
1710                         ProcessData.Append((*PicturesListType)[PicturesIter->first]);
1711                         
1712                 }
1713                 
1714                 // Check if there is a value for ALTID.
1715                 
1716                 if ((*PicturesListAltID)[PicturesIter->first].size() > 0){
1717                 
1718                         ProcessData.Append(";ALTID=");
1719                         ProcessData.Append((*PicturesListAltID)[PicturesIter->first]);
1720                         
1721                 }
1723                 // Check if there is a value for MEDIATYPE..
1724                 
1725                 if ((*PicturesListMediatype)[PicturesIter->first].size() > 0){
1726                 
1727                         ProcessData.Append(";MEDIATYPE=");
1728                         ProcessData.Append((*PicturesListMediatype)[PicturesIter->first]);
1729                         
1730                 }
1731                 
1732                 // Check if there is a value for PID.
1734                 if ((*PicturesListPID)[PicturesIter->first].size() > 0){
1735                 
1736                         ProcessData.Append(";PID=");
1737                         ProcessData.Append((*PicturesListPID)[PicturesIter->first]);
1738                         
1739                 }
1741                 // Check if there is a value for PREF.
1743                 if ((*PicturesListPref)[PicturesIter->first] > 0){
1744                 
1745                         ProcessData.Append(";PREF=");
1746                         ProcessData.Append(wxString::Format("%i", (*PicturesListPref)[PicturesIter->first]));
1747                         
1748                 }
1750                 // Check if there is a value for tokens.
1752                 if ((*PicturesListTokens)[PicturesIter->first].size() > 0){
1753                 
1754                         ProcessData.Append(";");
1755                         ProcessData.Append((*PicturesListTokens)[PicturesIter->first]);
1756                         
1757                 }
1758                 
1759                 ProcessData.Append(":data:");
1760                 ProcessData.Append((*PicturesListPictureType)[PicturesIter->first]);
1761                 ProcessData.Append(";");
1762                 ProcessData.Append((*PicturesListPicEncType)[PicturesIter->first]);
1763                 ProcessData.Append(",");
1764                 ProcessData.Append(PicturesIter->second);
1765                 ProcessData.Append("\n");
1767                 ProcessData = OutputText(&ProcessData);
1768                 
1769                 SaveData->Append(ProcessData);
1770                 ProcessData.clear();
1771                         
1772         }
1773                         
1776 void ContactDataObject::SaveLogo(map<int, string> *LogosList, map<int, wxString> *LogosListAltID, 
1777         map<int, wxString> *LogosListPID, map<int, wxString> *LogosListType,
1778         map<int, wxString> *LogosListPicEncType, map<int, wxString> *LogosListPictureType,
1779         map<int, wxString> *LogosListMediatype, map<int, int> *LogosListPref,
1780         map<int, wxString> *LogosListTokens, wxString *SaveData){
1782         wxString ProcessData = "";
1783                 
1784         for (std::map<int, string>::iterator LogosIter = LogosList->begin();
1785                 LogosIter != LogosList->end(); LogosIter++){
1787                 ProcessData.Append("LOGO");
1788                         
1789                 // Check if there is a value for TYPE.
1790                 
1791                 if ((*LogosListType)[LogosIter->first].size() > 0){
1792                 
1793                         ProcessData.Append(";TYPE=");
1794                         ProcessData.Append((*LogosListType)[LogosIter->first]);
1795                         
1796                 }
1797                 
1798                 // Check if there is a value for ALTID.
1799                 
1800                 if ((*LogosListAltID)[LogosIter->first].size() > 0){
1801                 
1802                         ProcessData.Append(";ALTID=");
1803                         ProcessData.Append((*LogosListAltID)[LogosIter->first]);
1804                         
1805                 }
1807                 // Check if there is a value for MEDIATYPE..
1808                 
1809                 if ((*LogosListMediatype)[LogosIter->first].size() > 0){
1810                 
1811                         ProcessData.Append(";MEDIATYPE=");
1812                         ProcessData.Append((*LogosListMediatype)[LogosIter->first]);
1813                         
1814                 }
1815                 
1816                 // Check if there is a value for PID.
1818                 if ((*LogosListPID)[LogosIter->first].size() > 0){
1819                 
1820                         ProcessData.Append(";PID=");
1821                         ProcessData.Append((*LogosListPID)[LogosIter->first]);
1822                         
1823                 }
1825                 // Check if there is a value for PREF.
1827                 if ((*LogosListPref)[LogosIter->first] > 0){
1828                 
1829                         ProcessData.Append(";PREF=");
1830                         ProcessData.Append(wxString::Format("%i", (*LogosListPref)[LogosIter->first]));
1831                         
1832                 }
1834                 // Check if there is a value for tokens.
1836                 if ((*LogosListTokens)[LogosIter->first].size() > 0){
1837                 
1838                         ProcessData.Append(";");
1839                         ProcessData.Append((*LogosListTokens)[LogosIter->first]);
1840                         
1841                 }
1842                 
1843                 ProcessData.Append(":data:");
1844                 ProcessData.Append((*LogosListPictureType)[LogosIter->first]);
1845                 ProcessData.Append(";");
1846                 ProcessData.Append((*LogosListPicEncType)[LogosIter->first]);
1847                 ProcessData.Append(",");
1848                 ProcessData.Append(LogosIter->second);
1849                 ProcessData.Append("\n");
1851                 ProcessData = OutputText(&ProcessData);
1852                 
1853                 SaveData->Append(ProcessData);
1854                 ProcessData.clear();
1855                         
1856         }
1857                 
1860 void ContactDataObject::SaveSound(map<int, string> *SoundsList, map<int, wxString> *SoundsListAltID, 
1861         map<int, wxString> *SoundsListPID, map<int, wxString> *SoundsListType,
1862         map<int, wxString> *SoundsListAudioEncType, map<int, wxString> *SoundsListAudioType,
1863         map<int, wxString> *SoundsListMediatype, map<int, wxString> *SoundsListLanguage, 
1864         map<int, int> *SoundsListPref, map<int, wxString> *SoundsListTokens, 
1865         wxString *SaveData){
1867         wxString ProcessData = "";
1868                 
1869         for (std::map<int, string>::iterator SoundsIter = SoundsList->begin();
1870                 SoundsIter != SoundsList->end(); SoundsIter++){
1872                 ProcessData.Append("SOUND");
1873                         
1874                 // Check if there is a value for TYPE.
1875                 
1876                 if ((*SoundsListType)[SoundsIter->first].size() > 0){
1877                 
1878                         ProcessData.Append(";TYPE=");
1879                         ProcessData.Append((*SoundsListType)[SoundsIter->first]);
1880                         
1881                 }
1882                 
1883                 // Check if there is a value for ALTID.
1884                 
1885                 if ((*SoundsListAltID)[SoundsIter->first].size() > 0){
1886                 
1887                         ProcessData.Append(";ALTID=");
1888                         ProcessData.Append((*SoundsListAltID)[SoundsIter->first]);
1889                         
1890                 }
1892                 // Check if there is a value for LANGUAGE.
1893                 
1894                 if ((*SoundsListLanguage)[SoundsIter->first].size() > 0){
1895                 
1896                         ProcessData.Append(";LANGUAGE=");
1897                         ProcessData.Append((*SoundsListLanguage)[SoundsIter->first]);
1898                         
1899                 }
1900                 
1901                 // Check if there is a value for MEDIATYPE.
1902                 
1903                 if ((*SoundsListMediatype)[SoundsIter->first].size() > 0){
1904                 
1905                         ProcessData.Append(";MEDIATYPE=");
1906                         ProcessData.Append((*SoundsListMediatype)[SoundsIter->first]);
1907                         
1908                 }
1909                 
1910                 // Check if there is a value for PID.
1912                 if ((*SoundsListPID)[SoundsIter->first].size() > 0){
1913                 
1914                         ProcessData.Append(";PID=");
1915                         ProcessData.Append((*SoundsListPID)[SoundsIter->first]);
1916                         
1917                 }
1919                 // Check if there is a value for PREF.
1921                 if ((*SoundsListPref)[SoundsIter->first] > 0){
1922                 
1923                         ProcessData.Append(";PREF=");
1924                         ProcessData.Append(wxString::Format("%i", (*SoundsListPref)[SoundsIter->first]));
1925                         
1926                 }
1928                 // Check if there is a value for tokens.
1930                 if ((*SoundsListTokens)[SoundsIter->first].size() > 0){
1931                 
1932                         ProcessData.Append(";");
1933                         ProcessData.Append((*SoundsListTokens)[SoundsIter->first]);
1934                         
1935                 }
1936                 
1937                 ProcessData.Append(":data:");
1938                 ProcessData.Append((*SoundsListAudioType)[SoundsIter->first]);
1939                 ProcessData.Append(";");
1940                 ProcessData.Append((*SoundsListAudioEncType)[SoundsIter->first]);
1941                 ProcessData.Append(",");
1942                 ProcessData.Append(SoundsIter->second);
1943                 ProcessData.Append("\n");
1945                 ProcessData = OutputText(&ProcessData);
1946                 
1947                 SaveData->Append(ProcessData);
1948                 ProcessData.clear();
1949                         
1950         }
1951                 
1954 void ContactDataObject::SaveCalendarURI(map<int, wxString> *CalendarList, map<int, wxString> *CalendarListMediatype,
1955         map<int, wxString> *CalendarListAltID, map<int, wxString> *CalendarListPID,
1956         map<int, wxString> *CalendarListType, map<int, int> *CalendarListPref,
1957         map<int, wxString> *CalendarListTokens, wxString *SaveData){
1959         wxString ProcessData = "";
1960                 
1961         for (std::map<int, wxString>::iterator CalendarIter = CalendarList->begin();
1962                 CalendarIter != CalendarList->end(); CalendarIter++){
1964                 ProcessData.Append("CALURI");
1965                         
1966                 // Check if there is a value for TYPE.
1967                 
1968                 if ((*CalendarListType)[CalendarIter->first].size() > 0){
1969                 
1970                         ProcessData.Append(";TYPE=");
1971                         ProcessData.Append((*CalendarListType)[CalendarIter->first]);
1972                         
1973                 }
1974                 
1975                 // Check if there is a value for ALTID.
1976                 
1977                 if ((*CalendarListAltID)[CalendarIter->first].size() > 0){
1978                 
1979                         ProcessData.Append(";ALTID=");
1980                         ProcessData.Append((*CalendarListAltID)[CalendarIter->first]);
1981                         
1982                 }
1984                 // Check if there is a value for MEDIATYPE.
1985                 
1986                 if ((*CalendarListMediatype)[CalendarIter->first].size() > 0){
1987                 
1988                         ProcessData.Append(";MEDIATYPE=");
1989                         ProcessData.Append((*CalendarListMediatype)[CalendarIter->first]);
1990                         
1991                 }
1992                 
1993                 // Check if there is a value for PID.
1995                 if ((*CalendarListPID)[CalendarIter->first].size() > 0){
1996                 
1997                         ProcessData.Append(";PID=");
1998                         ProcessData.Append((*CalendarListPID)[CalendarIter->first]);
1999                         
2000                 }
2002                 // Check if there is a value for PREF.
2004                 if ((*CalendarListPref)[CalendarIter->first] > 0){
2005                 
2006                         ProcessData.Append(";PREF=");
2007                         ProcessData.Append(wxString::Format("%i", (*CalendarListPref)[CalendarIter->first]));
2008                         
2009                 }
2011                 // Check if there is a value for tokens.
2013                 if ((*CalendarListTokens)[CalendarIter->first].size() > 0){
2014                 
2015                         ProcessData.Append(";");
2016                         ProcessData.Append((*CalendarListTokens)[CalendarIter->first]);
2017                         
2018                 }
2019                         
2020                 ProcessData.Append(":");
2021                 ProcessData.Append(CalendarIter->second);
2022                 ProcessData.Append("\n");
2024                 ProcessData = OutputText(&ProcessData);
2025                 
2026                 SaveData->Append(ProcessData);
2027                 ProcessData.clear();
2028                         
2029         }
2030                 
Xestia Software Development
Yn Maystri
© 2006 - 2019 Xestia Software Development
Software

Xestia Address Book
Xestia Calendar
Development

Xestia Gelforn
Everything else

About
News
Privacy Policy