Commit a36a3c55 authored by Sylvain Berfini's avatar Sylvain Berfini 🎩

Finished fake file transfer xml from external body url

parent 3fd55c4a
......@@ -969,7 +969,16 @@ void FileTransferChatMessageModifier::releaseHttpRequest () {
}
string FileTransferChatMessageModifier::createFakeFileTransferFromUrl(const string &url) {
return ""; //TODO
string fileName = url.substr(url.find_last_of("/") + 1);
stringstream fakeXml;
fakeXml << "<?xml version=\"1.0\" encoding=\"UTF-8\"?><file xmlns=\"urn:gsma:params:xml:ns:rcs:rcs:fthttp\">\r\n";
fakeXml << "<file-info type=\"file\">\r\n";
fakeXml << "<file-name>" << fileName << "</file-name>\r\n";
fakeXml << "<content-type>application/binary</content-type>\r\n";
fakeXml << "<data url = \"" << url << "\"/>\r\n";
fakeXml << "</file-info>\r\n";
fakeXml << "</file>";
return fakeXml.str();
}
LINPHONE_END_NAMESPACE
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment