kget
BTCache Class Reference
#include <btcache.h>
Inheritance diagram for BTCache:

Detailed Description
Definition at line 33 of file btcache.h.
Signals | |
| void | dataArrived (const KIO::fileoffset_t &offset, const QByteArray &data) |
Public Member Functions | |
| BTCache (bt::Torrent &tor, const QString &tmpdir, const QString &datadir) | |
| virtual void | changeOutputPath (const QString &outputpath) |
| virtual void | changeTmpDir (const QString &ndir) |
| virtual void | close () |
| virtual void | create () |
| virtual void | deleteDataFiles () |
| virtual Uint64 | diskUsage () |
| virtual void | downloadStatusChanged (TorrentFile *, bool) |
| virtual QString | getOutputPath () const |
| virtual bool | hasMissingFiles (QStringList &sl) |
| virtual void | load (Chunk *c) |
| virtual void | loadFileMap () |
| virtual KJob * | moveDataFiles (const QString &ndir) |
| virtual void | moveDataFilesFinished (KJob *job) |
| virtual void | open () |
| virtual void | preallocateDiskSpace (PreallocationThread *prealloc) |
| virtual bool | prep (Chunk *c) |
| virtual void | save (Chunk *c) |
| virtual void | saveFileMap () |
| ~BTCache () | |
Constructor & Destructor Documentation
| BTCache::BTCache | ( | bt::Torrent & | tor, | |
| const QString & | tmpdir, | |||
| const QString & | datadir | |||
| ) |
Definition at line 19 of file btcache.cpp.
| BTCache::~BTCache | ( | ) |
Definition at line 25 of file btcache.cpp.
Member Function Documentation
| virtual void BTCache::changeOutputPath | ( | const QString & | outputpath | ) | [inline, virtual] |
| virtual void BTCache::changeTmpDir | ( | const QString & | ndir | ) | [inline, virtual] |
| virtual void BTCache::close | ( | ) | [inline, virtual] |
| virtual void BTCache::create | ( | ) | [inline, virtual] |
| void BTCache::dataArrived | ( | const KIO::fileoffset_t & | offset, | |
| const QByteArray & | data | |||
| ) | [signal] |
| void BTCache::deleteDataFiles | ( | ) | [virtual] |
Delete all data files, in case of multi file torrents empty directories should also be deleted.
Implements bt::Cache.
Definition at line 67 of file btcache.cpp.
| virtual Uint64 BTCache::diskUsage | ( | ) | [inline, virtual] |
| virtual void BTCache::downloadStatusChanged | ( | TorrentFile * | , | |
| bool | ||||
| ) | [inline, virtual] |
| virtual QString BTCache::getOutputPath | ( | ) | const [inline, virtual] |
| virtual bool BTCache::hasMissingFiles | ( | QStringList & | sl | ) | [inline, virtual] |
| void BTCache::load | ( | Chunk * | c | ) | [virtual] |
Load a chunk into memory.
If something goes wrong, an Error should be thrown.
- Parameters:
-
c The Chunk
Implements bt::Cache.
Definition at line 29 of file btcache.cpp.
| virtual void BTCache::loadFileMap | ( | ) | [inline, virtual] |
| virtual void BTCache::moveDataFilesFinished | ( | KJob * | job | ) | [inline, virtual] |
| virtual void BTCache::open | ( | ) | [inline, virtual] |
| virtual void BTCache::preallocateDiskSpace | ( | PreallocationThread * | prealloc | ) | [inline, virtual] |
| bool BTCache::prep | ( | Chunk * | c | ) | [virtual] |
Prepare a chunk for downloading.
- Parameters:
-
c The Chunk
- Returns:
- true if ok, false otherwise
Implements bt::Cache.
Definition at line 61 of file btcache.cpp.
| void BTCache::save | ( | Chunk * | c | ) | [virtual] |
Save a chunk to disk.
If something goes wrong, an Error should be thrown.
- Parameters:
-
c The Chunk
Implements bt::Cache.
Definition at line 34 of file btcache.cpp.
| virtual void BTCache::saveFileMap | ( | ) | [inline, virtual] |
The documentation for this class was generated from the following files:
KDE 4.2 API Reference