bool ValidEnd = false;
bool ValidDateTimeStamp = false;
bool ValidUniqueID = false;
+ bool ValidDateTimeStart = false;
int SeekCount = 0;
string PropertyName;
SeekCount = 0;
+ // Look for DTSTART if nothing is set for METHOD..
+
+ if (MethodData.size() == 0){
+
+ for (vector<string>::iterator iter = ObjectName.begin();
+ iter != ObjectName.end(); iter++){
+
+ try{
+ PropertyName = ObjectName[SeekCount].substr(0,7);
+ }
+
+ catch(const out_of_range& oor){
+ continue;
+ }
+
+ if (PropertyName == "DTSTART"){
+
+ if (ValidDateTimeStart == false){
+ ValidDateTimeStart = true;
+ } else {
+ return CALENDAROBJECTVALID_INVALIDFORMAT;
+ }
+
+ }
+
+ SeekCount++;
+
+ }
+
+ } else {
+ ValidDateTimeStart = true;
+ }
+
+ SeekCount = 0;
+
// Look for END:VEVENT.
for (vector<string>::iterator iter = ObjectName.begin();
if (ValidBegin == true &&
ValidEnd == true &&
ValidDateTimeStamp == true &&
+ ValidDateTimeStart == true &&
ValidUniqueID == true){
return CALENDAROBJECTVALID_OK;
DataReceived = ProcessTextVectors(&ObjectName, &ObjectData, false, "UID");
- // Process the data from DTSTAMP.
+ // Process the data from UID.
if (DataReceived.begin() != DataReceived.end()){