1 #include "CalendarTask.h"
5 void CalendarTaskObject::SaveObjectData(string *SaveData){
8 string DataLineProcessed = "";
10 *SaveData += "BEGIN:VTODO\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 CLASS value.
70 if (ClassData.size() > 0){
72 if (ClassDataTokens.size() > 0){
75 DataLine += ClassDataTokens;
84 DataLine += ClassData;
87 DataLineProcessed = OutputText(&DataLine);
89 *SaveData += DataLineProcessed;
92 DataLineProcessed.clear();
96 // Process the COMPLETED value.
98 if (CompletedData.size() > 0){
100 if (CompletedDataTokens.size() > 0){
102 DataLine += "COMPLETED;";
103 DataLine += CompletedDataTokens;
107 DataLine += "COMPLETED";
112 DataLine += CompletedData;
115 DataLineProcessed = OutputText(&DataLine);
117 *SaveData += DataLineProcessed;
120 DataLineProcessed.clear();
124 // Process the CREATED value.
126 if (DateTimeCreatedData.size() > 0){
128 if (DateTimeCreatedTokens.size() > 0){
130 DataLine += "CREATED;";
131 DataLine += DateTimeCreatedTokens;
135 DataLine += "CREATED";
140 DataLine += DateTimeCreatedData;
143 DataLineProcessed = OutputText(&DataLine);
145 *SaveData += DataLineProcessed;
148 DataLineProcessed.clear();
152 // Process the DESCRIPTION values. Write out the
153 // first DESCRPITION only as per RFC5545 specifcation.
155 if (DescriptionList.size() > 0){
157 DataLine += "DESCRIPTION";
159 if (DescriptionListAltRep[0].size() > 0){
161 DataLine += ";ALTREP=\"";
162 DataLine += DescriptionListAltRep[0];
167 if (DescriptionListLanguage[0].size() > 0){
169 DataLine += ";LANGUAGE=";
170 DataLine += DescriptionListLanguage[0];
174 if (DescriptionListTokens[0].size() > 0){
177 DataLine += DescriptionListTokens[0];
182 DataLine += DescriptionList[0];
185 DataLineProcessed = OutputText(&DataLine);
187 *SaveData += DataLineProcessed;
190 DataLineProcessed.clear();
194 // Process the DTSTART.
196 if (DateTimeStartData.size() > 0){
198 DataLine += "DTSTART";
200 if (DateTimeStartDataValue.size() > 0){
202 DataLine += ";VALUE=";
203 DataLine += DateTimeStartDataValue;
207 if (DateTimeStartDataTimeZoneID.size() > 0){
209 DataLine += ";TZID=";
210 DataLine += DateTimeStartDataTimeZoneID;
214 if (DateTimeStartDataTokens.size() > 0){
217 DataLine += DateTimeStartDataTokens;
222 DataLine += DateTimeStartData;
225 DataLineProcessed = OutputText(&DataLine);
227 *SaveData += DataLineProcessed;
230 DataLineProcessed.clear();
234 // Process the GEO value.
236 if (GeographicData.size() > 0){
238 if (GeographicTokens.size() > 0){
241 DataLine += GeographicTokens;
250 DataLine += GeographicData;
253 DataLineProcessed = OutputText(&DataLine);
255 *SaveData += DataLineProcessed;
258 DataLineProcessed.clear();
262 // Process the LAST-MODIFIED value.
264 if (LastModifiedData.size() > 0){
266 if (LastModifiedTokens.size() > 0){
268 DataLine += "LAST-MODIFIED;";
269 DataLine += LastModifiedTokens;
273 DataLine += "LAST-MODIFIED";
278 DataLine += LastModifiedData;
281 DataLineProcessed = OutputText(&DataLine);
283 *SaveData += DataLineProcessed;
286 DataLineProcessed.clear();
290 // Process the LOCATION value.
292 if (LocationData.size() > 0){
294 DataLine += "LOCATION";
296 if (LocationDataAltRep.size() > 0){
298 DataLine += ";ALTREP=\"";
299 DataLine += LocationDataAltRep;
304 if (LocationDataLanguage.size() > 0){
306 DataLine += ";LANGUAGE=";
307 DataLine += LocationDataLanguage;
311 if (LocationDataTokens.size() > 0){
314 DataLine += LocationDataTokens;
319 DataLine += LocationData;
322 DataLineProcessed = OutputText(&DataLine);
324 *SaveData += DataLineProcessed;
327 DataLineProcessed.clear();
331 // Process the ORGANIZER value.
333 if (OrganiserData.size() > 0){
335 DataLine += "ORGANIZER";
337 if (OrganiserDataCommonName.size() > 0){
340 DataLine += OrganiserDataCommonName;
344 if (OrganiserDataDirectoryEntry.size() > 0){
346 DataLine += ";DIR=\"";
347 DataLine += OrganiserDataDirectoryEntry;
352 if (OrganiserDataSentByParam.size() > 0){
354 DataLine += ";SENT-BY=\"";
355 DataLine += OrganiserDataSentByParam;
360 if (OrganiserDataLanguage.size() > 0){
362 DataLine += ";LANGUAGE=";
363 DataLine += OrganiserDataLanguage;
367 if (OrganiserDataTokens.size() > 0){
370 DataLine += OrganiserDataTokens;
375 DataLine += OrganiserData;
378 DataLineProcessed = OutputText(&DataLine);
380 *SaveData += DataLineProcessed;
383 DataLineProcessed.clear();
387 // Process the PERCENT-COMPLETE value.
389 if (PercentCompleteData.size() > 0){
391 if (PercentCompleteTokens.size() > 0){
393 DataLine += "PERCENT-COMPLETE;";
394 DataLine += PercentCompleteTokens;
398 DataLine += "PERCENT-COMPLETE";
403 DataLine += PercentCompleteData;
406 DataLineProcessed = OutputText(&DataLine);
408 *SaveData += DataLineProcessed;
411 DataLineProcessed.clear();
415 // Process the DURATION value.
417 if (DurationData.size() > 0){
419 DataLine += "DURATION";
421 if (DurationDataTokens.size() > 0){
424 DataLine += DurationDataTokens;
429 DataLine += DurationData;
432 DataLineProcessed = OutputText(&DataLine);
434 *SaveData += DataLineProcessed;
437 DataLineProcessed.clear();
441 // Process the PRIORITY value.
443 if (PriorityData > -1 && PriorityData < 10){
445 DataLine += "PRIORITY";
447 if (PriorityTokens.size() > 0){
450 DataLine += PriorityTokens;
455 DataLine += to_string(PriorityData);
458 DataLineProcessed = OutputText(&DataLine);
460 *SaveData += DataLineProcessed;
463 DataLineProcessed.clear();
467 // Process the RECURRENCE-ID value.
469 if (RecurranceIDData.size() > 0){
471 DataLine += "RECURRENCE-ID";
473 if (RecurranceIDDataTimeZoneParam.size() > 0){
475 DataLine += ";TZID=";
476 DataLine += RecurranceIDDataTimeZoneParam;
480 if (RecurranceIDDataRangeParam.size() > 0){
482 DataLine += ";RANGE=";
483 DataLine += RecurranceIDDataRangeParam;
487 if (RecurranceIDDataValue.size() > 0){
489 DataLine += ";VALUE=";
490 DataLine += RecurranceIDDataValue;
494 if (RecurranceIDDataTokens.size() > 0){
497 DataLine += RecurranceIDDataTokens;
502 DataLine += RecurranceIDData;
505 DataLineProcessed = OutputText(&DataLine);
507 *SaveData += DataLineProcessed;
510 DataLineProcessed.clear();
514 // Process the SEQUENCE value.
516 if (SequenceData > -1 && SequenceData < 10){
518 DataLine += "SEQUENCE";
520 if (SequenceTokens.size() > 0){
523 DataLine += SequenceTokens;
528 DataLine += to_string(SequenceData);
531 DataLineProcessed = OutputText(&DataLine);
533 *SaveData += DataLineProcessed;
536 DataLineProcessed.clear();
540 // Process the STATUS value.
542 if (StatusData.size() > 0){
544 DataLine += "STATUS";
546 if (StatusLanguage.size() > 0){
548 DataLine += ";LANGUAGE=";
549 DataLine += StatusLanguage;
553 if (StatusTokens.size() > 0){
556 DataLine += StatusTokens;
561 DataLine += StatusData;
564 DataLineProcessed = OutputText(&DataLine);
566 *SaveData += DataLineProcessed;
569 DataLineProcessed.clear();
573 // Process the SUMMARY.
575 if (SummaryData.size() > 0){
577 DataLine += "SUMMARY";
579 if (SummaryDataAltRep.size() > 0){
581 DataLine += ";ALTREP=\"";
582 DataLine += SummaryDataAltRep;
587 if (SummaryDataLanguage.size() > 0){
589 DataLine += ";LANGUAGE=";
590 DataLine += SummaryDataLanguage;
594 if (SummaryDataTokens.size() > 0){
597 DataLine += SummaryDataTokens;
602 DataLine += SummaryData;
605 DataLineProcessed = OutputText(&DataLine);
607 *SaveData += DataLineProcessed;
610 DataLineProcessed.clear();
614 // Process the URL value.
616 if (URLData.size() > 0){
620 if (URLDataTokens.size() > 0){
623 DataLine += URLDataTokens;
631 DataLineProcessed = OutputText(&DataLine);
633 *SaveData += DataLineProcessed;
636 DataLineProcessed.clear();
640 // Process the RRULE value.
642 if (RecurranceRuleData.size() > 0){
646 if (RecurranceRuleDataTokens.size() > 0){
649 DataLine += RecurranceRuleDataTokens;
654 DataLine += RecurranceRuleData;
657 DataLineProcessed = OutputText(&DataLine);
659 *SaveData += DataLineProcessed;
662 DataLineProcessed.clear();
666 // Process the DUE value.
668 if (DueData.size() > 0){
672 if (DueDataTimeZoneID.size() > 0){
674 DataLine += ";TZID=";
675 DataLine += DueDataTimeZoneID;
679 if (DueDataValue.size() > 0){
681 DataLine += ";VALUE=";
682 DataLine += DueDataValue;
686 if (SummaryDataTokens.size() > 0){
689 DataLine += DueDataTokens;
697 DataLineProcessed = OutputText(&DataLine);
699 *SaveData += DataLineProcessed;
702 DataLineProcessed.clear();
706 // Process the ATTACH values.
708 if (AttachList.size() > 0){
710 for (int AttachListSeek = 0; AttachListSeek < AttachList.size();
713 DataLine += "ATTACH";
715 if (AttachListFormatType[AttachListSeek].size() > 0){
717 DataLine += ";FMTTYPE=";
718 DataLine += AttachListFormatType[AttachListSeek];
722 if (AttachListValue[AttachListSeek].size() > 0){
724 DataLine += ";VALUE=";
725 DataLine += AttachListValue[AttachListSeek];
729 if (AttachListEncoding[AttachListSeek].size() > 0){
731 DataLine += ";ENCODING=";
732 DataLine += AttachListEncoding[AttachListSeek];
736 if (AttachListTokens[AttachListSeek].size() > 0){
739 DataLine += AttachListTokens[AttachListSeek];
744 DataLine += AttachList[AttachListSeek];
747 DataLineProcessed = OutputText(&DataLine);
749 *SaveData += DataLineProcessed;
752 DataLineProcessed.clear();
758 // Process the ATTENDEE value.
760 if (AttendeeList.size() > 0){
762 for (int AttendeeListSeek = 0; AttendeeListSeek < AttendeeList.size();
765 DataLine += "ATTENDEE";
767 if (AttendeeListMember[AttendeeListSeek].size() > 0){
769 DataLine += ";MEMBER=\"";
770 DataLine += AttendeeListMember[AttendeeListSeek];
775 if (AttendeeListDelegatedFrom[AttendeeListSeek].size() > 0){
777 DataLine += ";DELEGATED-FROM=\"";
778 DataLine += AttendeeListDelegatedFrom[AttendeeListSeek];
783 if (AttendeeListDelegatedTo[AttendeeListSeek].size() > 0){
785 DataLine += ";DELEGATED-TO=\"";
786 DataLine += AttendeeListDelegatedTo[AttendeeListSeek];
791 if (AttendeeListRole[AttendeeListSeek].size() > 0){
793 DataLine += ";ROLE=";
794 DataLine += AttendeeListRole[AttendeeListSeek];
798 if (AttendeeListRSVP[AttendeeListSeek].size() > 0){
800 DataLine += ";RSVP=";
801 DataLine += AttendeeListRSVP[AttendeeListSeek];
805 if (AttendeeListDirectoryEntry[AttendeeListSeek].size() > 0){
807 DataLine += ";DIR=\"";
808 DataLine += AttendeeListDirectoryEntry[AttendeeListSeek];
813 if (AttendeeListSentBy[AttendeeListSeek].size() > 0){
815 DataLine += ";SENT-BY=\"";
816 DataLine += AttendeeListSentBy[AttendeeListSeek];
821 if (AttendeeListCommonName[AttendeeListSeek].size() > 0){
823 DataLine += ";CN=\"";
824 DataLine += AttendeeListCommonName[AttendeeListSeek];
829 if (AttendeeListCalendarUserType[AttendeeListSeek].size() > 0){
831 DataLine += ";CUTYPE=";
832 DataLine += AttendeeListCalendarUserType[AttendeeListSeek];
836 if (AttendeeListParticipationStatus[AttendeeListSeek].size() > 0){
838 DataLine += ";PARTSTAT=";
839 DataLine += AttendeeListParticipationStatus[AttendeeListSeek];
843 if (AttendeeListLanguage[AttendeeListSeek].size() > 0){
845 DataLine += ";LANGUAGE=";
846 DataLine += AttendeeListLanguage[AttendeeListSeek];
850 if (AttendeeListTokens[AttendeeListSeek].size() > 0){
853 DataLine += AttendeeListTokens[AttendeeListSeek];
858 DataLine += AttendeeList[AttendeeListSeek];
861 DataLineProcessed = OutputText(&DataLine);
863 *SaveData += DataLineProcessed;
866 DataLineProcessed.clear();
872 // Process the CATEGORIES value.
874 if (CategoriesList.size() > 0){
876 for (int CategoriesListSeek = 0; CategoriesListSeek < CategoriesList.size();
877 CategoriesListSeek++){
879 DataLine += "CATEGORIES";
881 if (CategoriesListLanguage[CategoriesListSeek].size() > 0){
883 DataLine += ";LANGUAGE=";
884 DataLine += CategoriesListLanguage[CategoriesListSeek];
888 if (CategoriesListTokens[CategoriesListSeek].size() > 0){
891 DataLine += CategoriesListTokens[CategoriesListSeek];
896 DataLine += CategoriesList[CategoriesListSeek];
899 DataLineProcessed = OutputText(&DataLine);
901 *SaveData += DataLineProcessed;
904 DataLineProcessed.clear();
910 // Process the COMMENT value.
912 if (CommentList.size() > 0){
914 for (int CommentListSeek = 0; CommentListSeek < CommentList.size();
917 DataLine += "COMMENT";
919 if (CommentListAltRep[CommentListSeek].size() > 0){
921 DataLine += ";ALTREP=\"";
922 DataLine += CommentListAltRep[CommentListSeek];
927 if (CommentListLanguage[CommentListSeek].size() > 0){
929 DataLine += ";LANGUAGE=";
930 DataLine += CommentListLanguage[CommentListSeek];
934 if (CommentListTokens[CommentListSeek].size() > 0){
937 DataLine += CommentListTokens[CommentListSeek];
942 DataLine += CommentList[CommentListSeek];
945 DataLineProcessed = OutputText(&DataLine);
947 *SaveData += DataLineProcessed;
950 DataLineProcessed.clear();
956 // Process the CONTACT value.
958 if (ContactList.size() > 0){
960 for (int ContactListSeek = 0; ContactListSeek < ContactList.size();
963 DataLine += "CONTACT";
965 if (ContactListAltRep[ContactListSeek].size() > 0){
967 DataLine += ";ALTREP=\"";
968 DataLine += ContactListAltRep[ContactListSeek];
973 if (ContactListLanguage[ContactListSeek].size() > 0){
975 DataLine += ";LANGUAGE=";
976 DataLine += ContactListLanguage[ContactListSeek];
980 if (ContactListTokens[ContactListSeek].size() > 0){
983 DataLine += ContactListTokens[ContactListSeek];
988 DataLine += ContactList[ContactListSeek];
991 DataLineProcessed = OutputText(&DataLine);
993 *SaveData += DataLineProcessed;
996 DataLineProcessed.clear();
1002 // Process the EXDATE value.
1004 if (ExcludeDateData.size() > 0){
1006 for (int ExcludeDateDataSeek = 0; ExcludeDateDataSeek < ExcludeDateData.size();
1007 ExcludeDateDataSeek++){
1009 DataLine += "EXDATE";
1011 if (ExcludeDateDataTimeZoneParam[ExcludeDateDataSeek].size() > 0){
1013 DataLine += ";TZID=";
1014 DataLine += ExcludeDateDataTimeZoneParam[ExcludeDateDataSeek];
1018 if (ExcludeDateDataValue[ExcludeDateDataSeek].size() > 0){
1020 DataLine += ";VALUE=";
1021 DataLine += ExcludeDateDataValue[ExcludeDateDataSeek];
1025 if (ExcludeDateDataTokens[ExcludeDateDataSeek].size() > 0){
1028 DataLine += ExcludeDateDataTokens[ExcludeDateDataSeek];
1033 DataLine += ExcludeDateData[ExcludeDateDataSeek];
1036 DataLineProcessed = OutputText(&DataLine);
1038 *SaveData += DataLineProcessed;
1041 DataLineProcessed.clear();
1047 // Process the REQUEST-STATUS value.
1049 if (RequestStatusData.size() > 0){
1051 for (int RequestStatusDataSeek = 0; RequestStatusDataSeek < RequestStatusData.size();
1052 RequestStatusDataSeek++){
1054 DataLine += "REQUEST-STATUS";
1056 if (RequestStatusLanguage[RequestStatusDataSeek].size() > 0){
1058 DataLine += ";LANGUAGE=";
1059 DataLine += RequestStatusLanguage[RequestStatusDataSeek];
1063 if (RequestStatusTokens[RequestStatusDataSeek].size() > 0){
1066 DataLine += RequestStatusTokens[RequestStatusDataSeek];
1071 DataLine += RequestStatusData[RequestStatusDataSeek];
1074 DataLineProcessed = OutputText(&DataLine);
1076 *SaveData += DataLineProcessed;
1079 DataLineProcessed.clear();
1085 // Process the RELATED-TO value.
1087 if (RelatedToData.size() > 0){
1089 for (int RequestToDataSeek = 0; RequestToDataSeek < RelatedToData.size();
1090 RequestToDataSeek++){
1092 DataLine += "RELATED-TO";
1094 if (RelatedToDataRelationType[RequestToDataSeek].size() > 0){
1096 DataLine += ";RELTYPE=";
1097 DataLine += RelatedToDataRelationType[RequestToDataSeek];
1101 if (RelatedToDataTokens[RequestToDataSeek].size() > 0){
1104 DataLine += RelatedToDataTokens[RequestToDataSeek];
1109 DataLine += RelatedToData[RequestToDataSeek];
1112 DataLineProcessed = OutputText(&DataLine);
1114 *SaveData += DataLineProcessed;
1117 DataLineProcessed.clear();
1123 // Process the RESOURCES value.
1125 if (ResourcesData.size() > 0){
1127 for (int ResourcesDataSeek = 0; ResourcesDataSeek < ResourcesData.size();
1128 ResourcesDataSeek++){
1130 DataLine += "RESOURCES";
1132 if (ResourcesDataAltRep[ResourcesDataSeek].size() > 0){
1134 DataLine += ";ALTREP=\"";
1135 DataLine += ResourcesDataAltRep[ResourcesDataSeek];
1140 if (ResourcesDataLanguage[ResourcesDataSeek].size() > 0){
1142 DataLine += ";LANGUAGE=";
1143 DataLine += ResourcesDataLanguage[ResourcesDataSeek];
1147 if (ResourcesDataTokens[ResourcesDataSeek].size() > 0){
1150 DataLine += ResourcesDataTokens[ResourcesDataSeek];
1155 DataLine += ResourcesData[ResourcesDataSeek];
1158 DataLineProcessed = OutputText(&DataLine);
1160 *SaveData += DataLineProcessed;
1163 DataLineProcessed.clear();
1169 // Process the RDATE value.
1171 if (RecurranceDateData.size() > 0){
1173 for (int RecurranceDateDataSeek = 0; RecurranceDateDataSeek < RecurranceDateData.size();
1174 RecurranceDateDataSeek++){
1176 DataLine += "RDATE";
1178 if (RecurranceDateDataValue[RecurranceDateDataSeek].size() > 0){
1180 DataLine += ";VALUE=";
1181 DataLine += RecurranceDateDataValue[RecurranceDateDataSeek];
1185 if (RecurranceDateDataTimeZoneParam[RecurranceDateDataSeek].size() > 0){
1187 DataLine += ";TZID=";
1188 DataLine += RecurranceDateDataTimeZoneParam[RecurranceDateDataSeek];
1192 if (RecurranceDateDataTokens[RecurranceDateDataSeek].size() > 0){
1195 DataLine += RecurranceDateDataTokens[RecurranceDateDataSeek];
1200 DataLine += RecurranceDateData[RecurranceDateDataSeek];
1203 DataLineProcessed = OutputText(&DataLine);
1205 *SaveData += DataLineProcessed;
1208 DataLineProcessed.clear();
1214 // Process the VALARMS.
1216 if (CalendarAlarmData.size() > 0){
1218 for (int CalendarAlarmDataSeek = 0; CalendarAlarmDataSeek < CalendarAlarmData.size();
1219 CalendarAlarmDataSeek++){
1221 *SaveData += "BEGIN:VALARM\n";
1223 // Process the ACTION VALARM value.
1225 DataLine += "ACTION";
1227 if (CalendarAlarmData[CalendarAlarmDataSeek].AlarmActionTokens.size() > 0){
1230 DataLine += CalendarAlarmData[CalendarAlarmDataSeek].AlarmActionTokens;
1235 DataLine += CalendarAlarmData[CalendarAlarmDataSeek].AlarmAction;
1238 DataLineProcessed = OutputText(&DataLine);
1240 *SaveData += DataLineProcessed;
1243 DataLineProcessed.clear();
1245 // Process the TRIGGER VALARM value.
1247 if (CalendarAlarmData[CalendarAlarmDataSeek].TriggerData.size() > 0){
1249 DataLine += "TRIGGER";
1251 if (CalendarAlarmData[CalendarAlarmDataSeek].TriggerRelated.size() > 0){
1253 DataLine += ";RELATED=";
1254 DataLine += CalendarAlarmData[CalendarAlarmDataSeek].TriggerRelated;
1258 if (CalendarAlarmData[CalendarAlarmDataSeek].TriggerValue.size() > 0){
1260 DataLine += ";VALUE=";
1261 DataLine += CalendarAlarmData[CalendarAlarmDataSeek].TriggerValue;
1265 if (CalendarAlarmData[CalendarAlarmDataSeek].TriggerTokens.size() > 0){
1268 DataLine += CalendarAlarmData[CalendarAlarmDataSeek].TriggerTokens;
1273 DataLine += CalendarAlarmData[CalendarAlarmDataSeek].TriggerData;
1276 DataLineProcessed = OutputText(&DataLine);
1278 *SaveData += DataLineProcessed;
1281 DataLineProcessed.clear();
1285 // Process the DURATION VALARM value.
1287 if (CalendarAlarmData[CalendarAlarmDataSeek].DurationData.size() > 0){
1289 DataLine += "DURATION";
1291 if (CalendarAlarmData[CalendarAlarmDataSeek].DurationTokens.size() > 0){
1294 DataLine += CalendarAlarmData[CalendarAlarmDataSeek].DurationTokens;
1299 DataLine += CalendarAlarmData[CalendarAlarmDataSeek].DurationData;
1302 DataLineProcessed = OutputText(&DataLine);
1304 *SaveData += DataLineProcessed;
1307 DataLineProcessed.clear();
1311 // Process the DESCRIPTION VALARM value.
1313 if (CalendarAlarmData[CalendarAlarmDataSeek].DescriptionData.size() > 0){
1315 DataLine += "DESCRIPTION";
1317 if (CalendarAlarmData[CalendarAlarmDataSeek].DescriptionAltRep.size() > 0){
1319 DataLine += ";ALTREP=\"";
1320 DataLine += CalendarAlarmData[CalendarAlarmDataSeek].DescriptionAltRep;
1325 if (CalendarAlarmData[CalendarAlarmDataSeek].DescriptionLanguage.size() > 0){
1327 DataLine += ";LANGUAGE=";
1328 DataLine += CalendarAlarmData[CalendarAlarmDataSeek].DescriptionLanguage;
1332 if (CalendarAlarmData[CalendarAlarmDataSeek].DescriptionTokens.size() > 0){
1335 DataLine += CalendarAlarmData[CalendarAlarmDataSeek].DescriptionTokens;
1340 DataLine += CalendarAlarmData[CalendarAlarmDataSeek].DescriptionData;
1343 DataLineProcessed = OutputText(&DataLine);
1345 *SaveData += DataLineProcessed;
1348 DataLineProcessed.clear();
1352 // Process the SUMMARY VALARM value.
1354 if (CalendarAlarmData[CalendarAlarmDataSeek].SummaryData.size() > 0){
1356 DataLine += "SUMMARY";
1358 if (CalendarAlarmData[CalendarAlarmDataSeek].SummaryAltRep.size() > 0){
1360 DataLine += ";ALTREP=\"";
1361 DataLine += CalendarAlarmData[CalendarAlarmDataSeek].SummaryAltRep;
1366 if (CalendarAlarmData[CalendarAlarmDataSeek].SummaryLanguage.size() > 0){
1368 DataLine += ";LANGUAGE=";
1369 DataLine += CalendarAlarmData[CalendarAlarmDataSeek].SummaryLanguage;
1373 if (CalendarAlarmData[CalendarAlarmDataSeek].SummaryTokens.size() > 0){
1376 DataLine += CalendarAlarmData[CalendarAlarmDataSeek].SummaryTokens;
1381 DataLine += CalendarAlarmData[CalendarAlarmDataSeek].SummaryData;
1384 DataLineProcessed = OutputText(&DataLine);
1386 *SaveData += DataLineProcessed;
1389 DataLineProcessed.clear();
1393 // Process the REPEAT VALARM value.
1395 if (CalendarAlarmData[CalendarAlarmDataSeek].RepeatData.size() > 0){
1397 DataLine += "REPEAT";
1399 if (CalendarAlarmData[CalendarAlarmDataSeek].RepeatTokens.size() > 0){
1402 DataLine += CalendarAlarmData[CalendarAlarmDataSeek].RepeatTokens;
1407 DataLine += CalendarAlarmData[CalendarAlarmDataSeek].RepeatData;
1410 DataLineProcessed = OutputText(&DataLine);
1412 *SaveData += DataLineProcessed;
1415 DataLineProcessed.clear();
1419 // Process the ATTENDEE VALARM values.
1421 if (CalendarAlarmData[CalendarAlarmDataSeek].AttendeeList.size() > 0){
1423 for (int AttendeeListSeek = 0; AttendeeListSeek < CalendarAlarmData[CalendarAlarmDataSeek].AttendeeList.size();
1424 AttendeeListSeek++){
1426 DataLine += "ATTENDEE";
1428 if (CalendarAlarmData[CalendarAlarmDataSeek].AttendeeListMember[AttendeeListSeek].size() > 0){
1430 DataLine += ";MEMBER=\"";
1431 DataLine += CalendarAlarmData[CalendarAlarmDataSeek].AttendeeListMember[AttendeeListSeek];
1436 if (CalendarAlarmData[CalendarAlarmDataSeek].AttendeeListDelegatedFrom[AttendeeListSeek].size() > 0){
1438 DataLine += ";DELEGATED-FROM=\"";
1439 DataLine += CalendarAlarmData[CalendarAlarmDataSeek].AttendeeListDelegatedFrom[AttendeeListSeek];
1444 if (CalendarAlarmData[CalendarAlarmDataSeek].AttendeeListDelegatedTo[AttendeeListSeek].size() > 0){
1446 DataLine += ";DELEGATED-TO=\"";
1447 DataLine += CalendarAlarmData[CalendarAlarmDataSeek].AttendeeListDelegatedTo[AttendeeListSeek];
1452 if (CalendarAlarmData[CalendarAlarmDataSeek].AttendeeListRole[AttendeeListSeek].size() > 0){
1454 DataLine += ";ROLE=";
1455 DataLine += CalendarAlarmData[CalendarAlarmDataSeek].AttendeeListRole[AttendeeListSeek];
1459 if (CalendarAlarmData[CalendarAlarmDataSeek].AttendeeListRSVP[AttendeeListSeek].size() > 0){
1461 DataLine += ";RSVP=";
1462 DataLine += CalendarAlarmData[CalendarAlarmDataSeek].AttendeeListRSVP[AttendeeListSeek];
1466 if (CalendarAlarmData[CalendarAlarmDataSeek].AttendeeListDirectoryEntry[AttendeeListSeek].size() > 0){
1468 DataLine += ";DIR=\"";
1469 DataLine += CalendarAlarmData[CalendarAlarmDataSeek].AttendeeListDirectoryEntry[AttendeeListSeek];
1474 if (CalendarAlarmData[CalendarAlarmDataSeek].AttendeeListSentBy[AttendeeListSeek].size() > 0){
1476 DataLine += ";SENT-BY=\"";
1477 DataLine += CalendarAlarmData[CalendarAlarmDataSeek].AttendeeListSentBy[AttendeeListSeek];
1482 if (CalendarAlarmData[CalendarAlarmDataSeek].AttendeeListCommonName[AttendeeListSeek].size() > 0){
1484 DataLine += ";CN=\"";
1485 DataLine += CalendarAlarmData[CalendarAlarmDataSeek].AttendeeListCommonName[AttendeeListSeek];
1490 if (CalendarAlarmData[CalendarAlarmDataSeek].AttendeeListCalendarUserType[AttendeeListSeek].size() > 0){
1492 DataLine += ";CUTYPE=";
1493 DataLine += CalendarAlarmData[CalendarAlarmDataSeek].AttendeeListCalendarUserType[AttendeeListSeek];
1497 if (CalendarAlarmData[CalendarAlarmDataSeek].AttendeeListParticipationStatus[AttendeeListSeek].size() > 0){
1499 DataLine += ";PARTSTAT=";
1500 DataLine += CalendarAlarmData[CalendarAlarmDataSeek].AttendeeListParticipationStatus[AttendeeListSeek];
1504 if (CalendarAlarmData[CalendarAlarmDataSeek].AttendeeListLanguage[AttendeeListSeek].size() > 0){
1506 DataLine += ";LANGUAGE=";
1507 DataLine += CalendarAlarmData[CalendarAlarmDataSeek].AttendeeListLanguage[AttendeeListSeek];
1511 if (CalendarAlarmData[CalendarAlarmDataSeek].AttendeeListTokens[AttendeeListSeek].size() > 0){
1514 DataLine += CalendarAlarmData[CalendarAlarmDataSeek].AttendeeListTokens[AttendeeListSeek];
1519 DataLine += CalendarAlarmData[CalendarAlarmDataSeek].AttendeeList[AttendeeListSeek];
1522 DataLineProcessed = OutputText(&DataLine);
1524 *SaveData += DataLineProcessed;
1527 DataLineProcessed.clear();
1533 // Process the ATTACH VALARM values.
1535 if (CalendarAlarmData[CalendarAlarmDataSeek].AttachList.size() > 0){
1537 for (int AttachListSeek = 0; AttachListSeek < CalendarAlarmData[CalendarAlarmDataSeek].AttachList.size();
1540 DataLine += "ATTACH";
1542 if (CalendarAlarmData[CalendarAlarmDataSeek].AttachListFormatType[AttachListSeek].size() > 0){
1544 DataLine += ";FMTTYPE=";
1545 DataLine += CalendarAlarmData[CalendarAlarmDataSeek].AttachListFormatType[AttachListSeek];
1549 if (CalendarAlarmData[CalendarAlarmDataSeek].AttachListValue[AttachListSeek].size() > 0){
1551 DataLine += ";VALUE=";
1552 DataLine += CalendarAlarmData[CalendarAlarmDataSeek].AttachListValue[AttachListSeek];
1556 if (CalendarAlarmData[CalendarAlarmDataSeek].AttachListEncoding[AttachListSeek].size() > 0){
1558 DataLine += ";ENCODING=";
1559 DataLine += CalendarAlarmData[CalendarAlarmDataSeek].AttachListEncoding[AttachListSeek];
1563 if (CalendarAlarmData[CalendarAlarmDataSeek].AttachListTokens[AttachListSeek].size() > 0){
1566 DataLine += CalendarAlarmData[CalendarAlarmDataSeek].AttachListTokens[AttachListSeek];
1571 DataLine += CalendarAlarmData[CalendarAlarmDataSeek].AttachList[AttachListSeek];
1574 DataLineProcessed = OutputText(&DataLine);
1576 *SaveData += DataLineProcessed;
1579 DataLineProcessed.clear();
1585 // Process the X-Token VALARM values.
1587 if (CalendarAlarmData[CalendarAlarmDataSeek].XTokensData.size() > 0){
1589 for (int XTokenSeek = 0; XTokenSeek < CalendarAlarmData[CalendarAlarmDataSeek].XTokensData.size();
1592 DataLine += CalendarAlarmData[CalendarAlarmDataSeek].XTokensDataTokens[XTokenSeek];
1594 DataLine += CalendarAlarmData[CalendarAlarmDataSeek].XTokensData[XTokenSeek];
1597 DataLineProcessed = OutputText(&DataLine);
1599 *SaveData += DataLineProcessed;
1602 DataLineProcessed.clear();
1608 *SaveData += "END:VALARM\n";
1614 // Process the X-Token values.
1616 if (XTokensData.size() > 0){
1618 for (int XTokenSeek = 0; XTokenSeek < XTokensData.size();
1621 DataLine += XTokensDataTokens[XTokenSeek];
1623 DataLine += XTokensData[XTokenSeek];
1626 DataLineProcessed = OutputText(&DataLine);
1628 *SaveData += DataLineProcessed;
1631 DataLineProcessed.clear();
1637 *SaveData += "END:VTODO\n";