// Process SOUND.
+ SaveSound(&SoundsList, &SoundsListAltID,
+ &SoundsListPID, &SoundsListType,
+ &SoundsListAudioEncType, &SoundsListAudioType,
+ &SoundsListMediatype, &SoundsListLanguage,
+ &SoundsListPref, &SoundsListTokens,
+ SaveData);
+
// Write the end part of the vCard data file.
SaveData->Append("END:VCARD");
}
+}
+
+void ContactDataObject::SaveSound(map<int, string> *SoundsList, map<int, wxString> *SoundsListAltID,
+ map<int, wxString> *SoundsListPID, map<int, wxString> *SoundsListType,
+ map<int, wxString> *SoundsListAudioEncType, map<int, wxString> *SoundsListAudioType,
+ map<int, wxString> *SoundsListMediatype, map<int, wxString> *SoundsListLanguage,
+ map<int, int> *SoundsListPref, map<int, wxString> *SoundsListTokens,
+ wxString *SaveData){
+
+ wxString ProcessData = "";
+
+ for (std::map<int, string>::iterator SoundsIter = SoundsList->begin();
+ SoundsIter != SoundsList->end(); SoundsIter++){
+
+ ProcessData.Append("SOUND");
+
+ // Check if there is a value for TYPE.
+
+ if ((*SoundsListType)[SoundsIter->first].size() > 0){
+
+ ProcessData.Append(";TYPE=");
+ ProcessData.Append((*SoundsListType)[SoundsIter->first]);
+
+ }
+
+ // Check if there is a value for ALTID.
+
+ if ((*SoundsListAltID)[SoundsIter->first].size() > 0){
+
+ ProcessData.Append(";ALTID=");
+ ProcessData.Append((*SoundsListAltID)[SoundsIter->first]);
+
+ }
+
+ // Check if there is a value for LANGUAGE.
+
+ if ((*SoundsListLanguage)[SoundsIter->first].size() > 0){
+
+ ProcessData.Append(";LANGUAGE=");
+ ProcessData.Append((*SoundsListLanguage)[SoundsIter->first]);
+
+ }
+
+ // Check if there is a value for MEDIATYPE.
+
+ if ((*SoundsListMediatype)[SoundsIter->first].size() > 0){
+
+ ProcessData.Append(";MEDIATYPE=");
+ ProcessData.Append((*SoundsListMediatype)[SoundsIter->first]);
+
+ }
+
+ // Check if there is a value for PID.
+
+ if ((*SoundsListPID)[SoundsIter->first].size() > 0){
+
+ ProcessData.Append(";PID=");
+ ProcessData.Append((*SoundsListPID)[SoundsIter->first]);
+
+ }
+
+ // Check if there is a value for PREF.
+
+ if ((*SoundsListPref)[SoundsIter->first] > 0){
+
+ ProcessData.Append(";PREF=");
+ ProcessData.Append(wxString::Format("%i", (*SoundsListPref)[SoundsIter->first]));
+
+ }
+
+ // Check if there is a value for tokens.
+
+ if ((*SoundsListTokens)[SoundsIter->first].size() > 0){
+
+ ProcessData.Append(";");
+ ProcessData.Append((*SoundsListTokens)[SoundsIter->first]);
+
+ }
+
+ ProcessData.Append(":data:");
+ ProcessData.Append((*SoundsListAudioType)[SoundsIter->first]);
+ ProcessData.Append(";");
+ ProcessData.Append((*SoundsListAudioEncType)[SoundsIter->first]);
+ ProcessData.Append(",");
+ ProcessData.Append(SoundsIter->second);
+ ProcessData.Append("\n");
+
+ ProcessData = OutputText(&ProcessData);
+
+ SaveData->Append(ProcessData);
+ ProcessData.clear();
+
+ }
+
}
\ No newline at end of file