if (vCard4Format.Get("VERSION") != "4.0"){
return CONVERTRESULT_INPUTFILEINVALIDFORMAT;
}
-
- // No conversion needs to be as the card is already
- // in the vCard 4.0 format.
} else if (InputFormat == "vCard3"){
if (InputvCard.Get("VERSION") != "3.0"){
return CONVERTRESULT_INPUTFILEINVALIDFORMAT;
}
-
+
+ vCard34Conv vCard34ConvObj;
+
+ vCard vCard4Format;
+
+ vCard34ConvObj.ConvertToV4(&InputFileData, &vCard4Format);
+
+ FinalData = vCard4Format.WriteString();
+
}
// Convert the vCard into the required format and
} else {
// Write out the data to the console.
-
+
+ FinalData.Trim();
std::cout << FinalData << std::endl;
}