Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Added code to process CATEGORIES in CalendarTaskObject.
authorSteve Brokenshire <sbrokenshire@xestia.co.uk>
Sun, 31 Jan 2016 13:24:10 +0000 (13:24 +0000)
committerSteve Brokenshire <sbrokenshire@xestia.co.uk>
Sun, 31 Jan 2016 13:24:10 +0000 (13:24 +0000)
source/objects/calendartask/CalendarTask.cpp

index 852e769..20cc25b 100644 (file)
@@ -978,5 +978,117 @@ void CalendarTaskObject::ProcessData(){
                
        }
 
+       // Process the data from CATEGORIES.
+       
+       DataReceived = ProcessTextVectors(&ObjectName, &ObjectData, true, "CATEGORIES");
+       
+       ObjectSeekCount = 0;
+       
+       for(multimap<string,string>::iterator iter = DataReceived.begin(); 
+               iter != DataReceived.end(); 
+               ++iter){
+               
+               CategoriesListTokens.push_back("");
+               CategoriesListLanguage.push_back("");
+               CategoriesList.push_back("");
+                       
+               bool TokenData = false;
+               string PropertyTokens;
+               
+               PropertyNameData = (string*)&iter->first;
+               
+               PropertyData = SplitValues(*PropertyNameData);
+                       
+               for(map<string,string>::iterator dataiter = PropertyData.begin();
+                       dataiter != PropertyData.end(); dataiter++){
+                       
+                       if (dataiter->first == "LANGUAGE"){
+                               
+                               CategoriesListLanguage[ObjectSeekCount] = dataiter->second;
+                               
+                       } else {
+                               
+                               if (TokenData == false){
+                                       TokenData = true;
+                               } else {
+                                       PropertyTokens += ";";
+                               }
+                               
+                               PropertyTokens += dataiter->first;
+                               PropertyTokens += "=";
+                               PropertyTokens += dataiter->second;
+                               
+                       }
+                               
+               }
+               
+               if (PropertyTokens.size() > 0){
+                       CategoriesListTokens[ObjectSeekCount] = PropertyTokens;
+               }
+                       
+               CategoriesList[ObjectSeekCount] = iter->second;
+               
+               ObjectSeekCount++;
+               
+       }
+       
+       // Process the data from COMMENT.
+       
+       DataReceived = ProcessTextVectors(&ObjectName, &ObjectData, true, "COMMENT");
+
+       ObjectSeekCount = 0;
+       
+       for(multimap<string,string>::iterator iter = DataReceived.begin(); 
+               iter != DataReceived.end(); 
+               ++iter){
+               
+               CommentListTokens.push_back("");
+               CommentListAltRep.push_back("");
+               CommentListLanguage.push_back("");
+               CommentList.push_back("");
+                       
+               bool TokenData = false;
+               string PropertyTokens;
+               
+               PropertyNameData = (string*)&iter->first;
+               
+               PropertyData = SplitValues(*PropertyNameData);
+                       
+               for(map<string,string>::iterator dataiter = PropertyData.begin();
+                       dataiter != PropertyData.end(); dataiter++){
+                       
+                       if (dataiter->first == "ALTREP"){
+                               
+                               CommentListAltRep[ObjectSeekCount] = dataiter->second;
+                               
+                       } else if (dataiter->first == "LANGUAGE"){
+                               
+                               CommentListLanguage[ObjectSeekCount] = dataiter->second;
+                               
+                       } else {
+                               
+                               if (TokenData == false){
+                                       TokenData = true;
+                               } else {
+                                       PropertyTokens += ";";
+                               }
+                               
+                               PropertyTokens += dataiter->first;
+                               PropertyTokens += "=";
+                               PropertyTokens += dataiter->second;
+                               
+                       }
+                               
+               }
+               
+               if (PropertyTokens.size() > 0){
+                       CommentListTokens[ObjectSeekCount] = PropertyTokens;
+               }
+                       
+               CommentList[ObjectSeekCount] = iter->second;
+               
+               ObjectSeekCount++;
+               
+       }
        
 }
\ 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