X-Git-Url: http://Server1/repobrowser/?a=blobdiff_plain;ds=inline;f=source%2Fobjects%2Fcalendartask%2FCalendarTask.cpp;h=613d68e9a33beb2059534ff9419f4cbcf6245e15;hb=199d3db9eace9bd456e0c633e33e8df97dc0716a;hp=ae4b33984893ee5c13aa433eecc42d53ce5adb4d;hpb=867e6848594a4bd9ef190c8a3ab7408e8a46cc80;p=xestiacalendar%2F.git
diff --git a/source/objects/calendartask/CalendarTask.cpp b/source/objects/calendartask/CalendarTask.cpp
index ae4b339..613d68e 100644
--- a/source/objects/calendartask/CalendarTask.cpp
+++ b/source/objects/calendartask/CalendarTask.cpp
@@ -1,130 +1,148 @@
+// CalendarTask.cpp - CalendarTask class functions
+//
+// (c) 2016-2017 Xestia Software Development.
+//
+// This file is part of Xestia Calendar.
+//
+// Xestia Calendar is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by the
+// Free Software Foundation, version 3 of the license.
+//
+// Xestia Calendar is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with Xestia Calendar. If not, see
+
#include "CalendarTask.h"
using namespace std;
CalendarObjectValidResult CalendarTaskObject::ValidObject(){
- bool ValidBegin = false;
- bool ValidEnd = false;
- bool ValidDateTimeStamp = false;
- bool ValidUniqueID = false;
- int SeekCount = 0;
- string PropertyName;
+ bool validBegin = false;
+ bool validEnd = false;
+ bool validDateTimeStamp = false;
+ bool validUniqueID = false;
+ int seekCount = 0;
+ string propertyName;
// Look for BEGIN:VTODO.
- for (vector::iterator iter = ObjectName.begin();
- iter != ObjectName.end(); iter++){
+ for (vector::iterator iter = objectName.begin();
+ iter != objectName.end(); iter++){
- if (ObjectName[SeekCount] == "BEGIN" &&
- ObjectData[SeekCount] == "VTODO"){
+ if (objectName[seekCount] == "BEGIN" &&
+ objectData[seekCount] == "VTODO"){
- if (ValidBegin == false){
- ValidBegin = true;
+ if (validBegin == false){
+ validBegin = true;
} else {
return CALENDAROBJECTVALID_INVALIDFORMAT;
}
}
- if (ObjectName[SeekCount] == "END" &&
- ObjectData[SeekCount] == "VTODO" &&
- ValidBegin == false){
+ if (objectName[seekCount] == "END" &&
+ objectData[seekCount] == "VTODO" &&
+ validBegin == false){
return CALENDAROBJECTVALID_INVALIDFORMAT;
}
- SeekCount++;
+ seekCount++;
}
- SeekCount = 0;
+ seekCount = 0;
// Look for DTSTAMP.
- for (vector::iterator iter = ObjectName.begin();
- iter != ObjectName.end(); iter++){
+ for (vector::iterator iter = objectName.begin();
+ iter != objectName.end(); iter++){
try{
- PropertyName = ObjectName[SeekCount].substr(0,7);
+ propertyName = objectName[seekCount].substr(0,7);
}
catch(const out_of_range& oor){
continue;
}
- if (PropertyName == "DTSTAMP"){
+ if (propertyName == "DTSTAMP"){
- if (ValidDateTimeStamp == false){
- ValidDateTimeStamp = true;
+ if (validDateTimeStamp == false){
+ validDateTimeStamp = true;
} else {
return CALENDAROBJECTVALID_INVALIDFORMAT;
}
}
- SeekCount++;
+ seekCount++;
}
- SeekCount = 0;
+ seekCount = 0;
// Look for UID.
- for (vector::iterator iter = ObjectName.begin();
- iter != ObjectName.end(); iter++){
+ for (vector::iterator iter = objectName.begin();
+ iter != objectName.end(); iter++){
try{
- PropertyName = ObjectName[SeekCount].substr(0,3);
+ propertyName = objectName[seekCount].substr(0,3);
}
catch(const out_of_range& oor){
continue;
}
- if (PropertyName == "UID"){
+ if (propertyName == "UID"){
- if (ValidUniqueID == false){
- ValidUniqueID = true;
+ if (validUniqueID == false){
+ validUniqueID = true;
} else {
return CALENDAROBJECTVALID_INVALIDFORMAT;
}
}
- SeekCount++;
-
+ seekCount++;
+
}
- SeekCount = 0;
+ seekCount = 0;
// Look for END:VTODO.
- for (vector::iterator iter = ObjectName.begin();
- iter != ObjectName.end(); iter++){
+ for (vector::iterator iter = objectName.begin();
+ iter != objectName.end(); iter++){
- if (ObjectName[SeekCount] == "END" &&
- ObjectData[SeekCount] == "VTODO"){
+ if (objectName[seekCount] == "END" &&
+ objectData[seekCount] == "VTODO"){
- if (ValidEnd == false){
- ValidEnd = true;
+ if (validEnd == false){
+ validEnd = true;
} else {
return CALENDAROBJECTVALID_INVALIDFORMAT;
}
}
- SeekCount++;
+ seekCount++;
}
// Check if the VTODO is valid.
- if (ValidBegin == true &&
- ValidEnd == true &&
- ValidDateTimeStamp == true &&
- ValidUniqueID == true){
+ if (validBegin == true &&
+ validEnd == true &&
+ validDateTimeStamp == true &&
+ validUniqueID == true){
return CALENDAROBJECTVALID_OK;
@@ -140,84 +158,1799 @@ void CalendarTaskObject::ProcessData(){
// Process the data.
- multimap DataReceived;
- map PropertyData;
- string *PropertyNameData = nullptr;
- int ObjectSeekCount = 0;
+ multimap dataReceived;
+ map propertyData;
+ string *propertyNameData = nullptr;
+ int objectSeekCount = 0;
// Get the Date Time Stamp (DTSTAMP).
- DataReceived = ProcessTextVectors(&ObjectName, &ObjectData, false, "DTSTAMP");
+ dataReceived = ProcessTextVectors(&objectName, &objectData, false, "DTSTAMP");
// Process the data from DTSTAMP.
- if (DataReceived.begin() != DataReceived.end()){
+ if (dataReceived.begin() != dataReceived.end()){
try {
- DateTimeStampTokens = DataReceived.begin()->first.substr(8);
+ dateTimeStampTokens = dataReceived.begin()->first.substr(8);
}
catch(const out_of_range &oor){
// Do nothing as there is no data.
}
- DateTimeStampData = DataReceived.begin()->second;
+ dateTimeStampData = dataReceived.begin()->second;
}
// Get the Unique ID (UID).
- DataReceived = ProcessTextVectors(&ObjectName, &ObjectData, false, "UID");
+ dataReceived = ProcessTextVectors(&objectName, &objectData, false, "UID");
// Process the data from UID.
- if (DataReceived.begin() != DataReceived.end()){
+ if (dataReceived.begin() != dataReceived.end()){
try {
- UniqueIDTokens = DataReceived.begin()->first.substr(4);
+ uniqueIDTokens = dataReceived.begin()->first.substr(4);
}
catch(const out_of_range &oor){
// Do nothing as there is no data.
}
- UniqueID = DataReceived.begin()->second;
+ uniqueID = dataReceived.begin()->second;
}
// Process the data from CLASS.
- DataReceived = ProcessTextVectors(&ObjectName, &ObjectData, false, "CLASS");
+ dataReceived = ProcessTextVectors(&objectName, &objectData, false, "CLASS");
- if (DataReceived.begin() != DataReceived.end()){
+ if (dataReceived.begin() != dataReceived.end()){
try {
- ClassDataTokens = DataReceived.begin()->first.substr(6);
+ classDataTokens = dataReceived.begin()->first.substr(6);
}
catch(const out_of_range &oor){
// Do nothing as there is no data.
}
- ClassData = DataReceived.begin()->second;
+ classData = dataReceived.begin()->second;
}
// Process the data from COMPLETED.
- DataReceived = ProcessTextVectors(&ObjectName, &ObjectData, false, "COMPLETED");
+ dataReceived = ProcessTextVectors(&objectName, &objectData, false, "COMPLETED");
+
+ if (dataReceived.begin() != dataReceived.end()){
+
+ try {
+ completedDataTokens = dataReceived.begin()->first.substr(10);
+ }
+
+ catch(const out_of_range &oor){
+ // Do nothing as there is no data.
+ }
+
+ completedData = dataReceived.begin()->second;
+
+ }
+
+ // Process the data from CREATED.
+
+ dataReceived = ProcessTextVectors(&objectName, &objectData, false, "CREATED");
+
+ if (dataReceived.begin() != dataReceived.end()){
+
+ try {
+ dateTimeCreatedTokens = dataReceived.begin()->first.substr(8);
+ }
+
+ catch(const out_of_range &oor){
+ // Do nothing as there is no data.
+ }
+
+ dateTimeCreatedData = dataReceived.begin()->second;
+
+ }
+
+ // Process the data from DESCRIPTION.
+
+ dataReceived = ProcessTextVectors(&objectName, &objectData, false, "DESCRIPTION");
+
+ if (dataReceived.begin() != dataReceived.end()){
+
+ bool tokenData = false;
+ string propertyTokens;
+
+ propertyNameData = (string*)&dataReceived.begin()->first;
+
+ propertyData = SplitValues(*propertyNameData);
+
+ for(map::iterator iter = propertyData.begin();
+ iter != propertyData.end(); iter++){
+
+ if (iter->first == "ALTREP"){
+
+ descriptionListAltRep.clear();
+ descriptionListAltRep.push_back(iter->second);
+
+ } else if (iter->first == "LANGUAGE"){
+
+ descriptionListLanguage.clear();
+ descriptionListLanguage.push_back(iter->second);
+
+ } else {
+
+ if (tokenData == false){
+ tokenData = true;
+ } else {
+ propertyTokens += ";";
+ }
+
+ propertyTokens += iter->first;
+ propertyTokens += "=";
+ propertyTokens += iter->second;
+
+ }
+
+ }
+
+ if (propertyTokens.size() > 0){
+ descriptionListTokens.clear();
+ descriptionListTokens.push_back(propertyTokens);
+ }
+
+ descriptionList.clear();
+ descriptionList.push_back(dataReceived.begin()->second);
+
+ }
+
+ // Get the Date Time Start value.
+
+ dataReceived = ProcessTextVectors(&objectName, &objectData, false, "DTSTART");
+
+ // Process the data from DTSTART.
+
+ if (dataReceived.begin() != dataReceived.end()){
+
+ bool tokenData = false;
+ string propertyTokens;
+
+ propertyNameData = (string*)&dataReceived.begin()->first;
+
+ propertyData = SplitValues(*propertyNameData);
+
+ for(map::iterator iter = propertyData.begin();
+ iter != propertyData.end(); iter++){
+
+ if (iter->first == "VALUE"){
+
+ dateTimeStartDataValue = iter->second;
+
+ } else if (iter->first == "TZID"){
+
+ dateTimeStartDataTimeZoneID = iter->second;
+
+ } else {
+
+ if (tokenData == false){
+ tokenData = true;
+ } else {
+ propertyTokens += ";";
+ }
+
+ propertyTokens += iter->first;
+ propertyTokens += "=";
+ propertyTokens += iter->second;
+
+ }
+
+ }
+
+ if (propertyTokens.size() > 0){
+ dateTimeStartDataTokens = propertyTokens;
+ }
+
+ dateTimeStartData = dataReceived.begin()->second;
+
+ }
+
+ // Process the data from GEO.
+
+ dataReceived = ProcessTextVectors(&objectName, &objectData, false, "GEO");
+
+ if (dataReceived.begin() != dataReceived.end()){
+
+ try {
+ geographicTokens = dataReceived.begin()->first.substr(4);
+ }
+
+ catch(const out_of_range &oor){
+ // Do nothing as there is no data.
+ }
+
+ geographicData = dataReceived.begin()->second;
+
+ }
+
+ // Process the data from LAST-MODIFIED.
+
+ dataReceived = ProcessTextVectors(&objectName, &objectData, false, "LAST-MODIFIED");
+
+ if (dataReceived.begin() != dataReceived.end()){
+
+ try {
+ lastModifiedTokens = dataReceived.begin()->first.substr(14);
+ }
+
+ catch(const out_of_range &oor){
+ // Do nothing as there is no data.
+ }
+
+ lastModifiedData = dataReceived.begin()->second;
+
+ }
+
+ // Process the data from LOCATION.
+
+ dataReceived = ProcessTextVectors(&objectName, &objectData, false, "LOCATION");
+
+ if (dataReceived.begin() != dataReceived.end()){
+
+ bool tokenData = false;
+ string propertyTokens;
+
+ propertyNameData = (string*)&dataReceived.begin()->first;
+
+ propertyData = SplitValues(*propertyNameData);
+
+ for(map::iterator iter = propertyData.begin();
+ iter != propertyData.end(); iter++){
+
+ if (iter->first == "ALTREP"){
+
+ locationDataAltRep = iter->second;
+
+ } else if (iter->first == "LANGUAGE"){
+
+ locationDataLanguage = iter->second;
+
+ } else {
+
+ if (tokenData == false){
+ tokenData = true;
+ } else {
+ propertyTokens += ";";
+ }
+
+ propertyTokens += iter->first;
+ propertyTokens += "=";
+ propertyTokens += iter->second;
+
+ }
+
+ }
+
+ if (propertyTokens.size() > 0){
+
+ locationDataTokens = propertyTokens;
+
+ }
+
+ locationData = dataReceived.begin()->second;
+
+ }
+
+ // Process the data from ORGANIZER.
+
+ dataReceived = ProcessTextVectors(&objectName, &objectData, false, "ORGANIZER");
+
+ if (dataReceived.begin() != dataReceived.end()){
+
+ bool tokenData = false;
+ string propertyTokens;
+
+ propertyNameData = (string*)&dataReceived.begin()->first;
+
+ propertyData = SplitValues(*propertyNameData);
+
+ for(map::iterator iter = propertyData.begin();
+ iter != propertyData.end(); iter++){
+
+ if (iter->first == "CN"){
+
+ organiserDataCommonName = iter->second;
+
+ } else if (iter->first == "DIR"){
+
+ organiserDataDirectoryEntry = iter->second;
+
+ } else if (iter->first == "SENT-BY"){
+
+ organiserDataSentByParam = iter->second;
+
+ } else if (iter->first == "LANGUAGE"){
+
+ organiserDataLanguage = iter->second;
+
+ } else {
+
+ if (tokenData == false){
+ tokenData = true;
+ } else {
+ propertyTokens += ";";
+ }
+
+ propertyTokens += iter->first;
+ propertyTokens += "=";
+ propertyTokens += iter->second;
+
+ }
+
+ }
+
+ if (propertyTokens.size() > 0){
+
+ organiserDataTokens = propertyTokens;
+
+ }
+
+ organiserData = dataReceived.begin()->second;
+
+ }
+
+ // Process the data from PERCENT-COMPLETE.
+
+ dataReceived = ProcessTextVectors(&objectName, &objectData, false, "PERCENT-COMPLETE");
+
+ if (dataReceived.begin() != dataReceived.end()){
+
+ try {
+ percentCompleteTokens = dataReceived.begin()->first.substr(17);
+ }
+
+ catch(const out_of_range &oor){
+ // Do nothing as there is no data.
+ }
+
+ percentCompleteData = dataReceived.begin()->second;
+
+ }
+
+ // Process the data from PRIORITY.
+
+ dataReceived = ProcessTextVectors(&objectName, &objectData, false, "PRIORITY");
+
+ if (dataReceived.begin() != dataReceived.end()){
+
+ try {
+ priorityTokens = dataReceived.begin()->first.substr(9);
+ }
+
+ catch(const out_of_range &oor){
+ // Do nothing as there is no data.
+ }
+
+ try {
+ priorityData = stoi(dataReceived.begin()->second);
+ }
+
+ catch(const invalid_argument &oor){
+ priorityTokens.clear();
+ }
+
+ }
+
+ // Process the data from RECURRENCE-ID.
+
+ dataReceived = ProcessTextVectors(&objectName, &objectData, false, "RECURRENCE-ID");
+
+ if (dataReceived.begin() != dataReceived.end()){
+
+ bool tokenData = false;
+ string propertyTokens;
+
+ propertyNameData = (string*)&dataReceived.begin()->first;
+
+ propertyData = SplitValues(*propertyNameData);
+
+ for(map::iterator iter = propertyData.begin();
+ iter != propertyData.end(); iter++){
+
+ if (iter->first == "TZID"){
+
+ recurranceIDDataTimeZoneParam = iter->second;
+
+ } else if (iter->first == "VALUE"){
+
+ recurranceIDDataValue = iter->second;
+
+ } else if (iter->first == "RANGE"){
+
+ recurranceIDDataRangeParam = iter->second;
+
+ } else {
+
+ if (tokenData == false){
+ tokenData = true;
+ } else {
+ propertyTokens += ";";
+ }
+
+ propertyTokens += iter->first;
+ propertyTokens += "=";
+ propertyTokens += iter->second;
+
+ }
+
+ }
+
+ if (propertyTokens.size() > 0){
+
+ recurranceIDDataTokens = propertyTokens;
+
+ }
+
+ recurranceIDData = dataReceived.begin()->second;
+
+ }
- if (DataReceived.begin() != DataReceived.end()){
+ // Process the data from SEQUENCE.
+
+ dataReceived = ProcessTextVectors(&objectName, &objectData, false, "SEQUENCE");
+
+ if (dataReceived.begin() != dataReceived.end()){
try {
- CompletedDataTokens = DataReceived.begin()->first.substr(10);
+ sequenceTokens = dataReceived.begin()->first.substr(9);
}
catch(const out_of_range &oor){
// Do nothing as there is no data.
}
- CompletedData = DataReceived.begin()->second;
+ try {
+ sequenceData = stoi(dataReceived.begin()->second);
+ }
+
+ catch(const invalid_argument &oor){
+ sequenceTokens.clear();
+ }
+
+ }
+
+ // Process the data from STATUS.
+
+ dataReceived = ProcessTextVectors(&objectName, &objectData, false, "STATUS");
+
+ if (dataReceived.begin() != dataReceived.end()){
+
+ bool tokenData = false;
+ string propertyTokens;
+
+ propertyNameData = (string*)&dataReceived.begin()->first;
+
+ propertyData = SplitValues(*propertyNameData);
+
+ for(map::iterator iter = propertyData.begin();
+ iter != propertyData.end(); iter++){
+
+ if (iter->first == "LANGUAGE"){
+
+ statusLanguage = iter->second;
+
+ } else {
+
+ if (tokenData == false){
+ tokenData = true;
+ } else {
+ propertyTokens += ";";
+ }
+
+ propertyTokens += iter->first;
+ propertyTokens += "=";
+ propertyTokens += iter->second;
+
+ }
+
+ }
+
+ if (propertyTokens.size() > 0){
+
+ statusTokens = propertyTokens;
+
+ }
+
+ statusData = dataReceived.begin()->second;
+
+ }
+
+ // Process the data from SUMMARY.
+
+ dataReceived = ProcessTextVectors(&objectName, &objectData, false, "SUMMARY");
+
+ if (dataReceived.begin() != dataReceived.end()){
+
+ bool tokenData = false;
+ string propertyTokens;
+
+ propertyNameData = (string*)&dataReceived.begin()->first;
+
+ propertyData = SplitValues(*propertyNameData);
+
+ for(map::iterator iter = propertyData.begin();
+ iter != propertyData.end(); iter++){
+
+ if (iter->first == "ALTREP"){
+
+ summaryDataAltRep = iter->second;
+
+ } else if (iter->first == "LANGUAGE"){
+
+ summaryDataLanguage = iter->second;
+
+ } else {
+
+ if (tokenData == false){
+ tokenData = true;
+ } else {
+ propertyTokens += ";";
+ }
+
+ propertyTokens += iter->first;
+ propertyTokens += "=";
+ propertyTokens += iter->second;
+
+ }
+
+ }
+
+ if (propertyTokens.size() > 0){
+
+ summaryDataTokens = propertyTokens;
+
+ }
+
+ summaryData = dataReceived.begin()->second;
+
+ }
+
+ // Process the data from URL.
+
+ dataReceived = ProcessTextVectors(&objectName, &objectData, false, "URL");
+
+ if (dataReceived.begin() != dataReceived.end()){
+
+ try {
+ urlDataTokens = dataReceived.begin()->first.substr(4);
+ }
+
+ catch(const out_of_range &oor){
+ // Do nothing as there is no data.
+ }
+
+ urlData = dataReceived.begin()->second;
+
+ }
+
+ // Process the data from RRULE.
+
+ dataReceived = ProcessTextVectors(&objectName, &objectData, false, "RRULE");
+
+ if (dataReceived.begin() != dataReceived.end()){
+
+ try {
+ recurranceRuleDataTokens = dataReceived.begin()->first.substr(6);
+ }
+
+ catch(const out_of_range &oor){
+ // Do nothing as there is no data.
+ }
+
+ recurranceRuleData = dataReceived.begin()->second;
+
+ }
+
+ bool dueProcessed = false;
+
+ // Process the data from DUE.
+
+ dataReceived = ProcessTextVectors(&objectName, &objectData, false, "DUE");
+
+ if (dataReceived.begin() != dataReceived.end()){
+
+ bool tokenData = false;
+ string propertyTokens;
+
+ propertyNameData = (string*)&dataReceived.begin()->first;
+
+ propertyData = SplitValues(*propertyNameData);
+
+ for(map::iterator iter = propertyData.begin();
+ iter != propertyData.end(); iter++){
+
+ if (iter->first == "TZID"){
+
+ dueDataTimeZoneID = iter->second;
+
+ } else if (iter->first == "VALUE"){
+
+ dueDataValue = iter->second;
+
+ } else {
+
+ if (tokenData == false){
+ tokenData = true;
+ } else {
+ propertyTokens += ";";
+ }
+
+ propertyTokens += iter->first;
+ propertyTokens += "=";
+ propertyTokens += iter->second;
+
+ }
+
+ }
+
+ if (propertyTokens.size() > 0){
+
+ dueDataTokens = propertyTokens;
+
+ }
+
+ dueData = dataReceived.begin()->second;
+ dueProcessed = true;
+
+ }
+
+ // If there is no DUE, then check for DURATION.
+
+ if (dueProcessed == false){
+
+ dataReceived = ProcessTextVectors(&objectName, &objectData, false, "DURATION");
+
+ if (dataReceived.begin() != dataReceived.end()){
+
+ try {
+ durationDataTokens = dataReceived.begin()->first.substr(9);
+ }
+
+ catch(const out_of_range &oor){
+ // Do nothing as there is no data.
+ }
+
+ durationData = dataReceived.begin()->second;
+
+ }
+
+ }
+
+ // Process the data from ATTACH.
+
+ dataReceived = ProcessTextVectors(&objectName, &objectData, true, "ATTACH");
+
+ for(multimap::iterator iter = dataReceived.begin();
+ iter != dataReceived.end();
+ ++iter){
+
+ attachListEncoding.push_back("");
+ attachListValue.push_back("");
+ attachListFormatType.push_back("");
+ attachListTokens.push_back("");
+ attachList.push_back("");
+
+ bool tokenData = false;
+ string propertyTokens;
+
+ propertyNameData = (string*)&iter->first;
+
+ propertyData = SplitValues(*propertyNameData);
+
+ for(map::iterator dataiter = propertyData.begin();
+ dataiter != propertyData.end(); dataiter++){
+
+ if (dataiter->first == "ENCODING"){
+
+ attachListEncoding[objectSeekCount] = dataiter->second;
+
+ } else if (dataiter->first == "VALUE"){
+
+ attachListValue[objectSeekCount] = dataiter->second;
+
+ } else if (dataiter->first == "FMTTYPE"){
+
+ attachListFormatType[objectSeekCount] = dataiter->second;
+
+ } else {
+
+ if (tokenData == false){
+ tokenData = true;
+ } else {
+ propertyTokens += ";";
+ }
+
+ propertyTokens += dataiter->first;
+ propertyTokens += "=";
+ propertyTokens += dataiter->second;
+
+ }
+
+ }
+
+ if (propertyTokens.size() > 0){
+ attachListTokens[objectSeekCount] = propertyTokens;
+ }
+
+ attachList[objectSeekCount] = iter->second;
+
+ objectSeekCount++;
+
+ }
+
+ // Process the data from ATTENDEE.
+
+ dataReceived = ProcessTextVectors(&objectName, &objectData, true, "ATTENDEE");
+
+ objectSeekCount = 0;
+
+ for(multimap::iterator iter = dataReceived.begin();
+ iter != dataReceived.end();
+ ++iter){
+
+ attendeeListMember.push_back("");
+ attendeeListDelegatedFrom.push_back("");
+ attendeeListDelegatedTo.push_back("");
+ attendeeListRole.push_back("");
+ attendeeListRSVP.push_back("");
+ attendeeListDirectoryEntry.push_back("");
+ attendeeListSentBy.push_back("");
+ attendeeListCommonName.push_back("");
+ attendeeListCalendarUserType.push_back("");
+ attendeeListParticipationStatus.push_back("");
+ attendeeListLanguage.push_back("");
+ attendeeListTokens.push_back("");
+ attendeeList.push_back("");
+
+ bool tokenData = false;
+ string propertyTokens;
+
+ propertyNameData = (string*)&iter->first;
+
+ propertyData = SplitValues(*propertyNameData);
+
+ for(map::iterator dataiter = propertyData.begin();
+ dataiter != propertyData.end(); dataiter++){
+
+ if (dataiter->first == "CUTYPE"){
+
+ attendeeListCalendarUserType[objectSeekCount] = dataiter->second;
+
+ } else if (dataiter->first == "MEMBER"){
+
+ attendeeListMember[objectSeekCount] = dataiter->second;
+
+ } else if (dataiter->first == "ROLE"){
+
+ attendeeListRole[objectSeekCount] = dataiter->second;
+
+ } else if (dataiter->first == "PARTSTAT"){
+
+ attendeeListParticipationStatus[objectSeekCount] = dataiter->second;
+
+ } else if (dataiter->first == "RSVP"){
+
+ attendeeListRSVP[objectSeekCount] = dataiter->second;
+
+ } else if (dataiter->first == "DELEGATED-TO"){
+
+ attendeeListDelegatedTo[objectSeekCount] = dataiter->second;
+
+ } else if (dataiter->first == "DELEGATED-FROM"){
+
+ attendeeListDelegatedFrom[objectSeekCount] = dataiter->second;
+
+ } else if (dataiter->first == "SENT-BY"){
+
+ attendeeListSentBy[objectSeekCount] = dataiter->second;
+
+ } else if (dataiter->first == "CN"){
+
+ attendeeListCommonName[objectSeekCount] = dataiter->second;
+
+ } else if (dataiter->first == "DIR"){
+
+ attendeeListDirectoryEntry[objectSeekCount] = dataiter->second;
+
+ } else if (dataiter->first == "LANGUAGE"){
+
+ attendeeListLanguage[objectSeekCount] = dataiter->second;
+
+ } else {
+
+ if (tokenData == false){
+ tokenData = true;
+ } else {
+ propertyTokens += ";";
+ }
+
+ propertyTokens += dataiter->first;
+ propertyTokens += "=";
+ propertyTokens += dataiter->second;
+
+ }
+
+ }
+
+ if (propertyTokens.size() > 0){
+ attendeeListTokens[objectSeekCount] = propertyTokens;
+ }
+
+ attendeeList[objectSeekCount] = iter->second;
+
+ objectSeekCount++;
+
+ }
+
+ // Process the data from CATEGORIES.
+
+ dataReceived = ProcessTextVectors(&objectName, &objectData, true, "CATEGORIES");
+
+ objectSeekCount = 0;
+
+ for(multimap::iterator iter = dataReceived.begin();
+ iter != dataReceived.end();
+ ++iter){
+
+ categoriesListTokens.push_back("");
+ categoriesListLanguage.push_back("");
+ categoriesList.push_back("");
+
+ bool tokenData = false;
+ string propertyTokens;
+
+ propertyNameData = (string*)&iter->first;
+
+ propertyData = SplitValues(*propertyNameData);
+
+ for(map::iterator dataiter = propertyData.begin();
+ dataiter != propertyData.end(); dataiter++){
+
+ if (dataiter->first == "LANGUAGE"){
+
+ categoriesListLanguage[objectSeekCount] = dataiter->second;
+
+ } else {
+
+ if (tokenData == false){
+ tokenData = true;
+ } else {
+ propertyTokens += ";";
+ }
+
+ propertyTokens += dataiter->first;
+ propertyTokens += "=";
+ propertyTokens += dataiter->second;
+
+ }
+
+ }
+
+ if (propertyTokens.size() > 0){
+ categoriesListTokens[objectSeekCount] = propertyTokens;
+ }
+
+ categoriesList[objectSeekCount] = iter->second;
+
+ objectSeekCount++;
+
+ }
+
+ // Process the data from COMMENT.
+
+ dataReceived = ProcessTextVectors(&objectName, &objectData, true, "COMMENT");
+
+ objectSeekCount = 0;
+
+ for(multimap::iterator iter = dataReceived.begin();
+ iter != dataReceived.end();
+ ++iter){
+
+ commentListTokens.push_back("");
+ commentListAltRep.push_back("");
+ commentListLanguage.push_back("");
+ commentList.push_back("");
+
+ bool tokenData = false;
+ string propertyTokens;
+
+ propertyNameData = (string*)&iter->first;
+
+ propertyData = SplitValues(*propertyNameData);
+
+ for(map::iterator dataiter = propertyData.begin();
+ dataiter != propertyData.end(); dataiter++){
+
+ if (dataiter->first == "ALTREP"){
+
+ commentListAltRep[objectSeekCount] = dataiter->second;
+
+ } else if (dataiter->first == "LANGUAGE"){
+
+ commentListLanguage[objectSeekCount] = dataiter->second;
+
+ } else {
+
+ if (tokenData == false){
+ tokenData = true;
+ } else {
+ propertyTokens += ";";
+ }
+
+ propertyTokens += dataiter->first;
+ propertyTokens += "=";
+ propertyTokens += dataiter->second;
+
+ }
+
+ }
+
+ if (propertyTokens.size() > 0){
+ commentListTokens[objectSeekCount] = propertyTokens;
+ }
+
+ commentList[objectSeekCount] = iter->second;
+
+ objectSeekCount++;
+
+ }
+
+ // Process the data from CONTACT.
+
+ dataReceived = ProcessTextVectors(&objectName, &objectData, true, "CONTACT");
+
+ objectSeekCount = 0;
+
+ for(multimap::iterator iter = dataReceived.begin();
+ iter != dataReceived.end();
+ ++iter){
+
+ contactListTokens.push_back("");
+ contactListAltRep.push_back("");
+ contactListLanguage.push_back("");
+ contactList.push_back("");
+
+ bool tokenData = false;
+ string propertyTokens;
+
+ propertyNameData = (string*)&iter->first;
+
+ propertyData = SplitValues(*propertyNameData);
+
+ for(map::iterator dataiter = propertyData.begin();
+ dataiter != propertyData.end(); dataiter++){
+
+ if (dataiter->first == "ALTREP"){
+
+ contactListAltRep[objectSeekCount] = dataiter->second;
+
+ } else if (dataiter->first == "LANGUAGE"){
+
+ contactListLanguage[objectSeekCount] = dataiter->second;
+
+ } else {
+
+ if (tokenData == false){
+ tokenData = true;
+ } else {
+ propertyTokens += ";";
+ }
+
+ propertyTokens += dataiter->first;
+ propertyTokens += "=";
+ propertyTokens += dataiter->second;
+
+ }
+
+ }
+
+ if (propertyTokens.size() > 0){
+ contactListTokens[objectSeekCount] = propertyTokens;
+ }
+
+ contactList[objectSeekCount] = iter->second;
+
+ objectSeekCount++;
+
+ }
+
+ // Process the data from EXDATE.
+
+ dataReceived = ProcessTextVectors(&objectName, &objectData, true, "EXDATE");
+
+ objectSeekCount = 0;
+
+ for(multimap::iterator iter = dataReceived.begin();
+ iter != dataReceived.end();
+ ++iter){
+
+ excludeDateDataTokens.push_back("");
+ excludeDateDataValue.push_back("");
+ excludeDateDataTimeZoneParam.push_back("");
+ excludeDateData.push_back("");
+
+ bool tokenData = false;
+ string propertyTokens;
+
+ propertyNameData = (string*)&iter->first;
+
+ propertyData = SplitValues(*propertyNameData);
+
+ for(map::iterator dataiter = propertyData.begin();
+ dataiter != propertyData.end(); dataiter++){
+
+ if (dataiter->first == "VALUE"){
+
+ excludeDateDataValue[objectSeekCount] = dataiter->second;
+
+ } else if (dataiter->first == "TZID"){
+
+ excludeDateDataTimeZoneParam[objectSeekCount] = dataiter->second;
+
+ } else {
+
+ if (tokenData == false){
+ tokenData = true;
+ } else {
+ propertyTokens += ";";
+ }
+
+ propertyTokens += dataiter->first;
+ propertyTokens += "=";
+ propertyTokens += dataiter->second;
+
+ }
+
+ }
+
+ if (propertyTokens.size() > 0){
+ excludeDateDataTokens[objectSeekCount] = propertyTokens;
+ }
+
+ excludeDateData[objectSeekCount] = iter->second;
+
+ objectSeekCount++;
+
+ }
+
+ // Process the data from REQUEST-STATUS.
+
+ dataReceived = ProcessTextVectors(&objectName, &objectData, true, "REQUEST-STATUS");
+
+ objectSeekCount = 0;
+
+ for(multimap::iterator iter = dataReceived.begin();
+ iter != dataReceived.end();
+ ++iter){
+
+ requestStatusTokens.push_back("");
+ requestStatusLanguage.push_back("");
+ requestStatusData.push_back("");
+
+ bool tokenData = false;
+ string propertyTokens;
+
+ propertyNameData = (string*)&iter->first;
+
+ propertyData = SplitValues(*propertyNameData);
+
+ for(map::iterator dataiter = propertyData.begin();
+ dataiter != propertyData.end(); dataiter++){
+
+ if (dataiter->first == "LANGUAGE"){
+
+ requestStatusLanguage[objectSeekCount] = dataiter->second;
+
+ } else {
+
+ if (tokenData == false){
+ tokenData = true;
+ } else {
+ propertyTokens += ";";
+ }
+
+ propertyTokens += dataiter->first;
+ propertyTokens += "=";
+ propertyTokens += dataiter->second;
+
+ }
+
+ }
+
+ if (propertyTokens.size() > 0){
+ requestStatusTokens[objectSeekCount] = propertyTokens;
+ }
+
+ requestStatusData[objectSeekCount] = iter->second;
+
+ objectSeekCount++;
+
+ }
+
+ // Process the data from RELATED-TO.
+
+ dataReceived = ProcessTextVectors(&objectName, &objectData, true, "RELATED-TO");
+
+ objectSeekCount = 0;
+
+ for(multimap::iterator iter = dataReceived.begin();
+ iter != dataReceived.end();
+ ++iter){
+
+ relatedToDataTokens.push_back("");
+ relatedToDataRelationType.push_back("");
+ relatedToData.push_back("");
+
+ bool tokenData = false;
+ string propertyTokens;
+
+ propertyNameData = (string*)&iter->first;
+
+ propertyData = SplitValues(*propertyNameData);
+
+ for(map::iterator dataiter = propertyData.begin();
+ dataiter != propertyData.end(); dataiter++){
+
+ if (dataiter->first == "RELTYPE"){
+
+ relatedToDataRelationType[objectSeekCount] = dataiter->second;
+
+ } else {
+
+ if (tokenData == false){
+ tokenData = true;
+ } else {
+ propertyTokens += ";";
+ }
+
+ propertyTokens += dataiter->first;
+ propertyTokens += "=";
+ propertyTokens += dataiter->second;
+
+ }
+
+ }
+
+ if (propertyTokens.size() > 0){
+ relatedToDataTokens[objectSeekCount] = propertyTokens;
+ }
+
+ relatedToData[objectSeekCount] = iter->second;
+
+ objectSeekCount++;
+
+ }
+
+ // Process the data from RESOURCES.
+
+ dataReceived = ProcessTextVectors(&objectName, &objectData, true, "RESOURCES");
+
+ objectSeekCount = 0;
+
+ for(multimap::iterator iter = dataReceived.begin();
+ iter != dataReceived.end();
+ ++iter){
+
+ resourcesDataTokens.push_back("");
+ resourcesDataAltRep.push_back("");
+ resourcesDataLanguage.push_back("");
+ resourcesData.push_back("");
+
+ bool tokenData = false;
+ string propertyTokens;
+
+ propertyNameData = (string*)&iter->first;
+
+ propertyData = SplitValues(*propertyNameData);
+
+ for(map::iterator dataiter = propertyData.begin();
+ dataiter != propertyData.end(); dataiter++){
+
+ if (dataiter->first == "ALTREP"){
+
+ resourcesDataAltRep[objectSeekCount] = dataiter->second;
+
+ } else if (dataiter->first == "LANGUAGE"){
+
+ resourcesDataLanguage[objectSeekCount] = dataiter->second;
+
+ } else {
+
+ if (tokenData == false){
+ tokenData = true;
+ } else {
+ propertyTokens += ";";
+ }
+
+ propertyTokens += dataiter->first;
+ propertyTokens += "=";
+ propertyTokens += dataiter->second;
+
+ }
+
+ }
+
+ if (propertyTokens.size() > 0){
+ resourcesDataTokens[objectSeekCount] = propertyTokens;
+ }
+
+ resourcesData[objectSeekCount] = iter->second;
+
+ objectSeekCount++;
+
+ }
+
+ // Process the data from RDATE.
+
+ dataReceived = ProcessTextVectors(&objectName, &objectData, true, "RDATE");
+
+ objectSeekCount = 0;
+
+ for(multimap::iterator iter = dataReceived.begin();
+ iter != dataReceived.end();
+ ++iter){
+
+ recurranceDateDataTokens.push_back("");
+ recurranceDateDataValue.push_back("");
+ recurranceDateDataTimeZoneParam.push_back("");
+ recurranceDateData.push_back("");
+
+ bool tokenData = false;
+ string propertyTokens;
+
+ propertyNameData = (string*)&iter->first;
+
+ propertyData = SplitValues(*propertyNameData);
+
+ for(map::iterator dataiter = propertyData.begin();
+ dataiter != propertyData.end(); dataiter++){
+
+ if (dataiter->first == "VALUE"){
+
+ recurranceDateDataValue[objectSeekCount] = dataiter->second;
+
+ } else if (dataiter->first == "TZID"){
+
+ recurranceDateDataTimeZoneParam[objectSeekCount] = dataiter->second;
+
+ } else {
+
+ if (tokenData == false){
+ tokenData = true;
+ } else {
+ propertyTokens += ";";
+ }
+
+ propertyTokens += dataiter->first;
+ propertyTokens += "=";
+ propertyTokens += dataiter->second;
+
+ }
+
+ }
+
+ if (propertyTokens.size() > 0){
+ recurranceDateDataTokens[objectSeekCount] = propertyTokens;
+ }
+
+ recurranceDateData[objectSeekCount] = iter->second;
+
+ objectSeekCount++;
+
+ }
+
+ // Process VALARM section.
+
+ int seekCount = 0;
+ int alarmObjectCount = 0;
+
+ bool alarmActionFound = false;
+
+ for (vector>::iterator iter = eventAlarmName.begin();
+ iter != eventAlarmName.end(); iter++){
+
+ CalendarAlarmDataStruct newAlarmData;
+
+ // Process the data from ACTION.
+
+ bool alarmActionFound = false;
+ bool alarmTriggerFound = false;
+ bool alarmDurationFound = false;
+ bool alarmDescriptionFound = false;
+ bool alarmSummaryFound = false;
+
+ dataReceived = ProcessTextVectors(&eventAlarmName[seekCount],
+ &eventAlarmData[seekCount], false, "ACTION");
+
+ if (dataReceived.begin() != dataReceived.end()){
+
+ try {
+ newAlarmData.alarmActionTokens = dataReceived.begin()->first.substr(7);
+ }
+
+ catch(const out_of_range &oor){
+ // Do nothing as there is no data.
+ }
+
+ newAlarmData.alarmAction = dataReceived.begin()->second;
+ alarmActionFound = true;
+
+ }
+
+ // Check if a value was set for AlarmAction, otherwise
+ // process the next VALARM section.
+
+ if (newAlarmData.alarmAction.size() < 1){
+
+ seekCount++;
+ continue;
+
+ }
+
+ // Check if AlarmAction is DISPLAY, AUDIO or EMAIL.
+ // Process the next VALARM section if not.
+
+ if (newAlarmData.alarmAction == "AUDIO"){
+
+ newAlarmData.alarmType = CALENDARALARM_AUDIO;
+
+ } else if (newAlarmData.alarmAction == "DISPLAY"){
+
+ newAlarmData.alarmType = CALENDARALARM_DISPLAY;
+
+ } else if (newAlarmData.alarmAction == "EMAIL"){
+
+ newAlarmData.alarmType = CALENDARALARM_EMAIL;
+
+ } else {
+
+ seekCount++;
+ continue;
+
+ }
+
+ // Process the data from TRIGGER.
+
+ dataReceived = ProcessTextVectors(&eventAlarmName[seekCount], &eventAlarmData[seekCount], false, "TRIGGER");
+
+ if (dataReceived.begin() != dataReceived.end()){
+
+ bool tokenData = false;
+ string propertyTokens;
+
+ propertyNameData = (string*)&dataReceived.begin()->first;
+
+ propertyData = SplitValues(*propertyNameData);
+
+ for(map::iterator iter = propertyData.begin();
+ iter != propertyData.end(); iter++){
+
+ if (iter->first == "VALUE"){
+
+ newAlarmData.triggerValue = iter->second;
+
+ } else if (iter->first == "RELATED"){
+
+ newAlarmData.triggerRelated = iter->second;
+
+ } else {
+
+ if (tokenData == false){
+ tokenData = true;
+ } else {
+ propertyTokens += ";";
+ }
+
+ propertyTokens += iter->first;
+ propertyTokens += "=";
+ propertyTokens += iter->second;
+
+ }
+
+ }
+
+ if (propertyTokens.size() > 0){
+ newAlarmData.triggerTokens = propertyTokens;
+ }
+
+ newAlarmData.triggerData = dataReceived.begin()->second;
+ alarmTriggerFound = true;
+
+ }
+
+ // Process the data from DESCRIPTION.
+
+ dataReceived = ProcessTextVectors(&eventAlarmName[seekCount], &eventAlarmData[seekCount], false, "DESCRIPTION");
+
+ if (dataReceived.begin() != dataReceived.end() &&
+ (newAlarmData.alarmType == CALENDARALARM_DISPLAY ||
+ newAlarmData.alarmType == CALENDARALARM_EMAIL)){
+
+ bool tokenData = false;
+ string propertyTokens;
+
+ propertyNameData = (string*)&dataReceived.begin()->first;
+
+ propertyData = SplitValues(*propertyNameData);
+
+ for(map::iterator iter = propertyData.begin();
+ iter != propertyData.end(); iter++){
+
+ if (iter->first == "ALTREP"){
+
+ newAlarmData.descriptionAltRep = iter->second;
+
+ } else if (iter->first == "LANGUAGE"){
+
+ newAlarmData.descriptionLanguage = iter->second;
+
+ } else {
+
+ if (tokenData == false){
+ tokenData = true;
+ } else {
+ propertyTokens += ";";
+ }
+
+ propertyTokens += iter->first;
+ propertyTokens += "=";
+ propertyTokens += iter->second;
+
+ }
+
+ }
+
+ if (propertyTokens.size() > 0){
+ newAlarmData.descriptionTokens = propertyTokens;
+ }
+
+ newAlarmData.descriptionData = dataReceived.begin()->second;
+ alarmDescriptionFound = true;
+
+ }
+
+ // Process data from SUMMARY.
+
+ dataReceived = ProcessTextVectors(&eventAlarmName[seekCount], &eventAlarmData[seekCount], false, "SUMMARY");
+
+ if (dataReceived.begin() != dataReceived.end() &&
+ newAlarmData.alarmType == CALENDARALARM_EMAIL){
+
+ bool tokenData = false;
+ string propertyTokens;
+
+ propertyNameData = (string*)&dataReceived.begin()->first;
+
+ propertyData = SplitValues(*propertyNameData);
+
+ for(map::iterator iter = propertyData.begin();
+ iter != propertyData.end(); iter++){
+
+ if (iter->first == "ALTREP"){
+
+ newAlarmData.summaryAltRep = iter->second;
+
+ } else if (iter->first == "LANGUAGE"){
+
+ newAlarmData.summaryLanguage = iter->second;
+
+ } else {
+
+ if (tokenData == false){
+ tokenData = true;
+ } else {
+ propertyTokens += ";";
+ }
+
+ propertyTokens += iter->first;
+ propertyTokens += "=";
+ propertyTokens += iter->second;
+
+ }
+
+ }
+
+ if (propertyTokens.size() > 0){
+ newAlarmData.summaryTokens = propertyTokens;
+ }
+
+ newAlarmData.summaryData = dataReceived.begin()->second;
+ alarmSummaryFound = true;
+
+ }
+
+ // Process data from DURATION.
+
+ dataReceived = ProcessTextVectors(&eventAlarmName[seekCount], &eventAlarmData[seekCount], false, "DURATION");
+
+ if (dataReceived.begin() != dataReceived.end()){
+
+ try {
+ newAlarmData.durationTokens = dataReceived.begin()->first.substr(9);
+ }
+
+ catch(const out_of_range &oor){
+ // Do nothing as there is no data.
+ }
+
+ newAlarmData.durationData = dataReceived.begin()->second;
+ alarmDurationFound = true;
+
+ }
+
+ // Process data from REPEAT.
+
+ dataReceived = ProcessTextVectors(&eventAlarmName[seekCount], &eventAlarmData[seekCount], false, "REPEAT");
+
+ if (dataReceived.begin() != dataReceived.end() && alarmDurationFound == true){
+
+ try {
+ newAlarmData.repeatTokens = dataReceived.begin()->first.substr(7);
+ }
+
+ catch(const out_of_range &oor){
+ // Do nothing as there is no data.
+ }
+
+ newAlarmData.repeatData = dataReceived.begin()->second;
+
+ } else {
+
+ newAlarmData.durationData.clear();
+ newAlarmData.durationTokens.clear();
+
+ }
+
+ // Process data from ATTENDEE.
+
+ dataReceived = ProcessTextVectors(&eventAlarmName[seekCount], &eventAlarmData[seekCount], true, "ATTENDEE");
+
+ objectSeekCount = 0;
+
+ for(multimap::iterator iter = dataReceived.begin();
+ iter != dataReceived.end();
+ ++iter){
+
+ newAlarmData.attendeeListMember.push_back("");
+ newAlarmData.attendeeListDelegatedFrom.push_back("");
+ newAlarmData.attendeeListDelegatedTo.push_back("");
+ newAlarmData.attendeeListRole.push_back("");
+ newAlarmData.attendeeListRSVP.push_back("");
+ newAlarmData.attendeeListDirectoryEntry.push_back("");
+ newAlarmData.attendeeListSentBy.push_back("");
+ newAlarmData.attendeeListCommonName.push_back("");
+ newAlarmData.attendeeListCalendarUserType.push_back("");
+ newAlarmData.attendeeListParticipationStatus.push_back("");
+ newAlarmData.attendeeListLanguage.push_back("");
+ newAlarmData.attendeeListTokens.push_back("");
+ newAlarmData.attendeeList.push_back("");
+
+ bool tokenData = false;
+ string propertyTokens;
+
+ propertyNameData = (string*)&iter->first;
+
+ propertyData = SplitValues(*propertyNameData);
+
+ for(map::iterator dataiter = propertyData.begin();
+ dataiter != propertyData.end(); dataiter++){
+
+ if (dataiter->first == "CUTYPE"){
+
+ newAlarmData.attendeeListCalendarUserType[objectSeekCount] = dataiter->second;
+
+ } else if (dataiter->first == "MEMBER"){
+
+ newAlarmData.attendeeListMember[objectSeekCount] = dataiter->second;
+
+ } else if (dataiter->first == "ROLE"){
+
+ newAlarmData.attendeeListRole[objectSeekCount] = dataiter->second;
+
+ } else if (dataiter->first == "PARTSTAT"){
+
+ newAlarmData.attendeeListParticipationStatus[objectSeekCount] = dataiter->second;
+
+ } else if (dataiter->first == "RSVP"){
+
+ newAlarmData.attendeeListRSVP[objectSeekCount] = dataiter->second;
+
+ } else if (dataiter->first == "DELEGATED-TO"){
+
+ newAlarmData.attendeeListDelegatedTo[objectSeekCount] = dataiter->second;
+
+ } else if (dataiter->first == "DELEGATED-FROM"){
+
+ newAlarmData.attendeeListDelegatedFrom[objectSeekCount] = dataiter->second;
+
+ } else if (dataiter->first == "SENT-BY"){
+
+ newAlarmData.attendeeListSentBy[objectSeekCount] = dataiter->second;
+
+ } else if (dataiter->first == "CN"){
+
+ newAlarmData.attendeeListCommonName[objectSeekCount] = dataiter->second;
+
+ } else if (dataiter->first == "DIR"){
+
+ newAlarmData.attendeeListDirectoryEntry[objectSeekCount] = dataiter->second;
+
+ } else if (dataiter->first == "LANGUAGE"){
+
+ newAlarmData.attendeeListLanguage[objectSeekCount] = dataiter->second;
+
+ } else {
+
+ if (tokenData == false){
+ tokenData = true;
+ } else {
+ propertyTokens += ";";
+ }
+
+ propertyTokens += dataiter->first;
+ propertyTokens += "=";
+ propertyTokens += dataiter->second;
+
+ }
+
+ }
+
+ if (propertyTokens.size() > 0){
+ newAlarmData.attendeeListTokens[objectSeekCount] = propertyTokens;
+ }
+
+ newAlarmData.attendeeList[objectSeekCount] = iter->second;
+
+ objectSeekCount++;
+
+ }
+
+ // Process data from ATTACH.
+
+ dataReceived = ProcessTextVectors(&eventAlarmName[seekCount], &eventAlarmData[seekCount], true, "ATTACH");
+
+ objectSeekCount = 0;
+
+ for(multimap::iterator iter = dataReceived.begin();
+ iter != dataReceived.end();
+ ++iter){
+
+ newAlarmData.attachListEncoding.push_back("");
+ newAlarmData.attachListValue.push_back("");
+ newAlarmData.attachListFormatType.push_back("");
+ newAlarmData.attachListTokens.push_back("");
+ newAlarmData.attachList.push_back("");
+
+ bool tokenData = false;
+ string propertyTokens;
+
+ propertyNameData = (string*)&iter->first;
+
+ propertyData = SplitValues(*propertyNameData);
+
+ for(map::iterator dataiter = propertyData.begin();
+ dataiter != propertyData.end(); dataiter++){
+
+ if (dataiter->first == "ENCODING"){
+
+ newAlarmData.attachListEncoding[objectSeekCount] = dataiter->second;
+
+ } else if (dataiter->first == "VALUE"){
+
+ newAlarmData.attachListValue[objectSeekCount] = dataiter->second;
+
+ } else if (dataiter->first == "FMTTYPE"){
+
+ newAlarmData.attachListFormatType[objectSeekCount] = dataiter->second;
+
+ } else {
+
+ if (tokenData == false){
+ tokenData = true;
+ } else {
+ propertyTokens += ";";
+ }
+
+ propertyTokens += dataiter->first;
+ propertyTokens += "=";
+ propertyTokens += dataiter->second;
+
+ }
+
+ }
+
+ if (propertyTokens.size() > 0){
+ newAlarmData.attachListTokens[objectSeekCount] = propertyTokens;
+ }
+
+ newAlarmData.attachList[objectSeekCount] = iter->second;
+
+ objectSeekCount++;
+
+ }
+
+ // Process data from X-*
+
+ alarmObjectCount = 0;
+
+ for(vector::iterator xtokeniter = eventAlarmName[seekCount].begin();
+ xtokeniter != eventAlarmName[seekCount].end(); ++xtokeniter){
+
+ bool tokenData = false;
+ string propertyTokens;
+
+ if (xtokeniter->substr(0,2) == "X-" &&
+ xtokeniter->size() > 2){
+
+ newAlarmData.xTokensData.push_back(eventAlarmData[seekCount][alarmObjectCount]);
+ newAlarmData.xTokensDataTokens.push_back(eventAlarmName[seekCount][alarmObjectCount]);
+
+ }
+
+ alarmObjectCount++;
+
+ }
+
+ if (newAlarmData.alarmType == CALENDARALARM_AUDIO &&
+ alarmActionFound == true &&
+ alarmTriggerFound == true){
+
+ calendarAlarmData.push_back(newAlarmData);
+
+ } else if (newAlarmData.alarmType == CALENDARALARM_DISPLAY &&
+ alarmActionFound == true &&
+ alarmTriggerFound == true &&
+ alarmDescriptionFound == true){
+
+ calendarAlarmData.push_back(newAlarmData);
+
+ } else if (newAlarmData.alarmType == CALENDARALARM_EMAIL &&
+ alarmActionFound == true &&
+ alarmTriggerFound == true &&
+ alarmDescriptionFound == true &&
+ alarmSummaryFound == true){
+
+ calendarAlarmData.push_back(newAlarmData);
+
+ }
+
+ seekCount++;
+
+ }
+
+ objectSeekCount = 0;
+
+ // Process data from X-*
+
+ for(vector::iterator iter = objectName.begin();
+ iter != objectName.end(); ++iter){
+
+ bool tokenData = false;
+ string propertyTokens;
+
+ if (iter->substr(0,2) == "X-" &&
+ iter->size() > 2){
+
+ xTokensData.push_back(objectData[objectSeekCount]);
+ xTokensDataTokens.push_back(objectName[objectSeekCount]);
+
+ }
+
+ objectSeekCount++;
}