mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
Updated interface files.
Added SrcIds to FileRequests(). git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@699 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
eb8dacc798
commit
f9b22cc5d2
@ -289,8 +289,8 @@ void MessagesDialog::getallrecommended()
|
||||
{
|
||||
std::cerr << "MessagesDialog::getallrecommended() Calling File Request";
|
||||
std::cerr << std::endl;
|
||||
|
||||
rsFiles -> FileRequest(*fit, *hit, *sit, "", 0);
|
||||
std::list<std::string> srcIds;
|
||||
rsFiles -> FileRequest(*fit, *hit, *sit, "", 0, srcIds);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -229,10 +229,11 @@ void SearchDialog::download()
|
||||
{
|
||||
std::cerr << "SearchDialog::download() Calling File Request";
|
||||
std::cerr << std::endl;
|
||||
std::list<std::string> srcIds;
|
||||
rsFiles -> FileRequest((item->text(SR_NAME_COL)).toStdString(),
|
||||
(item->text(SR_HASH_COL)).toStdString(),
|
||||
(item->text(SR_SIZE_COL)).toInt(),
|
||||
"", 0);
|
||||
"", 0, srcIds);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -540,7 +540,9 @@ void SubFileItem::download()
|
||||
// TEMP
|
||||
std::cerr << "SubFileItem::download() Calling File Request";
|
||||
std::cerr << std::endl;
|
||||
rsFiles->FileRequest(mFileName, mFileHash, mFileSize, "", 0);
|
||||
std::list<std::string> srcIds;
|
||||
srcIds.push_back(mSrcId);
|
||||
rsFiles->FileRequest(mFileName, mFileHash, mFileSize, "", 0, srcIds);
|
||||
|
||||
}
|
||||
|
||||
|
@ -152,11 +152,12 @@ RemoteDirModel::RemoteDirModel(bool mode, QObject *parent)
|
||||
return QVariant();
|
||||
}
|
||||
|
||||
#if 0
|
||||
/*if (role == Qt::BackgroundRole)
|
||||
{*/
|
||||
/*** colour entries based on rank/age/count **/
|
||||
/*** rank (0-10) ***/
|
||||
/*uint32_t r = details.rank;
|
||||
/ *uint32_t r = details.rank;
|
||||
if (r > 10) r = 10;
|
||||
r = 200 + r * 5; /* 0->250 */
|
||||
|
||||
@ -225,6 +226,7 @@ RemoteDirModel::RemoteDirModel(bool mode, QObject *parent)
|
||||
return QVariant();
|
||||
}
|
||||
}*/
|
||||
#endif
|
||||
|
||||
if (role == Qt::DecorationRole)
|
||||
{
|
||||
@ -694,8 +696,10 @@ void RemoteDirModel::downloadSelected(QModelIndexList list)
|
||||
{
|
||||
std::cerr << "RemoteDirModel::downloadSelected() Calling File Request";
|
||||
std::cerr << std::endl;
|
||||
std::list<std::string> srcIds;
|
||||
srcIds.push_back(details.id);
|
||||
rsFiles -> FileRequest(details.name, details.hash,
|
||||
details.count, "", 0);
|
||||
details.count, "", 0, srcIds);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -38,16 +38,19 @@ extern RsFiles *rsFiles;
|
||||
|
||||
class Expression;
|
||||
|
||||
const uint32_t RS_FILE_CTRL_PAUSE = 0x0100;
|
||||
const uint32_t RS_FILE_CTRL_START = 0x0200;
|
||||
/* These are used mainly by ftController at the moment */
|
||||
const uint32_t RS_FILE_CTRL_PAUSE = 0x00000100;
|
||||
const uint32_t RS_FILE_CTRL_START = 0x00000200;
|
||||
|
||||
const uint32_t RS_FILE_CTRL_TRICKLE = 0x0001;
|
||||
const uint32_t RS_FILE_CTRL_SLOW = 0x0002;
|
||||
const uint32_t RS_FILE_CTRL_STANDARD = 0x0003;
|
||||
const uint32_t RS_FILE_CTRL_FAST = 0x0004;
|
||||
const uint32_t RS_FILE_CTRL_STREAM_AUDIO = 0x0005;
|
||||
const uint32_t RS_FILE_CTRL_STREAM_VIDEO = 0x0006;
|
||||
const uint32_t RS_FILE_RATE_TRICKLE = 0x00000001;
|
||||
const uint32_t RS_FILE_RATE_SLOW = 0x00000002;
|
||||
const uint32_t RS_FILE_RATE_STANDARD = 0x00000003;
|
||||
const uint32_t RS_FILE_RATE_FAST = 0x00000004;
|
||||
const uint32_t RS_FILE_RATE_STREAM_AUDIO = 0x00000005;
|
||||
const uint32_t RS_FILE_RATE_STREAM_VIDEO = 0x00000006;
|
||||
|
||||
const uint32_t RS_FILE_PEER_ONLINE = 0x00001000;
|
||||
const uint32_t RS_FILE_PEER_OFFLINE = 0x00002000;
|
||||
|
||||
/************************************
|
||||
* Used To indicate where to search.
|
||||
@ -67,6 +70,7 @@ const uint32_t RS_FILE_HINTS_DOWNLOAD = 0x00000010;
|
||||
const uint32_t RS_FILE_HINTS_UPLOAD = 0x00000020;
|
||||
|
||||
const uint32_t RS_FILE_HINTS_SPEC_ONLY = 0x01000000;
|
||||
const uint32_t RS_FILE_HINTS_NO_SEARCH = 0x02000000;
|
||||
|
||||
|
||||
const uint32_t RS_FILE_EXTRA_DELETE = 0x0010;
|
||||
@ -86,8 +90,8 @@ virtual ~RsFiles() { return; }
|
||||
/***
|
||||
* Control of Downloads.
|
||||
***/
|
||||
virtual bool FileRequest(std::string fname, std::string hash,
|
||||
uint32_t size, std::string dest, uint32_t flags) = 0;
|
||||
virtual bool FileRequest(std::string fname, std::string hash, uint32_t size,
|
||||
std::string dest, uint32_t flags, std::list<std::string> srcIds) = 0;
|
||||
virtual bool FileCancel(std::string hash) = 0;
|
||||
virtual bool FileControl(std::string hash, uint32_t flags) = 0;
|
||||
virtual bool FileClearCompleted() = 0;
|
||||
|
@ -105,6 +105,10 @@ class FileTransferInfo: public FileInfo
|
||||
FileTransferInfo() { return; }
|
||||
};
|
||||
|
||||
|
||||
std::ostream &operator<<(std::ostream &out, const FileInfo &info);
|
||||
|
||||
|
||||
/* matched to the uPnP states */
|
||||
#define UPNP_STATE_UNINITIALISED 0
|
||||
#define UPNP_STATE_UNAVAILABILE 1
|
||||
|
Loading…
Reference in New Issue
Block a user