+ } else if (ObjectName[SeekCount] == "END" &&
+ ObjectData[SeekCount] == "VALARM" &&
+ ValidAlarmBegin == false){
+
+ return CALENDAROBJECTVALID_INVALIDFORMAT;
+
+ } else if (ObjectName[SeekCount] == "END" &&
+ ObjectData[SeekCount] == "VCALENDAR" &&
+ ValidAlarmBegin == true){
+
+ return CALENDAROBJECTVALID_INVALIDFORMAT;
+
+ }
+
+ // Look for any VALARM sections.
+
+ if (ValidAlarmBegin == true){
+
+ AlarmObjectName.push_back(ObjectName[SeekCount]);
+ AlarmObjectData.push_back(ObjectData[SeekCount]);
+ DeleteLines.push_back(SeekCount);
+
+ }
+
+ if (ObjectName[SeekCount] == "END" &&
+ ObjectData[SeekCount] == "VALARM" &&
+ ValidAlarmBegin == true){
+
+ EventAlarmName.push_back(AlarmObjectName);
+ EventAlarmData.push_back(AlarmObjectData);
+
+ AlarmObjectName.clear();
+ AlarmObjectData.clear();
+
+ ValidAlarmBegin = false;
+
+ }
+
+ if (ObjectName[SeekCount] == "BEGIN" &&
+ ObjectData[SeekCount] == "VALARM" &&
+ ValidBegin == true){
+
+ if (ValidAlarmBegin == false){
+ ValidAlarmBegin = true;
+ } else {
+ return CALENDAROBJECTVALID_INVALIDFORMAT;
+ }
+
+ AlarmObjectName.push_back(ObjectName[SeekCount]);
+ AlarmObjectData.push_back(ObjectData[SeekCount]);
+ DeleteLines.push_back(SeekCount);
+