Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Added CLIENTPIDMAP to the SaveString function of ContactDataObject
authorSteve Brokenshire <sbrokenshire@xestia.co.uk>
Wed, 29 Jun 2016 08:06:02 +0000 (09:06 +0100)
committerSteve Brokenshire <sbrokenshire@xestia.co.uk>
Wed, 29 Jun 2016 08:06:02 +0000 (09:06 +0100)
source/contacteditor/cdo/ContactDataObject-Save.cpp
source/tests/xestiaab_contactsave.h

index 4cc5a6f..3b12441 100644 (file)
@@ -86,6 +86,31 @@ ContactSaveStatus ContactDataObject::SaveString(wxString *SaveData){
                &SourceListMediatype, &SourceListPref, 
                &SourceListTokens, SaveData);
        
+       // Process CLIENTPIDMAP.
+       
+       for (std::map<int, wxString>::iterator CPIDIter = ClientPIDList.begin();
+               CPIDIter != ClientPIDList.end(); CPIDIter++){
+       
+               ProcessData.Append("CLIENTPIDMAP");
+                       
+               if (ClientPIDListTokens[CPIDIter->first].size() > 0){
+               
+                       ProcessData.Append(";");
+                       ProcessData.Append(ClientPIDListTokens[CPIDIter->first]);
+                       
+               }
+                       
+               ProcessData.Append(":");
+               ProcessData.Append(CPIDIter->second);
+               ProcessData.Append("\n");
+               
+               ProcessData = OutputText(&ProcessData);
+               
+               SaveData->Append(ProcessData);
+               ProcessData.clear();
+                       
+       }
+       
        // Process FN.
        
        for (std::map<int, wxString>::iterator FNIter = FullNamesList.begin();
index 6ae4698..3eb41b1 100644 (file)
@@ -68,6 +68,10 @@ TEST(ContactSave, ContactSaveTests){
        " INE:http://example.com/source/sourceb.vcf\n"
        "SOURCE;TYPE=work;ALTID=94;MEDIATYPE=text/sandpaper;PID=91;PREF=92;STATUS=OFFL\n"
        " INE:http://example.com/source/sourcec.vcf\n"
+       "CLIENTPIDMAP:1;urn;uuid:aaaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa\n"
+       "CLIENTPIDMAP:2;urn;uuid:ccccccccc-cccc-cccc-cccc-cccccccccccc\n"
+       "CLIENTPIDMAP;MEEP=MOO;WOOP=WOO:3;urn;uuid:bbbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbb\n"
+       " bb\n"
        "FN;TYPE=work;LANGUAGE=kw;ALTID=500;PID=40;PREF=45;EXAMPLE=Baaa:Test Contact\n"
        "TITLE;ALTID=20;LANGUAGE=text/plain;PID=21;PREF=22;EEP=LIGHT:Lord of Light\n"
        "TITLE;TYPE=home;ALTID=30;LANGUAGE=grass/dry;PID=31;PREF=32;EEP=DARK:Lord of D\n"
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