kget
bt::ChunkSelectorInterface Class Reference
#include <chunkselectorinterface.h>

Detailed Description
Interface class for selecting chunks to download.
Definition at line 40 of file chunkselectorinterface.h.
Public Member Functions | |
| ChunkSelectorInterface (ChunkManager &cman, Downloader &downer, PeerManager &pman) | |
| virtual void | dataChecked (const BitSet &ok_chunks)=0 |
| virtual void | reincluded (Uint32 from, Uint32 to)=0 |
| virtual void | reinsert (Uint32 chunk)=0 |
| virtual bool | select (PieceDownloader *pd, Uint32 &chunk)=0 |
| virtual bool | selectRange (Uint32 &from, Uint32 &to) |
| virtual | ~ChunkSelectorInterface () |
Protected Attributes | |
| ChunkManager & | cman |
| Downloader & | downer |
| PeerManager & | pman |
Constructor & Destructor Documentation
| bt::ChunkSelectorInterface::ChunkSelectorInterface | ( | ChunkManager & | cman, | |
| Downloader & | downer, | |||
| PeerManager & | pman | |||
| ) |
Definition at line 26 of file chunkselectorinterface.cpp.
| bt::ChunkSelectorInterface::~ChunkSelectorInterface | ( | ) | [virtual] |
Definition at line 32 of file chunkselectorinterface.cpp.
Member Function Documentation
| virtual void bt::ChunkSelectorInterface::dataChecked | ( | const BitSet & | ok_chunks | ) | [pure virtual] |
Data has been checked, and these chunks are OK.
- Parameters:
-
ok_chunks The ok_chunks
Implemented in BTChunkSelector, and bt::ChunkSelector.
A range of chunks has been reincluded.
This is called when a user reselects a file for download.
- Parameters:
-
from The first chunk to The last chunk
Implemented in BTChunkSelector, and bt::ChunkSelector.
| virtual void bt::ChunkSelectorInterface::reinsert | ( | Uint32 | chunk | ) | [pure virtual] |
Reinsert a chunk.
This is called when a chunk is corrupted or downloading it failed (hash doesn't match) The selector should make sure that this is added again
- Parameters:
-
chunk The chunk
Implemented in BTChunkSelector, and bt::ChunkSelector.
| virtual bool bt::ChunkSelectorInterface::select | ( | PieceDownloader * | pd, | |
| Uint32 & | chunk | |||
| ) | [pure virtual] |
Select which chunk to download for a PieceDownloader.
- Parameters:
-
pd The PieceDownloader chunk Index of chunk gets stored here
- Returns:
- true upon succes, false otherwise
Implemented in BTChunkSelector, and bt::ChunkSelector.
Select a range of chunks to download from a webseeder.
- Parameters:
-
from First chunk of the range to Last chunk of the range
- Returns:
- true if everything is OK
Reimplemented in bt::ChunkSelector.
Definition at line 36 of file chunkselectorinterface.cpp.
Member Data Documentation
ChunkManager& bt::ChunkSelectorInterface::cman [protected] |
Definition at line 43 of file chunkselectorinterface.h.
Downloader& bt::ChunkSelectorInterface::downer [protected] |
Definition at line 44 of file chunkselectorinterface.h.
PeerManager& bt::ChunkSelectorInterface::pman [protected] |
Definition at line 45 of file chunkselectorinterface.h.
The documentation for this class was generated from the following files:
KDE 4.2 API Reference