SaveVendor(&VendorList, &VendorListPEN,
&VendorListElement, SaveData);
+ // Process X-Tokens.
+
+ SaveXToken(&XTokenList, &XTokenListTokens,
+ SaveData);
+
// Write the end part of the vCard data file.
SaveData->Append("END:VCARD");
}
+}
+
+void ContactDataObject::SaveXToken(map<int, wxString> *XTokenList, map<int, wxString> *XTokenListTokens,
+ wxString *SaveData){
+
+ wxString ProcessData = "";
+
+ for (std::map<int, wxString>::iterator XTokenIter = XTokenList->begin();
+ XTokenIter != XTokenList->end(); XTokenIter++){
+
+ ProcessData.Append("X-");
+ ProcessData.Append((*XTokenListTokens)[XTokenIter->first]);
+ ProcessData.Append(":");
+ ProcessData.Append(XTokenIter->second);
+ ProcessData.Append("\n");
+
+ ProcessData = OutputText(&ProcessData);
+
+ SaveData->Append(ProcessData);
+ ProcessData.clear();
+
+ }
+
}
\ No newline at end of file
map<int, wxString> *KeyListTokens, wxString *SaveData);
void SaveVendor(map<int, wxString> *VendorList, map<int, wxString> *VendorListPEN,
map<int, wxString> *VendorListElement, wxString *SaveData);
+ void SaveXToken(map<int, wxString> *XTokenList, map<int, wxString> *XTokenListTokens,
+ wxString *SaveData);
public:
"VND-696-CAKE:Lemon\n"
"VND-696-DRINK:Orange\n"
"VND-696-MUSIC:Shiena Nishizawa\n"
+ "X-FARM:Yard\n"
+ "X-FARM:Animals\n"
+ "X-FARM;LOCATION=Back;TYPE=Vehicles:Shed\n"
+ "X-DISKSERIAL:14444\n"
+ "X-DISKSERIAL:7555\n"
+ "X-DISKSERIAL;STATUS=DESTROYED;TYPE=FLASH:3250539032590\n"
+ "X-FOODS;STATUS=HIGH:Lemon Cake\n"
+ "X-FOODS;STATUS=LOW:Starrey Gazey Pie\n"
+ "X-FOODS;STATUS=FAVOURITE;TYPE=CHEESEANDONION:Cornish Pasties\n"
"END:VCARD";
ASSERT_EQ(CONTACTLOAD_OK, TestFile3.LoadFile("LoadCheck-Load4.vcf"));