1 #include "CalendarEvent.h"
5 void CalendarEventObject::SaveObjectData(string *SaveData){
8 string DataLineProcessed = "";
10 *SaveData += "BEGIN:VEVENT\n";
14 if (UniqueID.size() > 0){
16 if (UniqueIDTokens.size() > 0){
19 DataLine += UniqueIDTokens;
31 DataLineProcessed = OutputText(&DataLine);
33 *SaveData += DataLineProcessed;
36 DataLineProcessed.clear();
40 // Process the DTSTAMP.
42 if (DateTimeStampData.size() > 0){
44 if (DateTimeStampTokens.size() > 0){
46 DataLine += "DTSTAMP;";
47 DataLine += DateTimeStampTokens;
51 DataLine += "DTSTAMP";
56 DataLine += DateTimeStampData;
59 DataLineProcessed = OutputText(&DataLine);
61 *SaveData += DataLineProcessed;
64 DataLineProcessed.clear();
68 // Process the DTSTART.
70 if (DateTimeStartData.size() > 0){
72 DataLine += "DTSTART";
74 if (DateTimeStartDataValue.size() > 0){
76 DataLine += ";VALUE=";
77 DataLine += DateTimeStartDataValue;
81 if (DateTimeStartDataTimeZoneID.size() > 0){
84 DataLine += DateTimeStartDataTimeZoneID;
88 if (DateTimeStartDataTokens.size() > 0){
91 DataLine += DateTimeStartDataTokens;
96 DataLine += DateTimeStartData;
99 DataLineProcessed = OutputText(&DataLine);
101 *SaveData += DataLineProcessed;
104 DataLineProcessed.clear();
108 // Process the DTEND.
110 if (DateTimeEndData.size() > 0){
114 if (DateTimeEndDataValue.size() > 0){
116 DataLine += ";VALUE=";
117 DataLine += DateTimeEndDataValue;
121 if (DateTimeEndDataTimeZoneID.size() > 0){
123 DataLine += ";TZID=";
124 DataLine += DateTimeEndDataTimeZoneID;
128 if (DateTimeEndDataTokens.size() > 0){
131 DataLine += DateTimeEndDataTokens;
136 DataLine += DateTimeEndData;
139 DataLineProcessed = OutputText(&DataLine);
141 *SaveData += DataLineProcessed;
144 DataLineProcessed.clear();
148 // Process the SUMMARY.
150 if (SummaryData.size() > 0){
152 DataLine += "SUMMARY";
154 if (SummaryDataAltRep.size() > 0){
156 DataLine += ";ALTREP=\"";
157 DataLine += SummaryDataAltRep;
162 if (SummaryDataLanguage.size() > 0){
164 DataLine += ";LANGUAGE=";
165 DataLine += SummaryDataLanguage;
169 if (SummaryDataTokens.size() > 0){
172 DataLine += SummaryDataTokens;
177 DataLine += SummaryData;
180 DataLineProcessed = OutputText(&DataLine);
182 *SaveData += DataLineProcessed;
185 DataLineProcessed.clear();
189 // Process the CLASS value.
191 if (ClassData.size() > 0){
193 if (ClassDataTokens.size() > 0){
195 DataLine += "CLASS;";
196 DataLine += ClassDataTokens;
205 DataLine += ClassData;
208 DataLineProcessed = OutputText(&DataLine);
210 *SaveData += DataLineProcessed;
213 DataLineProcessed.clear();
217 // Process the CREATED value.
219 if (DateTimeCreatedData.size() > 0){
221 if (DateTimeCreatedTokens.size() > 0){
223 DataLine += "CREATED;";
224 DataLine += DateTimeCreatedTokens;
228 DataLine += "CREATED";
233 DataLine += DateTimeCreatedData;
236 DataLineProcessed = OutputText(&DataLine);
238 *SaveData += DataLineProcessed;
241 DataLineProcessed.clear();
245 // Process the DESCRIPTION values. Write out the
246 // first DESCRPITION only as per RFC5545 specifcation.
248 if (DescriptionList.size() > 0){
250 DataLine += "DESCRIPTION";
252 if (DescriptionListAltRep[0].size() > 0){
254 DataLine += ";ALTREP=\"";
255 DataLine += DescriptionListAltRep[0];
260 if (DescriptionListLanguage[0].size() > 0){
262 DataLine += ";LANGUAGE=";
263 DataLine += DescriptionListLanguage[0];
267 if (DescriptionListTokens[0].size() > 0){
270 DataLine += DescriptionListTokens[0];
275 DataLine += DescriptionList[0];
278 DataLineProcessed = OutputText(&DataLine);
280 *SaveData += DataLineProcessed;
283 DataLineProcessed.clear();
287 // Process the GEO value.
289 if (GeographicData.size() > 0){
291 if (GeographicTokens.size() > 0){
294 DataLine += GeographicTokens;
303 DataLine += GeographicData;
306 DataLineProcessed = OutputText(&DataLine);
308 *SaveData += DataLineProcessed;
311 DataLineProcessed.clear();
315 // Process the LAST-MODIFIED value.
317 if (LastModifiedData.size() > 0){
319 if (LastModifiedTokens.size() > 0){
321 DataLine += "LAST-MODIFIED;";
322 DataLine += LastModifiedTokens;
326 DataLine += "LAST-MODIFIED";
331 DataLine += LastModifiedData;
334 DataLineProcessed = OutputText(&DataLine);
336 *SaveData += DataLineProcessed;
339 DataLineProcessed.clear();
343 // Process the LOCATION value.
345 if (LocationData.size() > 0){
347 DataLine += "LOCATION";
349 if (LocationDataAltRep.size() > 0){
351 DataLine += ";ALTREP=\"";
352 DataLine += LocationDataAltRep;
357 if (LocationDataLanguage.size() > 0){
359 DataLine += ";LANGUAGE=";
360 DataLine += LocationDataLanguage;
364 if (LocationDataTokens.size() > 0){
367 DataLine += LocationDataTokens;
372 DataLine += LocationData;
375 DataLineProcessed = OutputText(&DataLine);
377 *SaveData += DataLineProcessed;
380 DataLineProcessed.clear();
384 // Process the ORGANIZER value.
386 if (OrganiserData.size() > 0){
388 DataLine += "ORGANIZER";
390 if (OrganiserDataCommonName.size() > 0){
393 DataLine += OrganiserDataCommonName;
397 if (OrganiserDataDirectoryEntry.size() > 0){
399 DataLine += ";DIR=\"";
400 DataLine += OrganiserDataDirectoryEntry;
405 if (OrganiserDataSentByParam.size() > 0){
407 DataLine += ";SENT-BY=\"";
408 DataLine += OrganiserDataSentByParam;
413 if (OrganiserDataLanguage.size() > 0){
415 DataLine += ";LANGUAGE=";
416 DataLine += OrganiserDataLanguage;
420 if (OrganiserDataTokens.size() > 0){
423 DataLine += OrganiserDataTokens;
428 DataLine += OrganiserData;
431 DataLineProcessed = OutputText(&DataLine);
433 *SaveData += DataLineProcessed;
436 DataLineProcessed.clear();
440 // Process the PRIORITY value.
442 if (PriorityData > -1 && PriorityData < 10){
444 DataLine += "PRIORITY";
446 if (PriorityTokens.size() > 0){
449 DataLine += PriorityTokens;
454 DataLine += to_string(PriorityData);
457 DataLineProcessed = OutputText(&DataLine);
459 *SaveData += DataLineProcessed;
462 DataLineProcessed.clear();
466 // Process the SEQUENCE value.
468 if (SequenceData > -1 && SequenceData < 10){
470 DataLine += "SEQUENCE";
472 if (SequenceTokens.size() > 0){
475 DataLine += SequenceTokens;
480 DataLine += to_string(SequenceData);
483 DataLineProcessed = OutputText(&DataLine);
485 *SaveData += DataLineProcessed;
488 DataLineProcessed.clear();
492 // Process the STATUS value.
494 if (StatusData.size() > 0){
496 DataLine += "STATUS";
498 if (StatusLanguage.size() > 0){
500 DataLine += ";LANGUAGE=";
501 DataLine += StatusLanguage;
505 if (StatusTokens.size() > 0){
508 DataLine += StatusTokens;
513 DataLine += StatusData;
516 DataLineProcessed = OutputText(&DataLine);
518 *SaveData += DataLineProcessed;
521 DataLineProcessed.clear();
525 // Process the TRANSP value.
527 if (TimeTransparencyData.size() > 0){
529 DataLine += "TRANSP";
531 if (TimeTransparencyDataTokens.size() > 0){
534 DataLine += TimeTransparencyDataTokens;
539 DataLine += TimeTransparencyData;
542 DataLineProcessed = OutputText(&DataLine);
544 *SaveData += DataLineProcessed;
547 DataLineProcessed.clear();
551 // Process the URL value.
553 if (URLData.size() > 0){
557 if (URLDataTokens.size() > 0){
560 DataLine += URLDataTokens;
568 DataLineProcessed = OutputText(&DataLine);
570 *SaveData += DataLineProcessed;
573 DataLineProcessed.clear();
577 // Process the RECURRENCE-ID value.
579 if (RecurranceIDData.size() > 0){
581 DataLine += "RECURRENCE-ID";
583 if (RecurranceIDDataTimeZoneParam.size() > 0){
585 DataLine += ";TZID=";
586 DataLine += RecurranceIDDataTimeZoneParam;
590 if (RecurranceIDDataRangeParam.size() > 0){
592 DataLine += ";RANGE=";
593 DataLine += RecurranceIDDataRangeParam;
597 if (RecurranceIDDataValue.size() > 0){
599 DataLine += ";VALUE=";
600 DataLine += RecurranceIDDataValue;
604 if (RecurranceIDDataTokens.size() > 0){
607 DataLine += RecurranceIDDataTokens;
612 DataLine += RecurranceIDData;
615 DataLineProcessed = OutputText(&DataLine);
617 *SaveData += DataLineProcessed;
620 DataLineProcessed.clear();
624 // Process the DURATION value.
626 if (DurationData.size() > 0){
628 DataLine += "DURATION";
630 if (DurationDataTokens.size() > 0){
633 DataLine += DurationDataTokens;
638 DataLine += DurationData;
641 DataLineProcessed = OutputText(&DataLine);
643 *SaveData += DataLineProcessed;
646 DataLineProcessed.clear();
650 // Process the RRULE value.
652 if (RecurranceRuleData.size() > 0){
656 if (RecurranceRuleDataTokens.size() > 0){
659 DataLine += RecurranceRuleDataTokens;
664 DataLine += RecurranceRuleData;
667 DataLineProcessed = OutputText(&DataLine);
669 *SaveData += DataLineProcessed;
672 DataLineProcessed.clear();
676 // Process the ATTACH values.
678 if (AttachList.size() > 0){
680 for (int AttachListSeek = 0; AttachListSeek < AttachList.size();
683 DataLine += "ATTACH";
685 if (AttachListFormatType[AttachListSeek].size() > 0){
687 DataLine += ";FMTTYPE=";
688 DataLine += AttachListFormatType[AttachListSeek];
692 if (AttachListValue[AttachListSeek].size() > 0){
694 DataLine += ";VALUE=";
695 DataLine += AttachListValue[AttachListSeek];
699 if (AttachListEncoding[AttachListSeek].size() > 0){
701 DataLine += ";ENCODING=";
702 DataLine += AttachListEncoding[AttachListSeek];
706 if (AttachListTokens[AttachListSeek].size() > 0){
709 DataLine += AttachListTokens[AttachListSeek];
714 DataLine += AttachList[AttachListSeek];
717 DataLineProcessed = OutputText(&DataLine);
719 *SaveData += DataLineProcessed;
722 DataLineProcessed.clear();
728 // Process the ATTENDEE value.
730 if (AttendeeList.size() > 0){
732 for (int AttendeeListSeek = 0; AttendeeListSeek < AttendeeList.size();
735 DataLine += "ATTENDEE";
737 if (AttendeeListMember[AttendeeListSeek].size() > 0){
739 DataLine += ";MEMBER=\"";
740 DataLine += AttendeeListMember[AttendeeListSeek];
745 if (AttendeeListDelegatedFrom[AttendeeListSeek].size() > 0){
747 DataLine += ";DELEGATED-FROM=\"";
748 DataLine += AttendeeListDelegatedFrom[AttendeeListSeek];
753 if (AttendeeListDelegatedTo[AttendeeListSeek].size() > 0){
755 DataLine += ";DELEGATED-TO=\"";
756 DataLine += AttendeeListDelegatedTo[AttendeeListSeek];
761 if (AttendeeListRole[AttendeeListSeek].size() > 0){
763 DataLine += ";ROLE=";
764 DataLine += AttendeeListRole[AttendeeListSeek];
768 if (AttendeeListRSVP[AttendeeListSeek].size() > 0){
770 DataLine += ";RSVP=";
771 DataLine += AttendeeListRSVP[AttendeeListSeek];
775 if (AttendeeListDirectoryEntry[AttendeeListSeek].size() > 0){
777 DataLine += ";DIR=\"";
778 DataLine += AttendeeListDirectoryEntry[AttendeeListSeek];
783 if (AttendeeListSentBy[AttendeeListSeek].size() > 0){
785 DataLine += ";SENT-BY=\"";
786 DataLine += AttendeeListSentBy[AttendeeListSeek];
791 if (AttendeeListCommonName[AttendeeListSeek].size() > 0){
793 DataLine += ";CN=\"";
794 DataLine += AttendeeListCommonName[AttendeeListSeek];
799 if (AttendeeListCalendarUserType[AttendeeListSeek].size() > 0){
801 DataLine += ";CUTYPE=";
802 DataLine += AttendeeListCalendarUserType[AttendeeListSeek];
806 if (AttendeeListParticipationStatus[AttendeeListSeek].size() > 0){
808 DataLine += ";PARTSTAT=";
809 DataLine += AttendeeListParticipationStatus[AttendeeListSeek];
813 if (AttendeeListLanguage[AttendeeListSeek].size() > 0){
815 DataLine += ";LANGUAGE=";
816 DataLine += AttendeeListLanguage[AttendeeListSeek];
820 if (AttendeeListTokens[AttendeeListSeek].size() > 0){
823 DataLine += AttendeeListTokens[AttendeeListSeek];
828 DataLine += AttendeeList[AttendeeListSeek];
831 DataLineProcessed = OutputText(&DataLine);
833 *SaveData += DataLineProcessed;
836 DataLineProcessed.clear();
842 // Process the CATEGORIES value.
844 if (CategoriesList.size() > 0){
846 for (int CategoriesListSeek = 0; CategoriesListSeek < CategoriesList.size();
847 CategoriesListSeek++){
849 DataLine += "CATEGORIES";
851 if (CategoriesListLanguage[CategoriesListSeek].size() > 0){
853 DataLine += ";LANGUAGE=";
854 DataLine += CategoriesListLanguage[CategoriesListSeek];
858 if (CategoriesListTokens[CategoriesListSeek].size() > 0){
861 DataLine += CategoriesListTokens[CategoriesListSeek];
866 DataLine += CategoriesList[CategoriesListSeek];
869 DataLineProcessed = OutputText(&DataLine);
871 *SaveData += DataLineProcessed;
874 DataLineProcessed.clear();
880 // Process the COMMENT value.
882 if (CommentList.size() > 0){
884 for (int CommentListSeek = 0; CommentListSeek < CommentList.size();
887 DataLine += "COMMENT";
889 if (CommentListAltRep[CommentListSeek].size() > 0){
891 DataLine += ";ALTREP=\"";
892 DataLine += CommentListAltRep[CommentListSeek];
897 if (CommentListLanguage[CommentListSeek].size() > 0){
899 DataLine += ";LANGUAGE=";
900 DataLine += CommentListLanguage[CommentListSeek];
904 if (CommentListTokens[CommentListSeek].size() > 0){
907 DataLine += CommentListTokens[CommentListSeek];
912 DataLine += CommentList[CommentListSeek];
915 DataLineProcessed = OutputText(&DataLine);
917 *SaveData += DataLineProcessed;
920 DataLineProcessed.clear();
926 // Process the CONTACT value.
928 if (ContactList.size() > 0){
930 for (int ContactListSeek = 0; ContactListSeek < ContactList.size();
933 DataLine += "CONTACT";
935 if (ContactListAltRep[ContactListSeek].size() > 0){
937 DataLine += ";ALTREP=\"";
938 DataLine += ContactListAltRep[ContactListSeek];
943 if (ContactListLanguage[ContactListSeek].size() > 0){
945 DataLine += ";LANGUAGE=";
946 DataLine += ContactListLanguage[ContactListSeek];
950 if (ContactListTokens[ContactListSeek].size() > 0){
953 DataLine += ContactListTokens[ContactListSeek];
958 DataLine += ContactList[ContactListSeek];
961 DataLineProcessed = OutputText(&DataLine);
963 *SaveData += DataLineProcessed;
966 DataLineProcessed.clear();
972 // Process the EXDATE value.
974 if (ExcludeDateData.size() > 0){
976 for (int ExcludeDateDataSeek = 0; ExcludeDateDataSeek < ExcludeDateData.size();
977 ExcludeDateDataSeek++){
979 DataLine += "EXDATE";
981 if (ExcludeDateDataTimeZoneParam[ExcludeDateDataSeek].size() > 0){
983 DataLine += ";TZID=";
984 DataLine += ExcludeDateDataTimeZoneParam[ExcludeDateDataSeek];
988 if (ExcludeDateDataValue[ExcludeDateDataSeek].size() > 0){
990 DataLine += ";VALUE=";
991 DataLine += ExcludeDateDataValue[ExcludeDateDataSeek];
995 if (ExcludeDateDataTokens[ExcludeDateDataSeek].size() > 0){
998 DataLine += ExcludeDateDataTokens[ExcludeDateDataSeek];
1003 DataLine += ExcludeDateData[ExcludeDateDataSeek];
1006 DataLineProcessed = OutputText(&DataLine);
1008 *SaveData += DataLineProcessed;
1011 DataLineProcessed.clear();
1017 // Process the REQUEST-STATUS value.
1019 if (RequestStatusData.size() > 0){
1021 for (int RequestStatusDataSeek = 0; RequestStatusDataSeek < RequestStatusData.size();
1022 RequestStatusDataSeek++){
1024 DataLine += "REQUEST-STATUS";
1026 if (RequestStatusLanguage[RequestStatusDataSeek].size() > 0){
1028 DataLine += ";LANGUAGE=";
1029 DataLine += RequestStatusLanguage[RequestStatusDataSeek];
1033 if (RequestStatusTokens[RequestStatusDataSeek].size() > 0){
1036 DataLine += RequestStatusTokens[RequestStatusDataSeek];
1041 DataLine += RequestStatusData[RequestStatusDataSeek];
1044 DataLineProcessed = OutputText(&DataLine);
1046 *SaveData += DataLineProcessed;
1049 DataLineProcessed.clear();
1055 // Process the RELATED-TO value.
1057 if (RelatedToData.size() > 0){
1059 for (int RequestToDataSeek = 0; RequestToDataSeek < RelatedToData.size();
1060 RequestToDataSeek++){
1062 DataLine += "RELATED-TO";
1064 if (RelatedToDataRelationType[RequestToDataSeek].size() > 0){
1066 DataLine += ";RELTYPE=";
1067 DataLine += RelatedToDataRelationType[RequestToDataSeek];
1071 if (RelatedToDataTokens[RequestToDataSeek].size() > 0){
1074 DataLine += RelatedToDataTokens[RequestToDataSeek];
1079 DataLine += RelatedToData[RequestToDataSeek];
1082 DataLineProcessed = OutputText(&DataLine);
1084 *SaveData += DataLineProcessed;
1087 DataLineProcessed.clear();
1093 // Process the RESOURCES value.
1095 if (ResourcesData.size() > 0){
1097 for (int ResourcesDataSeek = 0; ResourcesDataSeek < ResourcesData.size();
1098 ResourcesDataSeek++){
1100 DataLine += "RESOURCES";
1102 if (ResourcesDataAltRep[ResourcesDataSeek].size() > 0){
1104 DataLine += ";ALTREP=\"";
1105 DataLine += ResourcesDataAltRep[ResourcesDataSeek];
1110 if (ResourcesDataLanguage[ResourcesDataSeek].size() > 0){
1112 DataLine += ";LANGUAGE=";
1113 DataLine += ResourcesDataLanguage[ResourcesDataSeek];
1117 if (ResourcesDataTokens[ResourcesDataSeek].size() > 0){
1120 DataLine += ResourcesDataTokens[ResourcesDataSeek];
1125 DataLine += ResourcesData[ResourcesDataSeek];
1128 DataLineProcessed = OutputText(&DataLine);
1130 *SaveData += DataLineProcessed;
1133 DataLineProcessed.clear();
1139 // Process the RDATE value.
1141 if (RecurranceDateData.size() > 0){
1143 for (int RecurranceDateDataSeek = 0; RecurranceDateDataSeek < RecurranceDateData.size();
1144 RecurranceDateDataSeek++){
1146 DataLine += "RDATE";
1148 if (RecurranceDateDataValue[RecurranceDateDataSeek].size() > 0){
1150 DataLine += ";VALUE=";
1151 DataLine += RecurranceDateDataValue[RecurranceDateDataSeek];
1155 if (RecurranceDateDataTimeZoneParam[RecurranceDateDataSeek].size() > 0){
1157 DataLine += ";TZID=";
1158 DataLine += RecurranceDateDataTimeZoneParam[RecurranceDateDataSeek];
1162 if (RecurranceDateDataTokens[RecurranceDateDataSeek].size() > 0){
1165 DataLine += RecurranceDateDataTokens[RecurranceDateDataSeek];
1170 DataLine += RecurranceDateData[RecurranceDateDataSeek];
1173 DataLineProcessed = OutputText(&DataLine);
1175 *SaveData += DataLineProcessed;
1178 DataLineProcessed.clear();
1184 // Process the VALARMS.
1186 if (CalendarAlarmData.size() > 0){
1188 for (int CalendarAlarmDataSeek = 0; CalendarAlarmDataSeek < CalendarAlarmData.size();
1189 CalendarAlarmDataSeek++){
1191 *SaveData += "BEGIN:VALARM\n";
1193 // Process the ACTION VALARM value.
1195 DataLine += "ACTION";
1197 if (CalendarAlarmData[CalendarAlarmDataSeek].AlarmActionTokens.size() > 0){
1200 DataLine += CalendarAlarmData[CalendarAlarmDataSeek].AlarmActionTokens;
1205 DataLine += CalendarAlarmData[CalendarAlarmDataSeek].AlarmAction;
1208 DataLineProcessed = OutputText(&DataLine);
1210 *SaveData += DataLineProcessed;
1213 DataLineProcessed.clear();
1215 // Process the TRIGGER VALARM value.
1217 if (CalendarAlarmData[CalendarAlarmDataSeek].TriggerData.size() > 0){
1219 DataLine += "TRIGGER";
1221 if (CalendarAlarmData[CalendarAlarmDataSeek].TriggerRelated.size() > 0){
1223 DataLine += ";RELATED=";
1224 DataLine += CalendarAlarmData[CalendarAlarmDataSeek].TriggerRelated;
1228 if (CalendarAlarmData[CalendarAlarmDataSeek].TriggerValue.size() > 0){
1230 DataLine += ";VALUE=";
1231 DataLine += CalendarAlarmData[CalendarAlarmDataSeek].TriggerValue;
1235 if (CalendarAlarmData[CalendarAlarmDataSeek].TriggerTokens.size() > 0){
1238 DataLine += CalendarAlarmData[CalendarAlarmDataSeek].TriggerTokens;
1243 DataLine += CalendarAlarmData[CalendarAlarmDataSeek].TriggerData;
1246 DataLineProcessed = OutputText(&DataLine);
1248 *SaveData += DataLineProcessed;
1251 DataLineProcessed.clear();
1255 // Process the DURATION VALARM value.
1257 if (CalendarAlarmData[CalendarAlarmDataSeek].DurationData.size() > 0){
1259 DataLine += "DURATION";
1261 if (CalendarAlarmData[CalendarAlarmDataSeek].DurationTokens.size() > 0){
1264 DataLine += CalendarAlarmData[CalendarAlarmDataSeek].DurationTokens;
1269 DataLine += CalendarAlarmData[CalendarAlarmDataSeek].DurationData;
1272 DataLineProcessed = OutputText(&DataLine);
1274 *SaveData += DataLineProcessed;
1277 DataLineProcessed.clear();
1281 // Process the DESCRIPTION VALARM value.
1283 if (CalendarAlarmData[CalendarAlarmDataSeek].DescriptionData.size() > 0){
1285 DataLine += "DESCRIPTION";
1287 if (CalendarAlarmData[CalendarAlarmDataSeek].DescriptionAltRep.size() > 0){
1289 DataLine += ";ALTREP=\"";
1290 DataLine += CalendarAlarmData[CalendarAlarmDataSeek].DescriptionAltRep;
1295 if (CalendarAlarmData[CalendarAlarmDataSeek].DescriptionLanguage.size() > 0){
1297 DataLine += ";LANGUAGE=";
1298 DataLine += CalendarAlarmData[CalendarAlarmDataSeek].DescriptionLanguage;
1302 if (CalendarAlarmData[CalendarAlarmDataSeek].DescriptionTokens.size() > 0){
1305 DataLine += CalendarAlarmData[CalendarAlarmDataSeek].DescriptionTokens;
1310 DataLine += CalendarAlarmData[CalendarAlarmDataSeek].DescriptionData;
1313 DataLineProcessed = OutputText(&DataLine);
1315 *SaveData += DataLineProcessed;
1318 DataLineProcessed.clear();
1322 // Process the SUMMARY VALARM value.
1324 if (CalendarAlarmData[CalendarAlarmDataSeek].SummaryData.size() > 0){
1326 DataLine += "SUMMARY";
1328 if (CalendarAlarmData[CalendarAlarmDataSeek].SummaryAltRep.size() > 0){
1330 DataLine += ";ALTREP=\"";
1331 DataLine += CalendarAlarmData[CalendarAlarmDataSeek].SummaryAltRep;
1336 if (CalendarAlarmData[CalendarAlarmDataSeek].SummaryLanguage.size() > 0){
1338 DataLine += ";LANGUAGE=";
1339 DataLine += CalendarAlarmData[CalendarAlarmDataSeek].SummaryLanguage;
1343 if (CalendarAlarmData[CalendarAlarmDataSeek].SummaryTokens.size() > 0){
1346 DataLine += CalendarAlarmData[CalendarAlarmDataSeek].SummaryTokens;
1351 DataLine += CalendarAlarmData[CalendarAlarmDataSeek].SummaryData;
1354 DataLineProcessed = OutputText(&DataLine);
1356 *SaveData += DataLineProcessed;
1359 DataLineProcessed.clear();
1363 // Process the REPEAT VALARM value.
1365 if (CalendarAlarmData[CalendarAlarmDataSeek].RepeatData.size() > 0){
1367 DataLine += "REPEAT";
1369 if (CalendarAlarmData[CalendarAlarmDataSeek].RepeatTokens.size() > 0){
1372 DataLine += CalendarAlarmData[CalendarAlarmDataSeek].RepeatTokens;
1377 DataLine += CalendarAlarmData[CalendarAlarmDataSeek].RepeatData;
1380 DataLineProcessed = OutputText(&DataLine);
1382 *SaveData += DataLineProcessed;
1385 DataLineProcessed.clear();
1389 // Process the ATTENDEE VALARM values.
1391 if (CalendarAlarmData[CalendarAlarmDataSeek].AttendeeList.size() > 0){
1393 for (int AttendeeListSeek = 0; AttendeeListSeek < CalendarAlarmData[CalendarAlarmDataSeek].AttendeeList.size();
1394 AttendeeListSeek++){
1396 DataLine += "ATTENDEE";
1398 if (CalendarAlarmData[CalendarAlarmDataSeek].AttendeeListMember[AttendeeListSeek].size() > 0){
1400 DataLine += ";MEMBER=\"";
1401 DataLine += CalendarAlarmData[CalendarAlarmDataSeek].AttendeeListMember[AttendeeListSeek];
1406 if (CalendarAlarmData[CalendarAlarmDataSeek].AttendeeListDelegatedFrom[AttendeeListSeek].size() > 0){
1408 DataLine += ";DELEGATED-FROM=\"";
1409 DataLine += CalendarAlarmData[CalendarAlarmDataSeek].AttendeeListDelegatedFrom[AttendeeListSeek];
1414 if (CalendarAlarmData[CalendarAlarmDataSeek].AttendeeListDelegatedTo[AttendeeListSeek].size() > 0){
1416 DataLine += ";DELEGATED-TO=\"";
1417 DataLine += CalendarAlarmData[CalendarAlarmDataSeek].AttendeeListDelegatedTo[AttendeeListSeek];
1422 if (CalendarAlarmData[CalendarAlarmDataSeek].AttendeeListRole[AttendeeListSeek].size() > 0){
1424 DataLine += ";ROLE=";
1425 DataLine += CalendarAlarmData[CalendarAlarmDataSeek].AttendeeListRole[AttendeeListSeek];
1429 if (CalendarAlarmData[CalendarAlarmDataSeek].AttendeeListRSVP[AttendeeListSeek].size() > 0){
1431 DataLine += ";RSVP=";
1432 DataLine += CalendarAlarmData[CalendarAlarmDataSeek].AttendeeListRSVP[AttendeeListSeek];
1436 if (CalendarAlarmData[CalendarAlarmDataSeek].AttendeeListDirectoryEntry[AttendeeListSeek].size() > 0){
1438 DataLine += ";DIR=\"";
1439 DataLine += CalendarAlarmData[CalendarAlarmDataSeek].AttendeeListDirectoryEntry[AttendeeListSeek];
1444 if (CalendarAlarmData[CalendarAlarmDataSeek].AttendeeListSentBy[AttendeeListSeek].size() > 0){
1446 DataLine += ";SENT-BY=\"";
1447 DataLine += CalendarAlarmData[CalendarAlarmDataSeek].AttendeeListSentBy[AttendeeListSeek];
1452 if (CalendarAlarmData[CalendarAlarmDataSeek].AttendeeListCommonName[AttendeeListSeek].size() > 0){
1454 DataLine += ";CN=\"";
1455 DataLine += CalendarAlarmData[CalendarAlarmDataSeek].AttendeeListCommonName[AttendeeListSeek];
1460 if (CalendarAlarmData[CalendarAlarmDataSeek].AttendeeListCalendarUserType[AttendeeListSeek].size() > 0){
1462 DataLine += ";CUTYPE=";
1463 DataLine += CalendarAlarmData[CalendarAlarmDataSeek].AttendeeListCalendarUserType[AttendeeListSeek];
1467 if (CalendarAlarmData[CalendarAlarmDataSeek].AttendeeListParticipationStatus[AttendeeListSeek].size() > 0){
1469 DataLine += ";PARTSTAT=";
1470 DataLine += CalendarAlarmData[CalendarAlarmDataSeek].AttendeeListParticipationStatus[AttendeeListSeek];
1474 if (CalendarAlarmData[CalendarAlarmDataSeek].AttendeeListLanguage[AttendeeListSeek].size() > 0){
1476 DataLine += ";LANGUAGE=";
1477 DataLine += CalendarAlarmData[CalendarAlarmDataSeek].AttendeeListLanguage[AttendeeListSeek];
1481 if (CalendarAlarmData[CalendarAlarmDataSeek].AttendeeListTokens[AttendeeListSeek].size() > 0){
1484 DataLine += CalendarAlarmData[CalendarAlarmDataSeek].AttendeeListTokens[AttendeeListSeek];
1489 DataLine += CalendarAlarmData[CalendarAlarmDataSeek].AttendeeList[AttendeeListSeek];
1492 DataLineProcessed = OutputText(&DataLine);
1494 *SaveData += DataLineProcessed;
1497 DataLineProcessed.clear();
1503 // Process the ATTACH VALARM values.
1505 if (CalendarAlarmData[CalendarAlarmDataSeek].AttachList.size() > 0){
1507 for (int AttachListSeek = 0; AttachListSeek < CalendarAlarmData[CalendarAlarmDataSeek].AttachList.size();
1510 DataLine += "ATTACH";
1512 if (CalendarAlarmData[CalendarAlarmDataSeek].AttachListFormatType[AttachListSeek].size() > 0){
1514 DataLine += ";FMTTYPE=";
1515 DataLine += CalendarAlarmData[CalendarAlarmDataSeek].AttachListFormatType[AttachListSeek];
1519 if (CalendarAlarmData[CalendarAlarmDataSeek].AttachListValue[AttachListSeek].size() > 0){
1521 DataLine += ";VALUE=";
1522 DataLine += CalendarAlarmData[CalendarAlarmDataSeek].AttachListValue[AttachListSeek];
1526 if (CalendarAlarmData[CalendarAlarmDataSeek].AttachListEncoding[AttachListSeek].size() > 0){
1528 DataLine += ";ENCODING=";
1529 DataLine += CalendarAlarmData[CalendarAlarmDataSeek].AttachListEncoding[AttachListSeek];
1533 if (CalendarAlarmData[CalendarAlarmDataSeek].AttachListTokens[AttachListSeek].size() > 0){
1536 DataLine += CalendarAlarmData[CalendarAlarmDataSeek].AttachListTokens[AttachListSeek];
1541 DataLine += CalendarAlarmData[CalendarAlarmDataSeek].AttachList[AttachListSeek];
1544 DataLineProcessed = OutputText(&DataLine);
1546 *SaveData += DataLineProcessed;
1549 DataLineProcessed.clear();
1555 // Process the X-Token VALARM values.
1557 if (CalendarAlarmData[CalendarAlarmDataSeek].XTokensData.size() > 0){
1559 for (int XTokenSeek = 0; XTokenSeek < CalendarAlarmData[CalendarAlarmDataSeek].XTokensData.size();
1562 DataLine += CalendarAlarmData[CalendarAlarmDataSeek].XTokensDataTokens[XTokenSeek];
1564 DataLine += CalendarAlarmData[CalendarAlarmDataSeek].XTokensData[XTokenSeek];
1567 DataLineProcessed = OutputText(&DataLine);
1569 *SaveData += DataLineProcessed;
1572 DataLineProcessed.clear();
1578 *SaveData += "END:VALARM\n";
1584 // Process the X-Token values.
1586 if (XTokensData.size() > 0){
1588 for (int XTokenSeek = 0; XTokenSeek < XTokensData.size();
1591 DataLine += XTokensDataTokens[XTokenSeek];
1593 DataLine += XTokensData[XTokenSeek];
1596 DataLineProcessed = OutputText(&DataLine);
1598 *SaveData += DataLineProcessed;
1601 DataLineProcessed.clear();
1607 *SaveData += "END:VEVENT\n";