restaured priority queue methods, and made better context menues.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2135 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2010-01-26 23:25:00 +00:00
parent 7b35b7dc6a
commit 7fd5c7ad4b
12 changed files with 207 additions and 178 deletions

View file

@ -119,8 +119,10 @@ class RsFiles
/***
* Control of Downloads Priority.
***/
virtual bool changePriority(const std::string hash, int priority) = 0;
virtual bool getPriority(const std::string hash, int & priority) = 0;
virtual bool changeQueuePriority(const std::string hash, int priority) = 0;
virtual bool changeDownloadSpeed(const std::string hash, int speed) = 0;
virtual bool getQueuePriority(const std::string hash, int & priority) = 0;
virtual bool getDownloadSpeed(const std::string hash, int & speed) = 0;
virtual bool clearDownload(const std::string hash) = 0;
virtual void clearQueue() = 0;
virtual void getDwlDetails(std::list<DwlDetails> & details) = 0;

View file

@ -63,6 +63,12 @@ enum DwlPriority { PRIORITY_LOW = 0x00,
PRIORITY_AUTO = 0x03
};
enum DwlSpeed { SPEED_LOW = 0x00,
SPEED_NORMAL = 0x01,
SPEED_HIGH = 0x02
};
class FileInfo
{
@ -107,7 +113,7 @@ class FileInfo
uint32_t downloadStatus; /* 0 = Err, 1 = Ok, 2 = Done */
std::list<TransferInfo> peers;
DwlPriority priority ;
DwlSpeed priority ;
time_t lastTS;
};