kget
bt::Downloader Class Reference
#include <downloader.h>

Detailed Description
Manages the downloading
This class manages the downloading of the file. It should regurarly be updated.
Definition at line 67 of file downloader.h.
Constructor & Destructor Documentation
| bt::Downloader::Downloader | ( | Torrent & | tor, | |
| PeerManager & | pman, | |||
| ChunkManager & | cman, | |||
| ChunkSelectorFactoryInterface * | fac | |||
| ) |
Constructor.
- Parameters:
-
tor The Torrent pman The PeerManager cman The ChunkManager fac The ChunkSelectorFactory, if this is 0, a default one will be created (note: Downloader will take control of this and delete it when it gets deleted)
Definition at line 49 of file downloader.cpp.
| bt::Downloader::~Downloader | ( | ) | [virtual] |
Definition at line 84 of file downloader.cpp.
Member Function Documentation
| WebSeed * bt::Downloader::addWebSeed | ( | const KUrl & | url | ) |
| bool bt::Downloader::areWeDownloading | ( | Uint32 | chunk | ) | const |
See if we are downloading a Chunk.
- Parameters:
-
chunk ID of Chunk
- Returns:
- true if we are, false if not
Definition at line 405 of file downloader.cpp.
| CurChunkCItr bt::Downloader::beginDownloads | ( | ) | const [inline] |
Definition at line 125 of file downloader.h.
| Uint64 bt::Downloader::bytesDownloaded | ( | ) | const [inline] |
| bool bt::Downloader::canDownloadFromWebSeed | ( | Uint32 | chunk | ) | const |
Can we download a chunk from a webseed.
- Parameters:
-
chunk ID of Chunk
- Returns:
- true if we can
Definition at line 410 of file downloader.cpp.
| void bt::Downloader::clearDownloads | ( | ) |
| void bt::Downloader::corrupted | ( | Uint32 | chunk | ) |
A corrupted chunk has been detected, make sure we redownload it.
- Parameters:
-
chunk The chunk
Definition at line 737 of file downloader.cpp.
| void bt::Downloader::dataChecked | ( | const BitSet & | ok_chunks | ) | [slot] |
Data has been checked, and these chunks are OK.
- Parameters:
-
ok_chunks The ok_chunks
Definition at line 749 of file downloader.cpp.
| Uint32 bt::Downloader::downloadRate | ( | ) | const |
| CurChunkCItr bt::Downloader::endDownloads | ( | ) | const [inline] |
Definition at line 126 of file downloader.h.
Get the number of bytes already downloaded in the current_chunks file.
- Parameters:
-
file The path of the current_chunks file
- Returns:
- The bytes already downloading
Definition at line 654 of file downloader.cpp.
| Uint32 bt::Downloader::getNumWebSeeds | ( | ) | const [inline] |
| void bt::Downloader::ioError | ( | const QString & | msg | ) | [signal] |
An error occurred while we we're writing or reading from disk.
- Parameters:
-
msg Message
| bool bt::Downloader::isFinished | ( | ) | const |
| void bt::Downloader::loadDownloads | ( | const QString & | file | ) |
Load the current downloads.
- Parameters:
-
file The file to load from
Definition at line 581 of file downloader.cpp.
| void bt::Downloader::loadWebSeeds | ( | const QString & | file | ) |
| Uint32 bt::Downloader::numActiveDownloads | ( | ) | const [inline] |
Get the number of downloaders assigned to a chunk.
- Parameters:
-
chunk ID of Chunk
- Returns:
- the number of downloaders for that chunk
Definition at line 418 of file downloader.cpp.
| void bt::Downloader::onNewPeer | ( | Peer * | peer | ) | [slot] |
| void bt::Downloader::onPeerKilled | ( | Peer * | peer | ) | [slot] |
| void bt::Downloader::recalcDownloaded | ( | ) | [slot] |
| bool bt::Downloader::removeWebSeed | ( | const KUrl & | url | ) |
| void bt::Downloader::saveDownloads | ( | const QString & | file | ) |
Save the current downloads.
- Parameters:
-
file The file to save to
Definition at line 558 of file downloader.cpp.
| void bt::Downloader::saveWebSeeds | ( | const QString & | file | ) |
Set the group ID's of the webseed (for speed limits).
- Parameters:
-
up Upload group id down Download group id
Definition at line 920 of file downloader.cpp.
| void bt::Downloader::setMemoryUsage | ( | Uint32 | m | ) | [static, slot] |
Definition at line 744 of file downloader.cpp.
| void bt::Downloader::setMonitor | ( | MonitorInterface * | tmo | ) | [slot] |
| void bt::Downloader::update | ( | ) | [slot] |
The documentation for this class was generated from the following files:
KDE 4.2 API Reference