Added new link type: EXTRA_FILE, to allow sendign links with sources included so as to trigger direct transfer.

This makes possible to send files through chat without permitting tunnel access to the files. The client requests
the file as a direct transfer only, using the supplied source.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@5799 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2012-11-10 22:59:51 +00:00
parent a573211629
commit 929f872544
4 changed files with 111 additions and 4 deletions

View file

@ -15,5 +15,22 @@ void LinkTextBrowser::linkClicked(const QUrl &url)
{
// some links are opened directly in the QTextBrowser with open external links set to true,
// so we handle links by our own
QDesktopServices::openUrl(url);
#ifdef TO_DO
// If we want extra file links to be anonymous, we need to insert the actual source here.
if(url.host() == HOST_EXTRAFILE)
{
std::cerr << "Extra file link detected. Adding parent id " << _target_sslid << " to sourcelist" << std::endl;
RetroShareLink link ;
link.fromUrl(url) ;
link.createExtraFile( link.name(),link.size(),link.hash(), _target_ssl_id) ;
QDesktopServices::openUrl(link.toUrl());
}
else
#endif
QDesktopServices::openUrl(url);
}