Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Added code to process RESOURCES in CalendarEventObject.
authorSteve Brokenshire <sbrokenshire@xestia.co.uk>
Wed, 27 Jan 2016 21:34:56 +0000 (21:34 +0000)
committerSteve Brokenshire <sbrokenshire@xestia.co.uk>
Wed, 27 Jan 2016 21:34:56 +0000 (21:34 +0000)
source/objects/calendarevent/CalendarEvent.cpp

index c5f27b5..e13c34e 100644 (file)
@@ -1335,5 +1335,64 @@ void CalendarEventObject::ProcessData(){
                ObjectSeekCount++;
                
        }
+
+       // Process the data from RESOURCES.
+       
+       DataReceived = ProcessTextVectors(&ObjectName, &ObjectData, true, "RESOURCES");
+
+       ObjectSeekCount = 0;
+       
+       for(multimap<string,string>::iterator iter = DataReceived.begin(); 
+               iter != DataReceived.end(); 
+               ++iter){
+               
+               ResourcesDataTokens.push_back("");
+               ResourcesDataAltRep.push_back("");
+               ResourcesDataLanguage.push_back("");
+               ResourcesData.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"){
+                               
+                               ResourcesDataAltRep[ObjectSeekCount] = dataiter->second;
+                               
+                       } else if (dataiter->first == "LANGUAGE"){
+                               
+                               ResourcesDataLanguage[ObjectSeekCount] = dataiter->second;
+                               
+                       } else {
+                               
+                               if (TokenData == false){
+                                       TokenData = true;
+                               } else {
+                                       PropertyTokens += ";";
+                               }
+                               
+                               PropertyTokens += dataiter->first;
+                               PropertyTokens += "=";
+                               PropertyTokens += dataiter->second;
+                               
+                       }
+                               
+               }
+               
+               if (PropertyTokens.size() > 0){
+                       ResourcesDataTokens[ObjectSeekCount] = PropertyTokens;
+               }
+                       
+               ResourcesData[ObjectSeekCount] = iter->second;
+               
+               ObjectSeekCount++;
+               
+       }
        
 }
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