CheckType(&PropertySeg1, &SplitPoints, &SplitLength, &intPrevValue, &PropType);
intPrevValue = 7;
+ bool PropertyMatched = FALSE;
for (std::map<int, int>::iterator intiter = SplitPoints.begin();
intiter != SplitPoints.end(); ++intiter){
CaptureString(&PropertyValue, FALSE);
- if (PropertyName == wxT("ALTID")){
-
- CalendarListAltID.erase(*CalURICount);
- CalendarListAltID.insert(std::make_pair(*CalURICount, PropertyValue));
+ ProcessStringValue(&PropertyName, "ALTID", &CalendarListAltID, &PropertyValue, CalURICount, &PropertyMatched);
+ ProcessStringValue(&PropertyName, "PID", &CalendarListPID, &PropertyValue, CalURICount, &PropertyMatched);
+ ProcessStringValue(&PropertyName, "MEDIATYPE", &CalendarListMediatype, &PropertyValue, CalURICount, &PropertyMatched);
+ ProcessIntegerValue(&PropertyName, "PREF", &CalendarListPref, &PropertyValue, CalURICount, &PropertyMatched);
- } else if (PropertyName == wxT("PID")){
-
- CalendarListPID.erase(*CalURICount);
- CalendarListPID.insert(std::make_pair(*CalURICount, PropertyValue));
-
- } else if (PropertyName == wxT("PREF")){
-
- ProcessIntegerValue(&CalendarListPref, &PropertyValue, CalURICount);
+ if (PropertyMatched == TRUE){
- } else if (PropertyName == wxT("MEDIATYPE")){
+ PropertyMatched = FALSE;
+ continue;
- CalendarListMediatype.erase(*CalURICount);
- CalendarListMediatype.insert(std::make_pair(*CalURICount, PropertyValue));
+ }
- } else {
+ if (!PropertyName.IsEmpty() && !PropertyValue.IsEmpty() && PropertyName != wxT("TYPE")){
- // Something else we don't know about so append
- // to the tokens variable.
+ if (FirstToken == TRUE){
- if (!PropertyName.IsEmpty() && !PropertyValue.IsEmpty() && PropertyName != wxT("TYPE")){
+ PropertyTokens.Append(PropertyName + wxT("=") + PropertyValue);
+ FirstToken = FALSE;
- if (FirstToken == TRUE){
-
- PropertyTokens.Append(PropertyName + wxT("=") + PropertyValue);
- FirstToken = FALSE;
-
- } else {
-
- PropertyTokens.Append(wxT(";") + PropertyName + wxT("=") + PropertyValue);
-
- }
+ } else {
+
+ PropertyTokens.Append(wxT(";") + PropertyName + wxT("=") + PropertyValue);
}