1 #include "CalendarTask.h"
5 CalendarObjectValidResult CalendarTaskObject::ValidObject(){
7 bool ValidBegin = false;
9 bool ValidDateTimeStamp = false;
10 bool ValidUniqueID = false;
14 // Look for BEGIN:VTODO.
16 for (vector<string>::iterator iter = ObjectName.begin();
17 iter != ObjectName.end(); iter++){
19 if (ObjectName[SeekCount] == "BEGIN" &&
20 ObjectData[SeekCount] == "VTODO"){
22 if (ValidBegin == false){
25 return CALENDAROBJECTVALID_INVALIDFORMAT;
30 if (ObjectName[SeekCount] == "END" &&
31 ObjectData[SeekCount] == "VTODO" &&
34 return CALENDAROBJECTVALID_INVALIDFORMAT;
46 for (vector<string>::iterator iter = ObjectName.begin();
47 iter != ObjectName.end(); iter++){
50 PropertyName = ObjectName[SeekCount].substr(0,7);
53 catch(const out_of_range& oor){
57 if (PropertyName == "DTSTAMP"){
59 if (ValidDateTimeStamp == false){
60 ValidDateTimeStamp = true;
62 return CALENDAROBJECTVALID_INVALIDFORMAT;
75 for (vector<string>::iterator iter = ObjectName.begin();
76 iter != ObjectName.end(); iter++){
79 PropertyName = ObjectName[SeekCount].substr(0,3);
82 catch(const out_of_range& oor){
86 if (PropertyName == "UID"){
88 if (ValidUniqueID == false){
91 return CALENDAROBJECTVALID_INVALIDFORMAT;
102 // Look for END:VTODO.
104 for (vector<string>::iterator iter = ObjectName.begin();
105 iter != ObjectName.end(); iter++){
107 if (ObjectName[SeekCount] == "END" &&
108 ObjectData[SeekCount] == "VTODO"){
110 if (ValidEnd == false){
113 return CALENDAROBJECTVALID_INVALIDFORMAT;
122 // Check if the VTODO is valid.
124 if (ValidBegin == true &&
126 ValidDateTimeStamp == true &&
127 ValidUniqueID == true){
129 return CALENDAROBJECTVALID_OK;
133 return CALENDAROBJECTVALID_INVALIDFORMAT;
139 void CalendarTaskObject::ProcessData(){
143 multimap<string,string> DataReceived;
144 map<string,string> PropertyData;
145 string *PropertyNameData = nullptr;
146 int ObjectSeekCount = 0;
148 // Get the Date Time Stamp (DTSTAMP).
150 DataReceived = ProcessTextVectors(&ObjectName, &ObjectData, false, "DTSTAMP");
152 // Process the data from DTSTAMP.
154 if (DataReceived.begin() != DataReceived.end()){
157 DateTimeStampTokens = DataReceived.begin()->first.substr(8);
160 catch(const out_of_range &oor){
161 // Do nothing as there is no data.
164 DateTimeStampData = DataReceived.begin()->second;
168 // Get the Unique ID (UID).
170 DataReceived = ProcessTextVectors(&ObjectName, &ObjectData, false, "UID");
172 // Process the data from UID.
174 if (DataReceived.begin() != DataReceived.end()){
177 UniqueIDTokens = DataReceived.begin()->first.substr(4);
180 catch(const out_of_range &oor){
181 // Do nothing as there is no data.
184 UniqueID = DataReceived.begin()->second;
188 // Process the data from CLASS.
190 DataReceived = ProcessTextVectors(&ObjectName, &ObjectData, false, "CLASS");
192 if (DataReceived.begin() != DataReceived.end()){
195 ClassDataTokens = DataReceived.begin()->first.substr(6);
198 catch(const out_of_range &oor){
199 // Do nothing as there is no data.
202 ClassData = DataReceived.begin()->second;
206 // Process the data from COMPLETED.
208 DataReceived = ProcessTextVectors(&ObjectName, &ObjectData, false, "COMPLETED");
210 if (DataReceived.begin() != DataReceived.end()){
213 CompletedDataTokens = DataReceived.begin()->first.substr(10);
216 catch(const out_of_range &oor){
217 // Do nothing as there is no data.
220 CompletedData = DataReceived.begin()->second;
224 // Process the data from CREATED.
226 DataReceived = ProcessTextVectors(&ObjectName, &ObjectData, false, "CREATED");
228 if (DataReceived.begin() != DataReceived.end()){
231 DateTimeCreatedTokens = DataReceived.begin()->first.substr(8);
234 catch(const out_of_range &oor){
235 // Do nothing as there is no data.
238 DateTimeCreatedData = DataReceived.begin()->second;
242 // Process the data from DESCRIPTION.
244 DataReceived = ProcessTextVectors(&ObjectName, &ObjectData, false, "DESCRIPTION");
246 if (DataReceived.begin() != DataReceived.end()){
248 bool TokenData = false;
249 string PropertyTokens;
251 PropertyNameData = (string*)&DataReceived.begin()->first;
253 PropertyData = SplitValues(*PropertyNameData);
255 for(map<string,string>::iterator iter = PropertyData.begin();
256 iter != PropertyData.end(); iter++){
258 if (iter->first == "ALTREP"){
260 DescriptionListAltRep.clear();
261 DescriptionListAltRep.push_back(iter->second);
263 } else if (iter->first == "LANGUAGE"){
265 DescriptionListLanguage.clear();
266 DescriptionListLanguage.push_back(iter->second);
270 if (TokenData == false){
273 PropertyTokens += ";";
276 PropertyTokens += iter->first;
277 PropertyTokens += "=";
278 PropertyTokens += iter->second;
284 if (PropertyTokens.size() > 0){
285 DescriptionListTokens.clear();
286 DescriptionListTokens.push_back(PropertyTokens);
289 DescriptionList.clear();
290 DescriptionList.push_back(DataReceived.begin()->second);
294 // Get the Date Time Start value.
296 DataReceived = ProcessTextVectors(&ObjectName, &ObjectData, false, "DTSTART");
298 // Process the data from DTSTART.
300 if (DataReceived.begin() != DataReceived.end()){
302 bool TokenData = false;
303 string PropertyTokens;
305 PropertyNameData = (string*)&DataReceived.begin()->first;
307 PropertyData = SplitValues(*PropertyNameData);
309 for(map<string,string>::iterator iter = PropertyData.begin();
310 iter != PropertyData.end(); iter++){
312 if (iter->first == "VALUE"){
314 DateTimeStartDataValue = iter->second;
316 } else if (iter->first == "TZID"){
318 DateTimeStartDataTimeZoneID = iter->second;
322 if (TokenData == false){
325 PropertyTokens += ";";
328 PropertyTokens += iter->first;
329 PropertyTokens += "=";
330 PropertyTokens += iter->second;
336 if (PropertyTokens.size() > 0){
337 DateTimeStartDataTokens = PropertyTokens;
340 DateTimeStartData = DataReceived.begin()->second;
344 // Process the data from GEO.
346 DataReceived = ProcessTextVectors(&ObjectName, &ObjectData, false, "GEO");
348 if (DataReceived.begin() != DataReceived.end()){
351 GeographicTokens = DataReceived.begin()->first.substr(4);
354 catch(const out_of_range &oor){
355 // Do nothing as there is no data.
358 GeographicData = DataReceived.begin()->second;
362 // Process the data from LAST-MODIFIED.
364 DataReceived = ProcessTextVectors(&ObjectName, &ObjectData, false, "LAST-MODIFIED");
366 if (DataReceived.begin() != DataReceived.end()){
369 LastModifiedTokens = DataReceived.begin()->first.substr(14);
372 catch(const out_of_range &oor){
373 // Do nothing as there is no data.
376 LastModifiedData = DataReceived.begin()->second;
380 // Process the data from LOCATION.
382 DataReceived = ProcessTextVectors(&ObjectName, &ObjectData, false, "LOCATION");
384 if (DataReceived.begin() != DataReceived.end()){
386 bool TokenData = false;
387 string PropertyTokens;
389 PropertyNameData = (string*)&DataReceived.begin()->first;
391 PropertyData = SplitValues(*PropertyNameData);
393 for(map<string,string>::iterator iter = PropertyData.begin();
394 iter != PropertyData.end(); iter++){
396 if (iter->first == "ALTREP"){
398 LocationDataAltRep = iter->second;
400 } else if (iter->first == "LANGUAGE"){
402 LocationDataLanguage = iter->second;
406 if (TokenData == false){
409 PropertyTokens += ";";
412 PropertyTokens += iter->first;
413 PropertyTokens += "=";
414 PropertyTokens += iter->second;
420 if (PropertyTokens.size() > 0){
422 LocationDataTokens = PropertyTokens;
426 LocationData = DataReceived.begin()->second;
430 // Process the data from ORGANIZER.
432 DataReceived = ProcessTextVectors(&ObjectName, &ObjectData, false, "ORGANIZER");
434 if (DataReceived.begin() != DataReceived.end()){
436 bool TokenData = false;
437 string PropertyTokens;
439 PropertyNameData = (string*)&DataReceived.begin()->first;
441 PropertyData = SplitValues(*PropertyNameData);
443 for(map<string,string>::iterator iter = PropertyData.begin();
444 iter != PropertyData.end(); iter++){
446 if (iter->first == "CN"){
448 OrganiserDataCommonName = iter->second;
450 } else if (iter->first == "DIR"){
452 OrganiserDataDirectoryEntry = iter->second;
454 } else if (iter->first == "SENT-BY"){
456 OrganiserDataSentByParam = iter->second;
458 } else if (iter->first == "LANGUAGE"){
460 OrganiserDataLanguage = iter->second;
464 if (TokenData == false){
467 PropertyTokens += ";";
470 PropertyTokens += iter->first;
471 PropertyTokens += "=";
472 PropertyTokens += iter->second;
478 if (PropertyTokens.size() > 0){
480 OrganiserDataTokens = PropertyTokens;
484 OrganiserData = DataReceived.begin()->second;
488 // Process the data from PERCENT-COMPLETE.
490 DataReceived = ProcessTextVectors(&ObjectName, &ObjectData, false, "PERCENT-COMPLETE");
492 if (DataReceived.begin() != DataReceived.end()){
495 PercentCompleteTokens = DataReceived.begin()->first.substr(17);
498 catch(const out_of_range &oor){
499 // Do nothing as there is no data.
502 PercentCompleteData = DataReceived.begin()->second;
506 // Process the data from PRIORITY.
508 DataReceived = ProcessTextVectors(&ObjectName, &ObjectData, false, "PRIORITY");
510 if (DataReceived.begin() != DataReceived.end()){
513 PriorityTokens = DataReceived.begin()->first.substr(9);
516 catch(const out_of_range &oor){
517 // Do nothing as there is no data.
521 PriorityData = stoi(DataReceived.begin()->second);
524 catch(const invalid_argument &oor){
525 PriorityTokens.clear();
530 // Process the data from RECURRENCE-ID.
532 DataReceived = ProcessTextVectors(&ObjectName, &ObjectData, false, "RECURRENCE-ID");
534 if (DataReceived.begin() != DataReceived.end()){
536 bool TokenData = false;
537 string PropertyTokens;
539 PropertyNameData = (string*)&DataReceived.begin()->first;
541 PropertyData = SplitValues(*PropertyNameData);
543 for(map<string,string>::iterator iter = PropertyData.begin();
544 iter != PropertyData.end(); iter++){
546 if (iter->first == "TZID"){
548 RecurranceIDDataTimeZoneParam = iter->second;
550 } else if (iter->first == "VALUE"){
552 RecurranceIDDataValue = iter->second;
554 } else if (iter->first == "RANGE"){
556 RecurranceIDDataRangeParam = iter->second;
560 if (TokenData == false){
563 PropertyTokens += ";";
566 PropertyTokens += iter->first;
567 PropertyTokens += "=";
568 PropertyTokens += iter->second;
574 if (PropertyTokens.size() > 0){
576 RecurranceIDDataTokens = PropertyTokens;
580 RecurranceIDData = DataReceived.begin()->second;
584 // Process the data from SEQUENCE.
586 DataReceived = ProcessTextVectors(&ObjectName, &ObjectData, false, "SEQUENCE");
588 if (DataReceived.begin() != DataReceived.end()){
591 SequenceTokens = DataReceived.begin()->first.substr(9);
594 catch(const out_of_range &oor){
595 // Do nothing as there is no data.
599 SequenceData = stoi(DataReceived.begin()->second);
602 catch(const invalid_argument &oor){
603 SequenceTokens.clear();
608 // Process the data from STATUS.
610 DataReceived = ProcessTextVectors(&ObjectName, &ObjectData, false, "STATUS");
612 if (DataReceived.begin() != DataReceived.end()){
614 bool TokenData = false;
615 string PropertyTokens;
617 PropertyNameData = (string*)&DataReceived.begin()->first;
619 PropertyData = SplitValues(*PropertyNameData);
621 for(map<string,string>::iterator iter = PropertyData.begin();
622 iter != PropertyData.end(); iter++){
624 if (iter->first == "LANGUAGE"){
626 StatusLanguage = iter->second;
630 if (TokenData == false){
633 PropertyTokens += ";";
636 PropertyTokens += iter->first;
637 PropertyTokens += "=";
638 PropertyTokens += iter->second;
644 if (PropertyTokens.size() > 0){
646 StatusTokens = PropertyTokens;
650 StatusData = DataReceived.begin()->second;
654 // Process the data from SUMMARY.
656 DataReceived = ProcessTextVectors(&ObjectName, &ObjectData, false, "SUMMARY");
658 if (DataReceived.begin() != DataReceived.end()){
660 bool TokenData = false;
661 string PropertyTokens;
663 PropertyNameData = (string*)&DataReceived.begin()->first;
665 PropertyData = SplitValues(*PropertyNameData);
667 for(map<string,string>::iterator iter = PropertyData.begin();
668 iter != PropertyData.end(); iter++){
670 if (iter->first == "ALTREP"){
672 SummaryDataAltRep = iter->second;
674 } else if (iter->first == "LANGUAGE"){
676 SummaryDataLanguage = iter->second;
680 if (TokenData == false){
683 PropertyTokens += ";";
686 PropertyTokens += iter->first;
687 PropertyTokens += "=";
688 PropertyTokens += iter->second;
694 if (PropertyTokens.size() > 0){
696 SummaryDataTokens = PropertyTokens;
700 SummaryData = DataReceived.begin()->second;
704 // Process the data from URL.
706 DataReceived = ProcessTextVectors(&ObjectName, &ObjectData, false, "URL");
708 if (DataReceived.begin() != DataReceived.end()){
711 URLDataTokens = DataReceived.begin()->first.substr(4);
714 catch(const out_of_range &oor){
715 // Do nothing as there is no data.
718 URLData = DataReceived.begin()->second;
722 // Process the data from RRULE.
724 DataReceived = ProcessTextVectors(&ObjectName, &ObjectData, false, "RRULE");
726 if (DataReceived.begin() != DataReceived.end()){
729 RecurranceRuleDataTokens = DataReceived.begin()->first.substr(6);
732 catch(const out_of_range &oor){
733 // Do nothing as there is no data.
736 RecurranceRuleData = DataReceived.begin()->second;
740 bool DueProcessed = false;
742 // Process the data from DUE.
744 DataReceived = ProcessTextVectors(&ObjectName, &ObjectData, false, "DUE");
746 if (DataReceived.begin() != DataReceived.end()){
748 bool TokenData = false;
749 string PropertyTokens;
751 PropertyNameData = (string*)&DataReceived.begin()->first;
753 PropertyData = SplitValues(*PropertyNameData);
755 for(map<string,string>::iterator iter = PropertyData.begin();
756 iter != PropertyData.end(); iter++){
758 if (iter->first == "TZID"){
760 DueDataTimeZoneID = iter->second;
762 } else if (iter->first == "VALUE"){
764 DueDataValue = iter->second;
768 if (TokenData == false){
771 PropertyTokens += ";";
774 PropertyTokens += iter->first;
775 PropertyTokens += "=";
776 PropertyTokens += iter->second;
782 if (PropertyTokens.size() > 0){
784 DueDataTokens = PropertyTokens;
788 DueData = DataReceived.begin()->second;
793 // If there is no DUE, then check for DURATION.
795 if (DueProcessed == false){
797 DataReceived = ProcessTextVectors(&ObjectName, &ObjectData, false, "DURATION");
799 if (DataReceived.begin() != DataReceived.end()){
802 DurationDataTokens = DataReceived.begin()->first.substr(9);
805 catch(const out_of_range &oor){
806 // Do nothing as there is no data.
809 DurationData = DataReceived.begin()->second;
815 // Process the data from ATTACH.
817 DataReceived = ProcessTextVectors(&ObjectName, &ObjectData, true, "ATTACH");
819 for(multimap<string,string>::iterator iter = DataReceived.begin();
820 iter != DataReceived.end();
823 AttachListEncoding.push_back("");
824 AttachListValue.push_back("");
825 AttachListFormatType.push_back("");
826 AttachListTokens.push_back("");
827 AttachList.push_back("");
829 bool TokenData = false;
830 string PropertyTokens;
832 PropertyNameData = (string*)&iter->first;
834 PropertyData = SplitValues(*PropertyNameData);
836 for(map<string,string>::iterator dataiter = PropertyData.begin();
837 dataiter != PropertyData.end(); dataiter++){
839 if (dataiter->first == "ENCODING"){
841 AttachListEncoding[ObjectSeekCount] = dataiter->second;
843 } else if (dataiter->first == "VALUE"){
845 AttachListValue[ObjectSeekCount] = dataiter->second;
847 } else if (dataiter->first == "FMTTYPE"){
849 AttachListFormatType[ObjectSeekCount] = dataiter->second;
853 if (TokenData == false){
856 PropertyTokens += ";";
859 PropertyTokens += dataiter->first;
860 PropertyTokens += "=";
861 PropertyTokens += dataiter->second;
867 if (PropertyTokens.size() > 0){
868 AttachListTokens[ObjectSeekCount] = PropertyTokens;
871 AttachList[ObjectSeekCount] = iter->second;
877 // Process the data from ATTENDEE.
879 DataReceived = ProcessTextVectors(&ObjectName, &ObjectData, true, "ATTENDEE");
883 for(multimap<string,string>::iterator iter = DataReceived.begin();
884 iter != DataReceived.end();
887 AttendeeListMember.push_back("");
888 AttendeeListDelegatedFrom.push_back("");
889 AttendeeListDelegatedTo.push_back("");
890 AttendeeListRole.push_back("");
891 AttendeeListRSVP.push_back("");
892 AttendeeListDirectoryEntry.push_back("");
893 AttendeeListSentBy.push_back("");
894 AttendeeListCommonName.push_back("");
895 AttendeeListCalendarUserType.push_back("");
896 AttendeeListParticipationStatus.push_back("");
897 AttendeeListLanguage.push_back("");
898 AttendeeListTokens.push_back("");
899 AttendeeList.push_back("");
901 bool TokenData = false;
902 string PropertyTokens;
904 PropertyNameData = (string*)&iter->first;
906 PropertyData = SplitValues(*PropertyNameData);
908 for(map<string,string>::iterator dataiter = PropertyData.begin();
909 dataiter != PropertyData.end(); dataiter++){
911 if (dataiter->first == "CUTYPE"){
913 AttendeeListCalendarUserType[ObjectSeekCount] = dataiter->second;
915 } else if (dataiter->first == "MEMBER"){
917 AttendeeListMember[ObjectSeekCount] = dataiter->second;
919 } else if (dataiter->first == "ROLE"){
921 AttendeeListRole[ObjectSeekCount] = dataiter->second;
923 } else if (dataiter->first == "PARTSTAT"){
925 AttendeeListParticipationStatus[ObjectSeekCount] = dataiter->second;
927 } else if (dataiter->first == "RSVP"){
929 AttendeeListRSVP[ObjectSeekCount] = dataiter->second;
931 } else if (dataiter->first == "DELEGATED-TO"){
933 AttendeeListDelegatedTo[ObjectSeekCount] = dataiter->second;
935 } else if (dataiter->first == "DELEGATED-FROM"){
937 AttendeeListDelegatedFrom[ObjectSeekCount] = dataiter->second;
939 } else if (dataiter->first == "SENT-BY"){
941 AttendeeListSentBy[ObjectSeekCount] = dataiter->second;
943 } else if (dataiter->first == "CN"){
945 AttendeeListCommonName[ObjectSeekCount] = dataiter->second;
947 } else if (dataiter->first == "DIR"){
949 AttendeeListDirectoryEntry[ObjectSeekCount] = dataiter->second;
951 } else if (dataiter->first == "LANGUAGE"){
953 AttendeeListLanguage[ObjectSeekCount] = dataiter->second;
957 if (TokenData == false){
960 PropertyTokens += ";";
963 PropertyTokens += dataiter->first;
964 PropertyTokens += "=";
965 PropertyTokens += dataiter->second;
971 if (PropertyTokens.size() > 0){
972 AttendeeListTokens[ObjectSeekCount] = PropertyTokens;
975 AttendeeList[ObjectSeekCount] = iter->second;
981 // Process the data from CATEGORIES.
983 DataReceived = ProcessTextVectors(&ObjectName, &ObjectData, true, "CATEGORIES");
987 for(multimap<string,string>::iterator iter = DataReceived.begin();
988 iter != DataReceived.end();
991 CategoriesListTokens.push_back("");
992 CategoriesListLanguage.push_back("");
993 CategoriesList.push_back("");
995 bool TokenData = false;
996 string PropertyTokens;
998 PropertyNameData = (string*)&iter->first;
1000 PropertyData = SplitValues(*PropertyNameData);
1002 for(map<string,string>::iterator dataiter = PropertyData.begin();
1003 dataiter != PropertyData.end(); dataiter++){
1005 if (dataiter->first == "LANGUAGE"){
1007 CategoriesListLanguage[ObjectSeekCount] = dataiter->second;
1011 if (TokenData == false){
1014 PropertyTokens += ";";
1017 PropertyTokens += dataiter->first;
1018 PropertyTokens += "=";
1019 PropertyTokens += dataiter->second;
1025 if (PropertyTokens.size() > 0){
1026 CategoriesListTokens[ObjectSeekCount] = PropertyTokens;
1029 CategoriesList[ObjectSeekCount] = iter->second;
1035 // Process the data from COMMENT.
1037 DataReceived = ProcessTextVectors(&ObjectName, &ObjectData, true, "COMMENT");
1039 ObjectSeekCount = 0;
1041 for(multimap<string,string>::iterator iter = DataReceived.begin();
1042 iter != DataReceived.end();
1045 CommentListTokens.push_back("");
1046 CommentListAltRep.push_back("");
1047 CommentListLanguage.push_back("");
1048 CommentList.push_back("");
1050 bool TokenData = false;
1051 string PropertyTokens;
1053 PropertyNameData = (string*)&iter->first;
1055 PropertyData = SplitValues(*PropertyNameData);
1057 for(map<string,string>::iterator dataiter = PropertyData.begin();
1058 dataiter != PropertyData.end(); dataiter++){
1060 if (dataiter->first == "ALTREP"){
1062 CommentListAltRep[ObjectSeekCount] = dataiter->second;
1064 } else if (dataiter->first == "LANGUAGE"){
1066 CommentListLanguage[ObjectSeekCount] = dataiter->second;
1070 if (TokenData == false){
1073 PropertyTokens += ";";
1076 PropertyTokens += dataiter->first;
1077 PropertyTokens += "=";
1078 PropertyTokens += dataiter->second;
1084 if (PropertyTokens.size() > 0){
1085 CommentListTokens[ObjectSeekCount] = PropertyTokens;
1088 CommentList[ObjectSeekCount] = iter->second;
1094 // Process the data from CONTACT.
1096 DataReceived = ProcessTextVectors(&ObjectName, &ObjectData, true, "CONTACT");
1098 ObjectSeekCount = 0;
1100 for(multimap<string,string>::iterator iter = DataReceived.begin();
1101 iter != DataReceived.end();
1104 ContactListTokens.push_back("");
1105 ContactListAltRep.push_back("");
1106 ContactListLanguage.push_back("");
1107 ContactList.push_back("");
1109 bool TokenData = false;
1110 string PropertyTokens;
1112 PropertyNameData = (string*)&iter->first;
1114 PropertyData = SplitValues(*PropertyNameData);
1116 for(map<string,string>::iterator dataiter = PropertyData.begin();
1117 dataiter != PropertyData.end(); dataiter++){
1119 if (dataiter->first == "ALTREP"){
1121 ContactListAltRep[ObjectSeekCount] = dataiter->second;
1123 } else if (dataiter->first == "LANGUAGE"){
1125 ContactListLanguage[ObjectSeekCount] = dataiter->second;
1129 if (TokenData == false){
1132 PropertyTokens += ";";
1135 PropertyTokens += dataiter->first;
1136 PropertyTokens += "=";
1137 PropertyTokens += dataiter->second;
1143 if (PropertyTokens.size() > 0){
1144 ContactListTokens[ObjectSeekCount] = PropertyTokens;
1147 ContactList[ObjectSeekCount] = iter->second;
1153 // Process the data from EXDATE.
1155 DataReceived = ProcessTextVectors(&ObjectName, &ObjectData, true, "EXDATE");
1157 ObjectSeekCount = 0;
1159 for(multimap<string,string>::iterator iter = DataReceived.begin();
1160 iter != DataReceived.end();
1163 ExcludeDateDataTokens.push_back("");
1164 ExcludeDateDataValue.push_back("");
1165 ExcludeDateDataTimeZoneParam.push_back("");
1166 ExcludeDateData.push_back("");
1168 bool TokenData = false;
1169 string PropertyTokens;
1171 PropertyNameData = (string*)&iter->first;
1173 PropertyData = SplitValues(*PropertyNameData);
1175 for(map<string,string>::iterator dataiter = PropertyData.begin();
1176 dataiter != PropertyData.end(); dataiter++){
1178 if (dataiter->first == "VALUE"){
1180 ExcludeDateDataValue[ObjectSeekCount] = dataiter->second;
1182 } else if (dataiter->first == "TZID"){
1184 ExcludeDateDataTimeZoneParam[ObjectSeekCount] = dataiter->second;
1188 if (TokenData == false){
1191 PropertyTokens += ";";
1194 PropertyTokens += dataiter->first;
1195 PropertyTokens += "=";
1196 PropertyTokens += dataiter->second;
1202 if (PropertyTokens.size() > 0){
1203 ExcludeDateDataTokens[ObjectSeekCount] = PropertyTokens;
1206 ExcludeDateData[ObjectSeekCount] = iter->second;
1212 // Process the data from REQUEST-STATUS.
1214 DataReceived = ProcessTextVectors(&ObjectName, &ObjectData, true, "REQUEST-STATUS");
1216 ObjectSeekCount = 0;
1218 for(multimap<string,string>::iterator iter = DataReceived.begin();
1219 iter != DataReceived.end();
1222 RequestStatusTokens.push_back("");
1223 RequestStatusLanguage.push_back("");
1224 RequestStatusData.push_back("");
1226 bool TokenData = false;
1227 string PropertyTokens;
1229 PropertyNameData = (string*)&iter->first;
1231 PropertyData = SplitValues(*PropertyNameData);
1233 for(map<string,string>::iterator dataiter = PropertyData.begin();
1234 dataiter != PropertyData.end(); dataiter++){
1236 if (dataiter->first == "LANGUAGE"){
1238 RequestStatusLanguage[ObjectSeekCount] = dataiter->second;
1242 if (TokenData == false){
1245 PropertyTokens += ";";
1248 PropertyTokens += dataiter->first;
1249 PropertyTokens += "=";
1250 PropertyTokens += dataiter->second;
1256 if (PropertyTokens.size() > 0){
1257 RequestStatusTokens[ObjectSeekCount] = PropertyTokens;
1260 RequestStatusData[ObjectSeekCount] = iter->second;
1266 // Process the data from RELATED-TO.
1268 DataReceived = ProcessTextVectors(&ObjectName, &ObjectData, true, "RELATED-TO");
1270 ObjectSeekCount = 0;
1272 for(multimap<string,string>::iterator iter = DataReceived.begin();
1273 iter != DataReceived.end();
1276 RelatedToDataTokens.push_back("");
1277 RelatedToDataRelationType.push_back("");
1278 RelatedToData.push_back("");
1280 bool TokenData = false;
1281 string PropertyTokens;
1283 PropertyNameData = (string*)&iter->first;
1285 PropertyData = SplitValues(*PropertyNameData);
1287 for(map<string,string>::iterator dataiter = PropertyData.begin();
1288 dataiter != PropertyData.end(); dataiter++){
1290 if (dataiter->first == "RELTYPE"){
1292 RelatedToDataRelationType[ObjectSeekCount] = dataiter->second;
1296 if (TokenData == false){
1299 PropertyTokens += ";";
1302 PropertyTokens += dataiter->first;
1303 PropertyTokens += "=";
1304 PropertyTokens += dataiter->second;
1310 if (PropertyTokens.size() > 0){
1311 RelatedToDataTokens[ObjectSeekCount] = PropertyTokens;
1314 RelatedToData[ObjectSeekCount] = iter->second;
1320 // Process the data from RESOURCES.
1322 DataReceived = ProcessTextVectors(&ObjectName, &ObjectData, true, "RESOURCES");
1324 ObjectSeekCount = 0;
1326 for(multimap<string,string>::iterator iter = DataReceived.begin();
1327 iter != DataReceived.end();
1330 ResourcesDataTokens.push_back("");
1331 ResourcesDataAltRep.push_back("");
1332 ResourcesDataLanguage.push_back("");
1333 ResourcesData.push_back("");
1335 bool TokenData = false;
1336 string PropertyTokens;
1338 PropertyNameData = (string*)&iter->first;
1340 PropertyData = SplitValues(*PropertyNameData);
1342 for(map<string,string>::iterator dataiter = PropertyData.begin();
1343 dataiter != PropertyData.end(); dataiter++){
1345 if (dataiter->first == "ALTREP"){
1347 ResourcesDataAltRep[ObjectSeekCount] = dataiter->second;
1349 } else if (dataiter->first == "LANGUAGE"){
1351 ResourcesDataLanguage[ObjectSeekCount] = dataiter->second;
1355 if (TokenData == false){
1358 PropertyTokens += ";";
1361 PropertyTokens += dataiter->first;
1362 PropertyTokens += "=";
1363 PropertyTokens += dataiter->second;
1369 if (PropertyTokens.size() > 0){
1370 ResourcesDataTokens[ObjectSeekCount] = PropertyTokens;
1373 ResourcesData[ObjectSeekCount] = iter->second;
1379 // Process the data from RDATE.
1381 DataReceived = ProcessTextVectors(&ObjectName, &ObjectData, true, "RDATE");
1383 ObjectSeekCount = 0;
1385 for(multimap<string,string>::iterator iter = DataReceived.begin();
1386 iter != DataReceived.end();
1389 RecurranceDateDataTokens.push_back("");
1390 RecurranceDateDataValue.push_back("");
1391 RecurranceDateDataTimeZoneParam.push_back("");
1392 RecurranceDateData.push_back("");
1394 bool TokenData = false;
1395 string PropertyTokens;
1397 PropertyNameData = (string*)&iter->first;
1399 PropertyData = SplitValues(*PropertyNameData);
1401 for(map<string,string>::iterator dataiter = PropertyData.begin();
1402 dataiter != PropertyData.end(); dataiter++){
1404 if (dataiter->first == "VALUE"){
1406 RecurranceDateDataValue[ObjectSeekCount] = dataiter->second;
1408 } else if (dataiter->first == "TZID"){
1410 RecurranceDateDataTimeZoneParam[ObjectSeekCount] = dataiter->second;
1414 if (TokenData == false){
1417 PropertyTokens += ";";
1420 PropertyTokens += dataiter->first;
1421 PropertyTokens += "=";
1422 PropertyTokens += dataiter->second;
1428 if (PropertyTokens.size() > 0){
1429 RecurranceDateDataTokens[ObjectSeekCount] = PropertyTokens;
1432 RecurranceDateData[ObjectSeekCount] = iter->second;
1438 ObjectSeekCount = 0;
1440 // Process data from X-*
1442 for(vector<string>::iterator iter = ObjectName.begin();
1443 iter != ObjectName.end(); ++iter){
1445 RequestStatusTokens.push_back("");
1446 RequestStatusLanguage.push_back("");
1447 RequestStatusData.push_back("");
1449 bool TokenData = false;
1450 string PropertyTokens;
1452 if (iter->substr(0,2) == "X-" &&
1455 XTokensData.push_back(ObjectData[ObjectSeekCount]);
1456 XTokensDataTokens.push_back(ObjectName[ObjectSeekCount]);