Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Added code for processing DTSTART in CalendarEventObject::ProcessData
authorSteve Brokenshire <sbrokenshire@xestia.co.uk>
Sat, 23 Jan 2016 22:08:32 +0000 (22:08 +0000)
committerSteve Brokenshire <sbrokenshire@xestia.co.uk>
Sat, 23 Jan 2016 22:08:32 +0000 (22:08 +0000)
source/objects/calendarevent/CalendarEvent.cpp

index f737cc1..372ffb1 100644 (file)
@@ -178,6 +178,8 @@ void CalendarEventObject::ProcessData(){
        // Process the data.
        
        multimap<string,string> DataReceived;
+       map<string,string> PropertyData;
+       string *PropertyNameData = nullptr;
        
        // Get the Date Time Stamp (DTSTAMP).
        
@@ -219,4 +221,54 @@ void CalendarEventObject::ProcessData(){
                
        }
        
+       // Get the Date Time Start value.
+       
+       DataReceived = ProcessTextVectors(&ObjectName, &ObjectData, false, "DTSTART");
+       
+       // Process the data from DTSTART.
+       
+       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 == "VALUE"){
+                               
+                               DateTimeStartDataValue = iter->second;
+                               
+                       } else if (iter->first == "TZID"){
+                               
+                               DateTimeStartDataTimeZoneID = iter->second;
+                               
+                       } else {
+                               
+                               if (TokenData == false){
+                                       TokenData = true;
+                               } else {
+                                       PropertyTokens += ";";
+                               }
+                               
+                               PropertyTokens += iter->first;
+                               PropertyTokens += "=";
+                               PropertyTokens += iter->second;
+                               
+                       }
+                               
+               }
+               
+               if (PropertyTokens.size() > 0){
+                       DateTimeStartDataTokens = PropertyTokens;
+               }
+               
+               DateTimeStartData = DataReceived.begin()->second;
+               
+       }
+       
 }
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