From a90eb215f53c95d81f95b32255098066d90556d9 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Sun, 18 Dec 2011 18:13:41 -0600 Subject: Rename old tq methods that no longer need a unique name --- libktorrent/torrent/chunkdownload.cpp | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'libktorrent/torrent/chunkdownload.cpp') diff --git a/libktorrent/torrent/chunkdownload.cpp b/libktorrent/torrent/chunkdownload.cpp index 04eb87f..3475441 100644 --- a/libktorrent/torrent/chunkdownload.cpp +++ b/libktorrent/torrent/chunkdownload.cpp @@ -35,17 +35,17 @@ namespace bt { - class DownloadtqStatus : public std::set + class DownloadStatus : public std::set { public: // typedef std::set::iterator iterator; - DownloadtqStatus() + DownloadStatus() { } - ~DownloadtqStatus() + ~DownloadStatus() { } @@ -111,7 +111,7 @@ namespace bt return false; - DownloadtqStatus* ds = dstatus.find(p.getPeer()); + DownloadStatus* ds = dstatus.find(p.getPeer()); if (ds) ds->remove(pp); @@ -169,7 +169,7 @@ namespace bt pd->grab(); pdown.append(pd); - dstatus.insert(pd->getPeer()->getID(),new DownloadtqStatus()); + dstatus.insert(pd->getPeer()->getID(),new DownloadStatus()); sendRequests(pd); connect(pd,TQT_SIGNAL(timedout(const Request& )),this,TQT_SLOT(onTimeout(const Request& ))); connect(pd,TQT_SIGNAL(rejected( const Request& )),this,TQT_SLOT(onRejected( const Request& ))); @@ -179,7 +179,7 @@ namespace bt void ChunkDownload::notDownloaded(const Request & r,bool reject) { // find the peer - DownloadtqStatus* ds = dstatus.find(r.getPeer()); + DownloadStatus* ds = dstatus.find(r.getPeer()); if (ds) { // Out() << "ds != 0" << endl; @@ -216,7 +216,7 @@ namespace bt void ChunkDownload::sendRequests(PeerDownloader* pd) { timer.update(); - DownloadtqStatus* ds = dstatus.find(pd->getPeer()->getID()); + DownloadStatus* ds = dstatus.find(pd->getPeer()->getID()); if (!ds) return; @@ -262,11 +262,11 @@ namespace bt void ChunkDownload::sendCancels(PeerDownloader* pd) { - DownloadtqStatus* ds = dstatus.find(pd->getPeer()->getID()); + DownloadStatus* ds = dstatus.find(pd->getPeer()->getID()); if (!ds) return; - DownloadtqStatus::iterator itr = ds->begin(); + DownloadStatus::iterator itr = ds->begin(); while (itr != ds->end()) { Uint32 i = *itr; @@ -287,7 +287,7 @@ namespace bt while (i != pdown.end()) { PeerDownloader* pd = *i; - DownloadtqStatus* ds = dstatus.find(pd->getPeer()->getID()); + DownloadStatus* ds = dstatus.find(pd->getPeer()->getID()); Uint32 pp = p.getOffset() / MAX_PIECE_LEN; if (ds && ds->contains(pp)) { @@ -360,7 +360,7 @@ namespace bt ChunkDownloadHeader hdr; hdr.index = chunk->getIndex(); hdr.num_bits = pieces.getNumBits(); - hdr.buffered = chunk->gettqStatus() == Chunk::BUFFERED ? 1 : 0; + hdr.buffered = chunk->getStatus() == Chunk::BUFFERED ? 1 : 0; // save the chunk header file.write(&hdr,sizeof(ChunkDownloadHeader)); // save the bitset @@ -370,7 +370,7 @@ namespace bt // if it's a buffered chunk, save the contents to file.write(chunk->getData(),chunk->getSize()); chunk->clear(); - chunk->settqStatus(Chunk::ON_DISK); + chunk->setStatus(Chunk::ON_DISK); } } -- cgit v1.2.1