Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Added code to process the UID, CONTACT and DTSTART property in CalendarFreeBusyObject.
authorSteve Brokenshire <sbrokenshire@xestia.co.uk>
Sun, 31 Jan 2016 18:04:21 +0000 (18:04 +0000)
committerSteve Brokenshire <sbrokenshire@xestia.co.uk>
Sun, 31 Jan 2016 18:04:21 +0000 (18:04 +0000)
source/objects/calendarfreebusy/CalendarFreeBusy.cpp

index 227e77d..1077392 100644 (file)
@@ -165,5 +165,134 @@ void CalendarFreeBusyObject::ProcessData(){
                DateTimeStampData = DataReceived.begin()->second;
                
        }
+
+       // Get the Unique ID (UID).
+       
+       DataReceived = ProcessTextVectors(&ObjectName, &ObjectData, false, "UID");
+       
+       // Process the data from UID.
+       
+       if (DataReceived.begin() != DataReceived.end()){
+       
+               try {
+                       UniqueIDTokens = DataReceived.begin()->first.substr(4);
+               }
+               
+               catch(const out_of_range &oor){
+                       // Do nothing as there is no data.
+               }               
+               
+               UniqueID = DataReceived.begin()->second;
+               
+       }
+       
+       // Process the data from CONTACT.
+       
+       DataReceived = ProcessTextVectors(&ObjectName, &ObjectData, false, "CONTACT");
+
+       ObjectSeekCount = 0;
+       
+       for(multimap<string,string>::iterator iter = DataReceived.begin(); 
+               iter != DataReceived.end(); 
+               ++iter){
+               
+               ContactListTokens.push_back("");
+               ContactListAltRep.push_back("");
+               ContactListLanguage.push_back("");
+               ContactList.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"){
+                               
+                               ContactListAltRep[ObjectSeekCount] = dataiter->second;
+                               
+                       } else if (dataiter->first == "LANGUAGE"){
+                               
+                               ContactListLanguage[ObjectSeekCount] = dataiter->second;
+                               
+                       } else {
+                               
+                               if (TokenData == false){
+                                       TokenData = true;
+                               } else {
+                                       PropertyTokens += ";";
+                               }
+                               
+                               PropertyTokens += dataiter->first;
+                               PropertyTokens += "=";
+                               PropertyTokens += dataiter->second;
+                               
+                       }
+                               
+               }
+               
+               if (PropertyTokens.size() > 0){
+                       ContactListTokens[ObjectSeekCount] = PropertyTokens;
+               }
+                       
+               ContactList[ObjectSeekCount] = iter->second;
+               
+               ObjectSeekCount++;
+               
+       }
+       
+       // 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;
+               
+       }
        
 }
\ 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