|
libktorrent
2.1.1
|
#include <datachecker.h>

Signals | |
| void | progress (quint32 num, quint32 total) |
| void | status (quint32 num_failed, quint32 num_found, quint32 num_downloaded, quint32 num_not_downloaded) |
Public Member Functions | |
| DataChecker (bt::Uint32 from, bt::Uint32 to) | |
| virtual void | check (const QString &path, const Torrent &tor, const QString &dnddir, const BitSet ¤t_status)=0 |
| const BitSet & | getResult () const |
| void | stop () |
| Stop an ongoing check. | |
Protected Attributes | |
| Uint32 | downloaded |
| Uint32 | failed |
| Uint32 | found |
| bt::Uint32 | from |
| bool | need_to_stop |
| Uint32 | not_downloaded |
| BitSet | result |
| bt::Uint32 | to |
Checks which data is downloaded, given a torrent and a file or directory containing files of the torrent.
Definition at line 41 of file datachecker.h.
|
pure virtual |
Check to see which chunks have been downloaded of a torrent, and which chunks fail. The corresponding bitsets should be filled with this information. If anything goes wrong and Error should be thrown.
| path | path to the file or dir (this needs to end with the name suggestion of the torrent) |
| tor | The torrent |
| dnddir | DND dir, optional argument if we know this |
| current_status | Current status of the torrent |
Implemented in bt::MultiDataChecker, and bt::SingleDataChecker.
|
inline |
Get the BitSet representing all the downloaded chunks and which is the result of the data check.
Definition at line 62 of file datachecker.h.
|
signal |
Emitted when a chunk has been proccessed.
| num | The number processed |
| total | The total number of pieces to process |
|
signal |
Emitted when a failed or dowloaded chunk is found.
| num_failed | The number of failed chunks |
| num_found | The number of found chunks |
| num_downloaded | Number of downloaded chunks |
| num_not_downloaded | Number of not downloaded chunks |
1.8.18