X-Git-Url: http://Server1/repobrowser/?a=blobdiff_plain;ds=inline;f=source%2Fobjects%2Fcalendarjournal%2FCalendarJournal.cpp;h=5275dff12eb19de2efe35afa922ab4a8d50ad6e3;hb=refs%2Ftags%2Frelease-0.02;hp=115ecb3dde6693ed04f68bf4c7e405af59da168d;hpb=54406b8198be11d7ad2fa933f3caa100f9b57393;p=xestiacalendar%2F.git
diff --git a/source/objects/calendarjournal/CalendarJournal.cpp b/source/objects/calendarjournal/CalendarJournal.cpp
index 115ecb3..5275dff 100644
--- a/source/objects/calendarjournal/CalendarJournal.cpp
+++ b/source/objects/calendarjournal/CalendarJournal.cpp
@@ -1,130 +1,148 @@
+// CalendarJournal.cpp - CalendarJournal 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 "CalendarJournal.h"
using namespace std;
CalendarObjectValidResult CalendarJournalObject::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:VJOURNAL.
- 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] == "VJOURNAL"){
+ if (objectName[seekCount] == "BEGIN" &&
+ objectData[seekCount] == "VJOURNAL"){
- if (ValidBegin == false){
- ValidBegin = true;
+ if (validBegin == false){
+ validBegin = true;
} else {
return CALENDAROBJECTVALID_INVALIDFORMAT;
}
}
- if (ObjectName[SeekCount] == "END" &&
- ObjectData[SeekCount] == "VJOURNAL" &&
- ValidBegin == false){
+ if (objectName[seekCount] == "END" &&
+ objectData[seekCount] == "VJOURNAL" &&
+ 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:VJOURNAL.
- 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] == "VJOURNAL"){
+ if (objectName[seekCount] == "END" &&
+ objectData[seekCount] == "VJOURNAL"){
- if (ValidEnd == false){
- ValidEnd = true;
+ if (validEnd == false){
+ validEnd = true;
} else {
return CALENDAROBJECTVALID_INVALIDFORMAT;
}
}
- SeekCount++;
+ seekCount++;
}
// Check if the VJOURNAL is valid.
- if (ValidBegin == true &&
- ValidEnd == true &&
- ValidDateTimeStamp == true &&
- ValidUniqueID == true){
+ if (validBegin == true &&
+ validEnd == true &&
+ validDateTimeStamp == true &&
+ validUniqueID == true){
return CALENDAROBJECTVALID_OK;
@@ -140,257 +158,257 @@ void CalendarJournalObject::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;
}
// Get the Date Time Start value.
- DataReceived = ProcessTextVectors(&ObjectName, &ObjectData, false, "DTSTART");
+ dataReceived = ProcessTextVectors(&objectName, &objectData, false, "DTSTART");
// Process the data from DTSTART.
- if (DataReceived.begin() != DataReceived.end()){
+ if (dataReceived.begin() != dataReceived.end()){
- bool TokenData = false;
- string PropertyTokens;
+ bool tokenData = false;
+ string propertyTokens;
- PropertyNameData = (string*)&DataReceived.begin()->first;
+ propertyNameData = (string*)&dataReceived.begin()->first;
- PropertyData = SplitValues(*PropertyNameData);
+ propertyData = SplitValues(*propertyNameData);
- for(map::iterator iter = PropertyData.begin();
- iter != PropertyData.end(); iter++){
+ for(map::iterator iter = propertyData.begin();
+ iter != propertyData.end(); iter++){
if (iter->first == "VALUE"){
- DateTimeStartDataValue = iter->second;
+ dateTimeStartDataValue = iter->second;
} else if (iter->first == "TZID"){
- DateTimeStartDataTimeZoneID = iter->second;
+ dateTimeStartDataTimeZoneID = iter->second;
} else {
- if (TokenData == false){
- TokenData = true;
+ if (tokenData == false){
+ tokenData = true;
} else {
- PropertyTokens += ";";
+ propertyTokens += ";";
}
- PropertyTokens += iter->first;
- PropertyTokens += "=";
- PropertyTokens += iter->second;
+ propertyTokens += iter->first;
+ propertyTokens += "=";
+ propertyTokens += iter->second;
}
}
- if (PropertyTokens.size() > 0){
- DateTimeStartDataTokens = PropertyTokens;
+ if (propertyTokens.size() > 0){
+ dateTimeStartDataTokens = propertyTokens;
}
- DateTimeStartData = DataReceived.begin()->second;
+ dateTimeStartData = dataReceived.begin()->second;
}
// Process the data from LAST-MODIFIED.
- DataReceived = ProcessTextVectors(&ObjectName, &ObjectData, false, "LAST-MODIFIED");
+ dataReceived = ProcessTextVectors(&objectName, &objectData, false, "LAST-MODIFIED");
- if (DataReceived.begin() != DataReceived.end()){
+ if (dataReceived.begin() != dataReceived.end()){
try {
- LastModifiedTokens = DataReceived.begin()->first.substr(14);
+ lastModifiedTokens = dataReceived.begin()->first.substr(14);
}
catch(const out_of_range &oor){
// Do nothing as there is no data.
}
- LastModifiedData = DataReceived.begin()->second;
+ lastModifiedData = dataReceived.begin()->second;
}
// Process the data from ORGANIZER.
- DataReceived = ProcessTextVectors(&ObjectName, &ObjectData, false, "ORGANIZER");
+ dataReceived = ProcessTextVectors(&objectName, &objectData, false, "ORGANIZER");
- if (DataReceived.begin() != DataReceived.end()){
+ if (dataReceived.begin() != dataReceived.end()){
- bool TokenData = false;
- string PropertyTokens;
+ bool tokenData = false;
+ string propertyTokens;
- PropertyNameData = (string*)&DataReceived.begin()->first;
+ propertyNameData = (string*)&dataReceived.begin()->first;
- PropertyData = SplitValues(*PropertyNameData);
+ propertyData = SplitValues(*propertyNameData);
- for(map::iterator iter = PropertyData.begin();
- iter != PropertyData.end(); iter++){
+ for(map::iterator iter = propertyData.begin();
+ iter != propertyData.end(); iter++){
if (iter->first == "CN"){
- OrganiserDataCommonName = iter->second;
+ organiserDataCommonName = iter->second;
} else if (iter->first == "DIR"){
- OrganiserDataDirectoryEntry = iter->second;
+ organiserDataDirectoryEntry = iter->second;
} else if (iter->first == "SENT-BY"){
- OrganiserDataSentByParam = iter->second;
+ organiserDataSentByParam = iter->second;
} else if (iter->first == "LANGUAGE"){
- OrganiserDataLanguage = iter->second;
+ organiserDataLanguage = iter->second;
} else {
- if (TokenData == false){
- TokenData = true;
+ if (tokenData == false){
+ tokenData = true;
} else {
- PropertyTokens += ";";
+ propertyTokens += ";";
}
- PropertyTokens += iter->first;
- PropertyTokens += "=";
- PropertyTokens += iter->second;
+ propertyTokens += iter->first;
+ propertyTokens += "=";
+ propertyTokens += iter->second;
}
}
- if (PropertyTokens.size() > 0){
+ if (propertyTokens.size() > 0){
- OrganiserDataTokens = PropertyTokens;
+ organiserDataTokens = propertyTokens;
}
- OrganiserData = DataReceived.begin()->second;
+ organiserData = dataReceived.begin()->second;
}
// Process the data from RECURRENCE-ID.
- DataReceived = ProcessTextVectors(&ObjectName, &ObjectData, false, "RECURRENCE-ID");
+ dataReceived = ProcessTextVectors(&objectName, &objectData, false, "RECURRENCE-ID");
- if (DataReceived.begin() != DataReceived.end()){
+ if (dataReceived.begin() != dataReceived.end()){
- bool TokenData = false;
- string PropertyTokens;
+ bool tokenData = false;
+ string propertyTokens;
- PropertyNameData = (string*)&DataReceived.begin()->first;
+ propertyNameData = (string*)&dataReceived.begin()->first;
- PropertyData = SplitValues(*PropertyNameData);
+ propertyData = SplitValues(*propertyNameData);
- for(map::iterator iter = PropertyData.begin();
- iter != PropertyData.end(); iter++){
+ for(map::iterator iter = propertyData.begin();
+ iter != propertyData.end(); iter++){
if (iter->first == "TZID"){
- RecurranceIDDataTimeZoneParam = iter->second;
+ recurranceIDDataTimeZoneParam = iter->second;
} else if (iter->first == "VALUE"){
- RecurranceIDDataValue = iter->second;
+ recurranceIDDataValue = iter->second;
} else if (iter->first == "RANGE"){
- RecurranceIDDataRangeParam = iter->second;
+ recurranceIDDataRangeParam = iter->second;
} else {
- if (TokenData == false){
- TokenData = true;
+ if (tokenData == false){
+ tokenData = true;
} else {
- PropertyTokens += ";";
+ propertyTokens += ";";
}
- PropertyTokens += iter->first;
- PropertyTokens += "=";
- PropertyTokens += iter->second;
+ propertyTokens += iter->first;
+ propertyTokens += "=";
+ propertyTokens += iter->second;
}
}
- if (PropertyTokens.size() > 0){
+ if (propertyTokens.size() > 0){
- RecurranceIDDataTokens = PropertyTokens;
+ recurranceIDDataTokens = propertyTokens;
}
- RecurranceIDData = DataReceived.begin()->second;
+ recurranceIDData = dataReceived.begin()->second;
}
// Process the data from SEQUENCE.
- DataReceived = ProcessTextVectors(&ObjectName, &ObjectData, false, "SEQUENCE");
+ dataReceived = ProcessTextVectors(&objectName, &objectData, false, "SEQUENCE");
- if (DataReceived.begin() != DataReceived.end()){
+ if (dataReceived.begin() != dataReceived.end()){
try {
- SequenceTokens = DataReceived.begin()->first.substr(9);
+ sequenceTokens = dataReceived.begin()->first.substr(9);
}
catch(const out_of_range &oor){
@@ -398,713 +416,789 @@ void CalendarJournalObject::ProcessData(){
}
try {
- SequenceData = stoi(DataReceived.begin()->second);
+ sequenceData = stoi(dataReceived.begin()->second);
}
catch(const invalid_argument &oor){
- SequenceTokens.clear();
+ sequenceTokens.clear();
}
}
// Process the data from STATUS.
- DataReceived = ProcessTextVectors(&ObjectName, &ObjectData, false, "STATUS");
+ dataReceived = ProcessTextVectors(&objectName, &objectData, false, "STATUS");
- if (DataReceived.begin() != DataReceived.end()){
+ if (dataReceived.begin() != dataReceived.end()){
- bool TokenData = false;
- string PropertyTokens;
+ bool tokenData = false;
+ string propertyTokens;
- PropertyNameData = (string*)&DataReceived.begin()->first;
+ propertyNameData = (string*)&dataReceived.begin()->first;
- PropertyData = SplitValues(*PropertyNameData);
+ propertyData = SplitValues(*propertyNameData);
- for(map::iterator iter = PropertyData.begin();
- iter != PropertyData.end(); iter++){
+ for(map::iterator iter = propertyData.begin();
+ iter != propertyData.end(); iter++){
if (iter->first == "LANGUAGE"){
- StatusLanguage = iter->second;
+ statusLanguage = iter->second;
} else {
- if (TokenData == false){
- TokenData = true;
+ if (tokenData == false){
+ tokenData = true;
} else {
- PropertyTokens += ";";
+ propertyTokens += ";";
}
- PropertyTokens += iter->first;
- PropertyTokens += "=";
- PropertyTokens += iter->second;
+ propertyTokens += iter->first;
+ propertyTokens += "=";
+ propertyTokens += iter->second;
}
}
- if (PropertyTokens.size() > 0){
+ if (propertyTokens.size() > 0){
- StatusTokens = PropertyTokens;
+ statusTokens = propertyTokens;
}
- StatusData = DataReceived.begin()->second;
+ statusData = dataReceived.begin()->second;
}
// Process the data from SUMMARY.
- DataReceived = ProcessTextVectors(&ObjectName, &ObjectData, false, "SUMMARY");
+ dataReceived = ProcessTextVectors(&objectName, &objectData, false, "SUMMARY");
- if (DataReceived.begin() != DataReceived.end()){
+ if (dataReceived.begin() != dataReceived.end()){
- bool TokenData = false;
- string PropertyTokens;
+ bool tokenData = false;
+ string propertyTokens;
- PropertyNameData = (string*)&DataReceived.begin()->first;
+ propertyNameData = (string*)&dataReceived.begin()->first;
- PropertyData = SplitValues(*PropertyNameData);
+ propertyData = SplitValues(*propertyNameData);
- for(map::iterator iter = PropertyData.begin();
- iter != PropertyData.end(); iter++){
+ for(map::iterator iter = propertyData.begin();
+ iter != propertyData.end(); iter++){
if (iter->first == "ALTREP"){
- SummaryDataAltRep = iter->second;
+ summaryDataAltRep = iter->second;
} else if (iter->first == "LANGUAGE"){
- SummaryDataLanguage = iter->second;
+ summaryDataLanguage = iter->second;
} else {
- if (TokenData == false){
- TokenData = true;
+ if (tokenData == false){
+ tokenData = true;
} else {
- PropertyTokens += ";";
+ propertyTokens += ";";
}
- PropertyTokens += iter->first;
- PropertyTokens += "=";
- PropertyTokens += iter->second;
+ propertyTokens += iter->first;
+ propertyTokens += "=";
+ propertyTokens += iter->second;
}
}
- if (PropertyTokens.size() > 0){
+ if (propertyTokens.size() > 0){
- SummaryDataTokens = PropertyTokens;
+ summaryDataTokens = propertyTokens;
}
- SummaryData = DataReceived.begin()->second;
+ summaryData = dataReceived.begin()->second;
}
// Process the data from URL.
- DataReceived = ProcessTextVectors(&ObjectName, &ObjectData, false, "URL");
+ dataReceived = ProcessTextVectors(&objectName, &objectData, false, "URL");
- if (DataReceived.begin() != DataReceived.end()){
+ if (dataReceived.begin() != dataReceived.end()){
try {
- URLDataTokens = DataReceived.begin()->first.substr(4);
+ urlDataTokens = dataReceived.begin()->first.substr(4);
}
catch(const out_of_range &oor){
// Do nothing as there is no data.
}
- URLData = DataReceived.begin()->second;
+ urlData = dataReceived.begin()->second;
}
// Process the data from RRULE.
- DataReceived = ProcessTextVectors(&ObjectName, &ObjectData, false, "RRULE");
+ dataReceived = ProcessTextVectors(&objectName, &objectData, false, "RRULE");
- if (DataReceived.begin() != DataReceived.end()){
+ if (dataReceived.begin() != dataReceived.end()){
try {
- RecurranceRuleDataTokens = DataReceived.begin()->first.substr(6);
+ recurranceRuleDataTokens = dataReceived.begin()->first.substr(6);
}
catch(const out_of_range &oor){
// Do nothing as there is no data.
}
- RecurranceRuleData = DataReceived.begin()->second;
+ recurranceRuleData = dataReceived.begin()->second;
}
// Process the data from ATTACH.
- DataReceived = ProcessTextVectors(&ObjectName, &ObjectData, true, "ATTACH");
+ dataReceived = ProcessTextVectors(&objectName, &objectData, true, "ATTACH");
- for(multimap::iterator iter = DataReceived.begin();
- iter != DataReceived.end();
+ 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("");
+ attachListEncoding.push_back("");
+ attachListValue.push_back("");
+ attachListFormatType.push_back("");
+ attachListTokens.push_back("");
+ attachList.push_back("");
- bool TokenData = false;
- string PropertyTokens;
+ bool tokenData = false;
+ string propertyTokens;
- PropertyNameData = (string*)&iter->first;
+ propertyNameData = (string*)&iter->first;
- PropertyData = SplitValues(*PropertyNameData);
+ propertyData = SplitValues(*propertyNameData);
- for(map::iterator dataiter = PropertyData.begin();
- dataiter != PropertyData.end(); dataiter++){
+ for(map::iterator dataiter = propertyData.begin();
+ dataiter != propertyData.end(); dataiter++){
if (dataiter->first == "ENCODING"){
- AttachListEncoding[ObjectSeekCount] = dataiter->second;
+ attachListEncoding[objectSeekCount] = dataiter->second;
} else if (dataiter->first == "VALUE"){
- AttachListValue[ObjectSeekCount] = dataiter->second;
+ attachListValue[objectSeekCount] = dataiter->second;
} else if (dataiter->first == "FMTTYPE"){
- AttachListFormatType[ObjectSeekCount] = dataiter->second;
+ attachListFormatType[objectSeekCount] = dataiter->second;
} else {
- if (TokenData == false){
- TokenData = true;
+ if (tokenData == false){
+ tokenData = true;
} else {
- PropertyTokens += ";";
+ propertyTokens += ";";
}
- PropertyTokens += dataiter->first;
- PropertyTokens += "=";
- PropertyTokens += dataiter->second;
+ propertyTokens += dataiter->first;
+ propertyTokens += "=";
+ propertyTokens += dataiter->second;
}
}
- if (PropertyTokens.size() > 0){
- AttachListTokens[ObjectSeekCount] = PropertyTokens;
+ if (propertyTokens.size() > 0){
+ attachListTokens[objectSeekCount] = propertyTokens;
}
- AttachList[ObjectSeekCount] = iter->second;
+ attachList[objectSeekCount] = iter->second;
- ObjectSeekCount++;
+ objectSeekCount++;
}
// Process the data from ATTENDEE.
- DataReceived = ProcessTextVectors(&ObjectName, &ObjectData, true, "ATTENDEE");
+ dataReceived = ProcessTextVectors(&objectName, &objectData, true, "ATTENDEE");
- ObjectSeekCount = 0;
+ objectSeekCount = 0;
- for(multimap::iterator iter = DataReceived.begin();
- iter != DataReceived.end();
+ 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("");
+ 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;
+ bool tokenData = false;
+ string propertyTokens;
- PropertyNameData = (string*)&iter->first;
+ propertyNameData = (string*)&iter->first;
- PropertyData = SplitValues(*PropertyNameData);
+ propertyData = SplitValues(*propertyNameData);
- for(map::iterator dataiter = PropertyData.begin();
- dataiter != PropertyData.end(); dataiter++){
+ for(map::iterator dataiter = propertyData.begin();
+ dataiter != propertyData.end(); dataiter++){
if (dataiter->first == "CUTYPE"){
- AttendeeListCalendarUserType[ObjectSeekCount] = dataiter->second;
+ attendeeListCalendarUserType[objectSeekCount] = dataiter->second;
} else if (dataiter->first == "MEMBER"){
- AttendeeListMember[ObjectSeekCount] = dataiter->second;
+ attendeeListMember[objectSeekCount] = dataiter->second;
} else if (dataiter->first == "ROLE"){
- AttendeeListRole[ObjectSeekCount] = dataiter->second;
+ attendeeListRole[objectSeekCount] = dataiter->second;
} else if (dataiter->first == "PARTSTAT"){
- AttendeeListParticipationStatus[ObjectSeekCount] = dataiter->second;
+ attendeeListParticipationStatus[objectSeekCount] = dataiter->second;
} else if (dataiter->first == "RSVP"){
- AttendeeListRSVP[ObjectSeekCount] = dataiter->second;
+ attendeeListRSVP[objectSeekCount] = dataiter->second;
} else if (dataiter->first == "DELEGATED-TO"){
- AttendeeListDelegatedTo[ObjectSeekCount] = dataiter->second;
+ attendeeListDelegatedTo[objectSeekCount] = dataiter->second;
} else if (dataiter->first == "DELEGATED-FROM"){
- AttendeeListDelegatedFrom[ObjectSeekCount] = dataiter->second;
+ attendeeListDelegatedFrom[objectSeekCount] = dataiter->second;
} else if (dataiter->first == "SENT-BY"){
- AttendeeListSentBy[ObjectSeekCount] = dataiter->second;
+ attendeeListSentBy[objectSeekCount] = dataiter->second;
} else if (dataiter->first == "CN"){
- AttendeeListCommonName[ObjectSeekCount] = dataiter->second;
+ attendeeListCommonName[objectSeekCount] = dataiter->second;
} else if (dataiter->first == "DIR"){
- AttendeeListDirectoryEntry[ObjectSeekCount] = dataiter->second;
+ attendeeListDirectoryEntry[objectSeekCount] = dataiter->second;
} else if (dataiter->first == "LANGUAGE"){
- AttendeeListLanguage[ObjectSeekCount] = dataiter->second;
+ attendeeListLanguage[objectSeekCount] = dataiter->second;
} else {
- if (TokenData == false){
- TokenData = true;
+ if (tokenData == false){
+ tokenData = true;
} else {
- PropertyTokens += ";";
+ propertyTokens += ";";
}
- PropertyTokens += dataiter->first;
- PropertyTokens += "=";
- PropertyTokens += dataiter->second;
+ propertyTokens += dataiter->first;
+ propertyTokens += "=";
+ propertyTokens += dataiter->second;
}
}
- if (PropertyTokens.size() > 0){
- AttendeeListTokens[ObjectSeekCount] = PropertyTokens;
+ if (propertyTokens.size() > 0){
+ attendeeListTokens[objectSeekCount] = propertyTokens;
}
- AttendeeList[ObjectSeekCount] = iter->second;
+ attendeeList[objectSeekCount] = iter->second;
- ObjectSeekCount++;
+ objectSeekCount++;
}
// Process the data from CATEGORIES.
- DataReceived = ProcessTextVectors(&ObjectName, &ObjectData, true, "CATEGORIES");
+ dataReceived = ProcessTextVectors(&objectName, &objectData, true, "CATEGORIES");
- ObjectSeekCount = 0;
+ objectSeekCount = 0;
- for(multimap::iterator iter = DataReceived.begin();
- iter != DataReceived.end();
+ for(multimap::iterator iter = dataReceived.begin();
+ iter != dataReceived.end();
++iter){
- CategoriesListTokens.push_back("");
- CategoriesListLanguage.push_back("");
- CategoriesList.push_back("");
+ categoriesListTokens.push_back("");
+ categoriesListLanguage.push_back("");
+ categoriesList.push_back("");
- bool TokenData = false;
- string PropertyTokens;
+ bool tokenData = false;
+ string propertyTokens;
- PropertyNameData = (string*)&iter->first;
+ propertyNameData = (string*)&iter->first;
- PropertyData = SplitValues(*PropertyNameData);
+ propertyData = SplitValues(*propertyNameData);
- for(map::iterator dataiter = PropertyData.begin();
- dataiter != PropertyData.end(); dataiter++){
+ for(map::iterator dataiter = propertyData.begin();
+ dataiter != propertyData.end(); dataiter++){
if (dataiter->first == "LANGUAGE"){
- CategoriesListLanguage[ObjectSeekCount] = dataiter->second;
+ categoriesListLanguage[objectSeekCount] = dataiter->second;
} else {
- if (TokenData == false){
- TokenData = true;
+ if (tokenData == false){
+ tokenData = true;
} else {
- PropertyTokens += ";";
+ propertyTokens += ";";
}
- PropertyTokens += dataiter->first;
- PropertyTokens += "=";
- PropertyTokens += dataiter->second;
+ propertyTokens += dataiter->first;
+ propertyTokens += "=";
+ propertyTokens += dataiter->second;
}
}
- if (PropertyTokens.size() > 0){
- CategoriesListTokens[ObjectSeekCount] = PropertyTokens;
+ if (propertyTokens.size() > 0){
+ categoriesListTokens[objectSeekCount] = propertyTokens;
}
- CategoriesList[ObjectSeekCount] = iter->second;
+ categoriesList[objectSeekCount] = iter->second;
- ObjectSeekCount++;
+ objectSeekCount++;
}
// Process the data from COMMENT.
- DataReceived = ProcessTextVectors(&ObjectName, &ObjectData, true, "COMMENT");
+ dataReceived = ProcessTextVectors(&objectName, &objectData, true, "COMMENT");
- ObjectSeekCount = 0;
+ objectSeekCount = 0;
- for(multimap::iterator iter = DataReceived.begin();
- iter != DataReceived.end();
+ for(multimap::iterator iter = dataReceived.begin();
+ iter != dataReceived.end();
++iter){
- CommentListTokens.push_back("");
- CommentListAltRep.push_back("");
- CommentListLanguage.push_back("");
- CommentList.push_back("");
+ commentListTokens.push_back("");
+ commentListAltRep.push_back("");
+ commentListLanguage.push_back("");
+ commentList.push_back("");
- bool TokenData = false;
- string PropertyTokens;
+ bool tokenData = false;
+ string propertyTokens;
- PropertyNameData = (string*)&iter->first;
+ propertyNameData = (string*)&iter->first;
- PropertyData = SplitValues(*PropertyNameData);
+ propertyData = SplitValues(*propertyNameData);
- for(map::iterator dataiter = PropertyData.begin();
- dataiter != PropertyData.end(); dataiter++){
+ for(map::iterator dataiter = propertyData.begin();
+ dataiter != propertyData.end(); dataiter++){
if (dataiter->first == "ALTREP"){
- CommentListAltRep[ObjectSeekCount] = dataiter->second;
+ commentListAltRep[objectSeekCount] = dataiter->second;
} else if (dataiter->first == "LANGUAGE"){
- CommentListLanguage[ObjectSeekCount] = dataiter->second;
+ commentListLanguage[objectSeekCount] = dataiter->second;
} else {
- if (TokenData == false){
- TokenData = true;
+ if (tokenData == false){
+ tokenData = true;
} else {
- PropertyTokens += ";";
+ propertyTokens += ";";
}
- PropertyTokens += dataiter->first;
- PropertyTokens += "=";
- PropertyTokens += dataiter->second;
+ propertyTokens += dataiter->first;
+ propertyTokens += "=";
+ propertyTokens += dataiter->second;
}
}
- if (PropertyTokens.size() > 0){
- CommentListTokens[ObjectSeekCount] = PropertyTokens;
+ if (propertyTokens.size() > 0){
+ commentListTokens[objectSeekCount] = propertyTokens;
}
- CommentList[ObjectSeekCount] = iter->second;
+ commentList[objectSeekCount] = iter->second;
- ObjectSeekCount++;
+ objectSeekCount++;
}
// Process the data from CONTACT.
- DataReceived = ProcessTextVectors(&ObjectName, &ObjectData, true, "CONTACT");
+ dataReceived = ProcessTextVectors(&objectName, &objectData, true, "CONTACT");
- ObjectSeekCount = 0;
+ objectSeekCount = 0;
- for(multimap::iterator iter = DataReceived.begin();
- iter != DataReceived.end();
+ for(multimap::iterator iter = dataReceived.begin();
+ iter != dataReceived.end();
++iter){
- ContactListTokens.push_back("");
- ContactListAltRep.push_back("");
- ContactListLanguage.push_back("");
- ContactList.push_back("");
+ contactListTokens.push_back("");
+ contactListAltRep.push_back("");
+ contactListLanguage.push_back("");
+ contactList.push_back("");
- bool TokenData = false;
- string PropertyTokens;
+ bool tokenData = false;
+ string propertyTokens;
- PropertyNameData = (string*)&iter->first;
+ propertyNameData = (string*)&iter->first;
- PropertyData = SplitValues(*PropertyNameData);
+ propertyData = SplitValues(*propertyNameData);
- for(map::iterator dataiter = PropertyData.begin();
- dataiter != PropertyData.end(); dataiter++){
+ for(map::iterator dataiter = propertyData.begin();
+ dataiter != propertyData.end(); dataiter++){
if (dataiter->first == "ALTREP"){
- ContactListAltRep[ObjectSeekCount] = dataiter->second;
+ contactListAltRep[objectSeekCount] = dataiter->second;
} else if (dataiter->first == "LANGUAGE"){
- ContactListLanguage[ObjectSeekCount] = dataiter->second;
+ contactListLanguage[objectSeekCount] = dataiter->second;
} else {
- if (TokenData == false){
- TokenData = true;
+ if (tokenData == false){
+ tokenData = true;
} else {
- PropertyTokens += ";";
+ propertyTokens += ";";
}
- PropertyTokens += dataiter->first;
- PropertyTokens += "=";
- PropertyTokens += dataiter->second;
+ propertyTokens += dataiter->first;
+ propertyTokens += "=";
+ propertyTokens += dataiter->second;
}
}
- if (PropertyTokens.size() > 0){
- ContactListTokens[ObjectSeekCount] = PropertyTokens;
+ if (propertyTokens.size() > 0){
+ contactListTokens[objectSeekCount] = propertyTokens;
}
- ContactList[ObjectSeekCount] = iter->second;
+ contactList[objectSeekCount] = iter->second;
- ObjectSeekCount++;
+ objectSeekCount++;
}
// Process the data from Description.
- DataReceived = ProcessTextVectors(&ObjectName, &ObjectData, true, "DESCRIPTION");
+ dataReceived = ProcessTextVectors(&objectName, &objectData, true, "DESCRIPTION");
- ObjectSeekCount = 0;
+ objectSeekCount = 0;
- for(multimap::iterator iter = DataReceived.begin();
- iter != DataReceived.end();
+ for(multimap::iterator iter = dataReceived.begin();
+ iter != dataReceived.end();
++iter){
- DescriptionListTokens.push_back("");
- DescriptionListAltRep.push_back("");
- DescriptionListLanguage.push_back("");
- DescriptionList.push_back("");
+ descriptionListTokens.push_back("");
+ descriptionListAltRep.push_back("");
+ descriptionListLanguage.push_back("");
+ descriptionList.push_back("");
- bool TokenData = false;
- string PropertyTokens;
+ bool tokenData = false;
+ string propertyTokens;
- PropertyNameData = (string*)&iter->first;
+ propertyNameData = (string*)&iter->first;
- PropertyData = SplitValues(*PropertyNameData);
+ propertyData = SplitValues(*propertyNameData);
- for(map::iterator dataiter = PropertyData.begin();
- dataiter != PropertyData.end(); dataiter++){
+ for(map::iterator dataiter = propertyData.begin();
+ dataiter != propertyData.end(); dataiter++){
if (dataiter->first == "ALTREP"){
- DescriptionListAltRep[ObjectSeekCount] = dataiter->second;
+ descriptionListAltRep[objectSeekCount] = dataiter->second;
} else if (dataiter->first == "LANGUAGE"){
- DescriptionListLanguage[ObjectSeekCount] = dataiter->second;
+ descriptionListLanguage[objectSeekCount] = dataiter->second;
} else {
- if (TokenData == false){
- TokenData = true;
+ if (tokenData == false){
+ tokenData = true;
} else {
- PropertyTokens += ";";
+ propertyTokens += ";";
}
- PropertyTokens += dataiter->first;
- PropertyTokens += "=";
- PropertyTokens += dataiter->second;
+ propertyTokens += dataiter->first;
+ propertyTokens += "=";
+ propertyTokens += dataiter->second;
}
}
- if (PropertyTokens.size() > 0){
- DescriptionListTokens[ObjectSeekCount] = PropertyTokens;
+ if (propertyTokens.size() > 0){
+ descriptionListTokens[objectSeekCount] = propertyTokens;
}
- DescriptionList[ObjectSeekCount] = iter->second;
+ descriptionList[objectSeekCount] = iter->second;
- ObjectSeekCount++;
+ objectSeekCount++;
}
// Process the data from EXDATE.
- DataReceived = ProcessTextVectors(&ObjectName, &ObjectData, true, "EXDATE");
+ dataReceived = ProcessTextVectors(&objectName, &objectData, true, "EXDATE");
- ObjectSeekCount = 0;
+ objectSeekCount = 0;
- for(multimap::iterator iter = DataReceived.begin();
- iter != DataReceived.end();
+ for(multimap::iterator iter = dataReceived.begin();
+ iter != dataReceived.end();
++iter){
- ExcludeDateDataTokens.push_back("");
- ExcludeDateDataValue.push_back("");
- ExcludeDateDataTimeZoneParam.push_back("");
- ExcludeDateData.push_back("");
+ excludeDateDataTokens.push_back("");
+ excludeDateDataValue.push_back("");
+ excludeDateDataTimeZoneParam.push_back("");
+ excludeDateData.push_back("");
- bool TokenData = false;
- string PropertyTokens;
+ bool tokenData = false;
+ string propertyTokens;
- PropertyNameData = (string*)&iter->first;
+ propertyNameData = (string*)&iter->first;
- PropertyData = SplitValues(*PropertyNameData);
+ propertyData = SplitValues(*propertyNameData);
- for(map::iterator dataiter = PropertyData.begin();
- dataiter != PropertyData.end(); dataiter++){
+ for(map::iterator dataiter = propertyData.begin();
+ dataiter != propertyData.end(); dataiter++){
if (dataiter->first == "VALUE"){
- ExcludeDateDataValue[ObjectSeekCount] = dataiter->second;
+ excludeDateDataValue[objectSeekCount] = dataiter->second;
} else if (dataiter->first == "TZID"){
- ExcludeDateDataTimeZoneParam[ObjectSeekCount] = dataiter->second;
+ excludeDateDataTimeZoneParam[objectSeekCount] = dataiter->second;
} else {
- if (TokenData == false){
- TokenData = true;
+ if (tokenData == false){
+ tokenData = true;
} else {
- PropertyTokens += ";";
+ propertyTokens += ";";
}
- PropertyTokens += dataiter->first;
- PropertyTokens += "=";
- PropertyTokens += dataiter->second;
+ propertyTokens += dataiter->first;
+ propertyTokens += "=";
+ propertyTokens += dataiter->second;
}
}
- if (PropertyTokens.size() > 0){
- ExcludeDateDataTokens[ObjectSeekCount] = PropertyTokens;
+ if (propertyTokens.size() > 0){
+ excludeDateDataTokens[objectSeekCount] = propertyTokens;
}
- ExcludeDateData[ObjectSeekCount] = iter->second;
+ excludeDateData[objectSeekCount] = iter->second;
- ObjectSeekCount++;
+ objectSeekCount++;
}
// Process the data from RELATED-TO.
- DataReceived = ProcessTextVectors(&ObjectName, &ObjectData, true, "RELATED-TO");
+ dataReceived = ProcessTextVectors(&objectName, &objectData, true, "RELATED-TO");
- ObjectSeekCount = 0;
+ objectSeekCount = 0;
- for(multimap::iterator iter = DataReceived.begin();
- iter != DataReceived.end();
+ for(multimap::iterator iter = dataReceived.begin();
+ iter != dataReceived.end();
++iter){
- RelatedToDataTokens.push_back("");
- RelatedToDataRelationType.push_back("");
- RelatedToData.push_back("");
+ relatedToDataTokens.push_back("");
+ relatedToDataRelationType.push_back("");
+ relatedToData.push_back("");
- bool TokenData = false;
- string PropertyTokens;
+ bool tokenData = false;
+ string propertyTokens;
- PropertyNameData = (string*)&iter->first;
+ propertyNameData = (string*)&iter->first;
- PropertyData = SplitValues(*PropertyNameData);
+ propertyData = SplitValues(*propertyNameData);
- for(map::iterator dataiter = PropertyData.begin();
- dataiter != PropertyData.end(); dataiter++){
+ for(map::iterator dataiter = propertyData.begin();
+ dataiter != propertyData.end(); dataiter++){
if (dataiter->first == "RELTYPE"){
- RelatedToDataRelationType[ObjectSeekCount] = dataiter->second;
+ relatedToDataRelationType[objectSeekCount] = dataiter->second;
} else {
- if (TokenData == false){
- TokenData = true;
+ if (tokenData == false){
+ tokenData = true;
} else {
- PropertyTokens += ";";
+ propertyTokens += ";";
}
- PropertyTokens += dataiter->first;
- PropertyTokens += "=";
- PropertyTokens += dataiter->second;
+ propertyTokens += dataiter->first;
+ propertyTokens += "=";
+ propertyTokens += dataiter->second;
}
}
- if (PropertyTokens.size() > 0){
- RelatedToDataTokens[ObjectSeekCount] = PropertyTokens;
+ if (propertyTokens.size() > 0){
+ relatedToDataTokens[objectSeekCount] = propertyTokens;
}
- RelatedToData[ObjectSeekCount] = iter->second;
+ relatedToData[objectSeekCount] = iter->second;
- ObjectSeekCount++;
+ objectSeekCount++;
}
// Process the data from RDATE.
- DataReceived = ProcessTextVectors(&ObjectName, &ObjectData, true, "RDATE");
+ dataReceived = ProcessTextVectors(&objectName, &objectData, true, "RDATE");
- ObjectSeekCount = 0;
+ objectSeekCount = 0;
- for(multimap::iterator iter = DataReceived.begin();
- iter != DataReceived.end();
+ for(multimap::iterator iter = dataReceived.begin();
+ iter != dataReceived.end();
++iter){
- RecurranceDateDataTokens.push_back("");
- RecurranceDateDataValue.push_back("");
- RecurranceDateDataTimeZoneParam.push_back("");
- RecurranceDateData.push_back("");
+ recurranceDateDataTokens.push_back("");
+ recurranceDateDataValue.push_back("");
+ recurranceDateDataTimeZoneParam.push_back("");
+ recurranceDateData.push_back("");
- bool TokenData = false;
- string PropertyTokens;
+ bool tokenData = false;
+ string propertyTokens;
- PropertyNameData = (string*)&iter->first;
+ propertyNameData = (string*)&iter->first;
- PropertyData = SplitValues(*PropertyNameData);
+ propertyData = SplitValues(*propertyNameData);
- for(map::iterator dataiter = PropertyData.begin();
- dataiter != PropertyData.end(); dataiter++){
+ for(map::iterator dataiter = propertyData.begin();
+ dataiter != propertyData.end(); dataiter++){
if (dataiter->first == "VALUE"){
- RecurranceDateDataValue[ObjectSeekCount] = dataiter->second;
+ recurranceDateDataValue[objectSeekCount] = dataiter->second;
} else if (dataiter->first == "TZID"){
- RecurranceDateDataTimeZoneParam[ObjectSeekCount] = dataiter->second;
+ recurranceDateDataTimeZoneParam[objectSeekCount] = dataiter->second;
} else {
- if (TokenData == false){
- TokenData = true;
+ if (tokenData == false){
+ tokenData = true;
} else {
- PropertyTokens += ";";
+ propertyTokens += ";";
}
- PropertyTokens += dataiter->first;
- PropertyTokens += "=";
- PropertyTokens += dataiter->second;
+ propertyTokens += dataiter->first;
+ propertyTokens += "=";
+ propertyTokens += dataiter->second;
}
}
- if (PropertyTokens.size() > 0){
- RecurranceDateDataTokens[ObjectSeekCount] = PropertyTokens;
+ if (propertyTokens.size() > 0){
+ recurranceDateDataTokens[objectSeekCount] = propertyTokens;
}
- RecurranceDateData[ObjectSeekCount] = iter->second;
+ recurranceDateData[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++;
+
+ }
+
+ 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++;
+ objectSeekCount++;
}