// Process LOGO.
+ SaveLogo(&LogosList, &LogosListAltID,
+ &LogosListPID, &LogosListType,
+ &LogosListPicEncType, &LogosListPictureType,
+ &LogosListMediatype, &LogosListPref,
+ &LogosListTokens, SaveData);
+
// Process SOUND.
// Write the end part of the vCard data file.
}
+}
+
+void ContactDataObject::SaveLogo(map<int, string> *LogosList, map<int, wxString> *LogosListAltID,
+ map<int, wxString> *LogosListPID, map<int, wxString> *LogosListType,
+ map<int, wxString> *LogosListPicEncType, map<int, wxString> *LogosListPictureType,
+ map<int, wxString> *LogosListMediatype, map<int, int> *LogosListPref,
+ map<int, wxString> *LogosListTokens, wxString *SaveData){
+
+ wxString ProcessData = "";
+
+ for (std::map<int, string>::iterator LogosIter = LogosList->begin();
+ LogosIter != LogosList->end(); LogosIter++){
+
+ ProcessData.Append("LOGO");
+
+ // Check if there is a value for TYPE.
+
+ if ((*LogosListType)[LogosIter->first].size() > 0){
+
+ ProcessData.Append(";TYPE=");
+ ProcessData.Append((*LogosListType)[LogosIter->first]);
+
+ }
+
+ // Check if there is a value for ALTID.
+
+ if ((*LogosListAltID)[LogosIter->first].size() > 0){
+
+ ProcessData.Append(";ALTID=");
+ ProcessData.Append((*LogosListAltID)[LogosIter->first]);
+
+ }
+
+ // Check if there is a value for MEDIATYPE..
+
+ if ((*LogosListMediatype)[LogosIter->first].size() > 0){
+
+ ProcessData.Append(";MEDIATYPE=");
+ ProcessData.Append((*LogosListMediatype)[LogosIter->first]);
+
+ }
+
+ // Check if there is a value for PID.
+
+ if ((*LogosListPID)[LogosIter->first].size() > 0){
+
+ ProcessData.Append(";PID=");
+ ProcessData.Append((*LogosListPID)[LogosIter->first]);
+
+ }
+
+ // Check if there is a value for PREF.
+
+ if ((*LogosListPref)[LogosIter->first] > 0){
+
+ ProcessData.Append(";PREF=");
+ ProcessData.Append(wxString::Format("%i", (*LogosListPref)[LogosIter->first]));
+
+ }
+
+ // Check if there is a value for tokens.
+
+ if ((*LogosListTokens)[LogosIter->first].size() > 0){
+
+ ProcessData.Append(";");
+ ProcessData.Append((*LogosListTokens)[LogosIter->first]);
+
+ }
+
+ ProcessData.Append(":data:");
+ ProcessData.Append((*LogosListPictureType)[LogosIter->first]);
+ ProcessData.Append(";");
+ ProcessData.Append((*LogosListPicEncType)[LogosIter->first]);
+ ProcessData.Append(",");
+ ProcessData.Append(LogosIter->second);
+ ProcessData.Append("\n");
+
+ ProcessData = OutputText(&ProcessData);
+
+ SaveData->Append(ProcessData);
+ ProcessData.clear();
+
+ }
+
}
\ No newline at end of file
map<int, wxString> *PicturesListPicEncType, map<int, wxString> *PicturesListPictureType,
map<int, wxString> *PicturesListMediatype, map<int, int> *PicturesListPref,
map<int, wxString> *PicturesListTokens, wxString *SaveData);
+ void SaveLogo(map<int, string> *LogosList, map<int, wxString> *LogosListAltID,
+ map<int, wxString> *LogosListPID, map<int, wxString> *LogosListType,
+ map<int, wxString> *LogosListPicEncType, map<int, wxString> *LogosListPictureType,
+ map<int, wxString> *LogosListMediatype, map<int, int> *LogosListPref,
+ map<int, wxString> *LogosListTokens, wxString *SaveData);
public:
"PHOTO;TYPE=work;ALTID=90;MEDIATYPE=image/png;PID=91;PREF=92;PHOTO=YUP:data:im\n"
" age/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAKCAIAAADdHiL1AAAAIElEQVQoz2MUm\n"
" 53EgApepsxF4XfaoylgYiAdjOoZ3HoAeuQD2WdxRzcAAAAASUVORK5CYII=\n"
+ "LOGO;ALTID=70;MEDIATYPE=image/png;PID=71;PREF=72;MEEP=MOO:data:image/png;base\n"
+ " 64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAKCAIAAADdHiL1AAAAJUlEQVQoz2NkwAb+//8PYTAyM\n"
+ " mLKMjGQDuilhxHudBrbM8zCDQCxHQkPeaUvawAAAABJRU5ErkJggg==\n"
+ "LOGO;TYPE=home;ALTID=20;MEDIATYPE=image/png;PID=21;PREF=22;BEEP=BOOP:data:ima\n"
+ " ge/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAKCAIAAADdHiL1AAAAHklEQVQoz2NkYP\n"
+ " jPgAr+owkwMqIpYGIgHYzqGdx6AAKNAxMN5P6+AAAAAElFTkSuQmCC\n"
+ "LOGO;TYPE=work;ALTID=90;MEDIATYPE=image/png;PID=91;PREF=92;LOGO=YUP:data:imag\n"
+ " e/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAKCAIAAADdHiL1AAAAIElEQVQoz2MUm53\n"
+ " EgApepsxF4XfaoylgYiAdjOoZ3HoAeuQD2WdxRzcAAAAASUVORK5CYII=\n"
"END:VCARD";
ASSERT_EQ(CONTACTLOAD_OK, TestFile3.LoadFile("LoadCheck-Load4.vcf"));