Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Added the DESCRIPTION property to iCalendarTask-Load2.vcf
[xestiacalendar/.git] / source / objects / calendartask / CalendarTask.cpp
index ae4b339..5d4a59b 100644 (file)
@@ -221,4 +221,74 @@ void CalendarTaskObject::ProcessData(){
                
        }
        
+       // 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<string,string>::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);
+               
+       }
+       
 }
\ No newline at end of file
Xestia Software Development
Yn Maystri
© 2006 - 2019 Xestia Software Development
Software

Xestia Address Book
Xestia Calendar
Development

Xestia Gelforn
Everything else

About
News
Privacy Policy