Optimized some small things in TransferDialog and SearchDialog.

Changed the parameter of the constructor of ftFileCreator and ftFileProvider and some methods of ftTransferModule from "std::string" to "const std::string&"

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4045 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
thunder2 2011-02-20 00:59:47 +00:00
parent 61b57ede65
commit db19db7e60
8 changed files with 40 additions and 33 deletions

View file

@ -133,13 +133,13 @@ public:
~ftTransferModule();
//interface to download controller
bool setFileSources(std::list<std::string> peerIds);
bool addFileSource(std::string peerId);
bool removeFileSource(std::string peerId);
bool setPeerState(std::string peerId,uint32_t state,uint32_t maxRate); //state = ONLINE/OFFLINE
bool setFileSources(const std::list<std::string>& peerIds);
bool addFileSource(const std::string& peerId);
bool removeFileSource(const std::string& peerId);
bool setPeerState(const std::string& peerId,uint32_t state,uint32_t maxRate); //state = ONLINE/OFFLINE
bool getFileSources(std::list<std::string> &peerIds);
bool getPeerState(std::string peerId,uint32_t &state,uint32_t &tfRate);
uint32_t getDataRate(std::string peerId);
bool getPeerState(const std::string& peerId,uint32_t &state,uint32_t &tfRate);
uint32_t getDataRate(const std::string& peerId);
bool cancelTransfer();
bool cancelFileTransferUpward();
bool completeFileTransfer();
@ -148,9 +148,9 @@ public:
void addCRC32Map(const CRC32Map& map) ;
//interface to multiplex module
bool recvFileData(std::string peerId, uint64_t offset,
bool recvFileData(const std::string& peerId, uint64_t offset,
uint32_t chunk_size, void *data);
void requestData(std::string peerId, uint64_t offset, uint32_t chunk_size);
void requestData(const std::string& peerId, uint64_t offset, uint32_t chunk_size);
//interface to file creator
bool getChunk(const std::string& peer_id,uint32_t size_hint,uint64_t &offset, uint32_t &chunk_size);