kget
#include <btcache.h>
|
void | dataArrived (const KIO::fileoffset_t &offset, const QByteArray &data) |
|
Definition at line 33 of file btcache.h.
BTCache::BTCache |
( |
bt::Torrent & |
tor, |
|
|
const QString & |
tmpdir, |
|
|
const QString & |
datadir |
|
) |
| |
virtual void BTCache::changeOutputPath |
( |
const QString & |
outputpath | ) |
|
|
inlinevirtual |
Changes output path.
All data files should already been moved. This just modifies the datadir variable.
- Parameters
-
outputpath | New output path |
Definition at line 69 of file btcache.h.
virtual void BTCache::changeTmpDir |
( |
const QString & |
ndir | ) |
|
|
inlinevirtual |
Changes the tmp dir.
All data files should already been moved. This just modifies the tmpdir variable.
- Parameters
-
Definition at line 62 of file btcache.h.
virtual void BTCache::close |
( |
| ) |
|
|
inlinevirtual |
Close the cache file(s).
Definition at line 113 of file btcache.h.
virtual void BTCache::create |
( |
| ) |
|
|
inlinevirtual |
Create all the data files to store the data.
Definition at line 108 of file btcache.h.
void BTCache::dataArrived |
( |
const KIO::fileoffset_t & |
offset, |
|
|
const QByteArray & |
data |
|
) |
| |
|
signal |
void BTCache::deleteDataFiles |
( |
| ) |
|
|
inlinevirtual |
Delete all data files, in case of multi file torrents empty directories should also be deleted.
Definition at line 139 of file btcache.h.
virtual Uint64 BTCache::diskUsage |
( |
| ) |
|
|
inlinevirtual |
Get the number of bytes all the files of this torrent are currently using on disk.
Definition at line 147 of file btcache.h.
virtual void BTCache::downloadStatusChanged |
( |
TorrentFile * |
, |
|
|
bool |
|
|
) |
| |
|
inlinevirtual |
Does nothing, can be overridden to be alerted of download status changes of a TorrentFile.
Definition at line 121 of file btcache.h.
virtual QString BTCache::getOutputPath |
( |
| ) |
const |
|
inlinevirtual |
Get the actual output path.
- Returns
- The output path
Definition at line 55 of file btcache.h.
virtual bool BTCache::hasMissingFiles |
( |
QStringList & |
sl | ) |
|
|
inlinevirtual |
Test all files and see if they are not missing.
If so put them in a list
Definition at line 133 of file btcache.h.
void BTCache::load |
( |
Chunk * |
c | ) |
|
|
virtual |
Load a chunk into memory.
If something goes wrong, an Error should be thrown.
- Parameters
-
Definition at line 29 of file btcache.cpp.
virtual void BTCache::loadFileMap |
( |
| ) |
|
|
inlinevirtual |
Load the file map of a torrent.
If it doesn't exist, it needs to be created.
Definition at line 44 of file btcache.h.
virtual bt::PieceData* BTCache::loadPiece |
( |
bt::Chunk * |
, |
|
|
bt::Uint32 |
, |
|
|
bt::Uint32 |
|
|
) |
| |
|
inlinevirtual |
virtual KJob* BTCache::moveDataFiles |
( |
const QString & |
ndir | ) |
|
|
inlinevirtual |
Move the data files to a new directory.
- Parameters
-
- Returns
- The job doing the move
Definition at line 76 of file btcache.h.
virtual void BTCache::moveDataFilesFinished |
( |
KJob * |
job | ) |
|
|
inlinevirtual |
A move of a bunch of data files has finished.
- Parameters
-
job | The job doing the move |
Definition at line 82 of file btcache.h.
virtual void BTCache::open |
( |
| ) |
|
|
inlinevirtual |
Open the cache file(s)
Definition at line 118 of file btcache.h.
virtual void BTCache::preallocateDiskSpace |
( |
PreallocationThread * |
prealloc | ) |
|
|
inlinevirtual |
Preallocate diskspace for all files.
- Parameters
-
prealloc | The thread doing the preallocation |
Definition at line 127 of file btcache.h.
bool BTCache::prep |
( |
Chunk * |
c | ) |
|
|
virtual |
Prepare a chunk for downloading.
- Parameters
-
- Returns
- true if ok, false otherwise
Definition at line 61 of file btcache.cpp.
virtual bt::PieceData* BTCache::preparePiece |
( |
bt::Chunk * |
, |
|
|
bt::Uint32 |
, |
|
|
bt::Uint32 |
|
|
) |
| |
|
inlinevirtual |
void BTCache::save |
( |
Chunk * |
c | ) |
|
|
virtual |
Save a chunk to disk.
If something goes wrong, an Error should be thrown.
- Parameters
-
Definition at line 34 of file btcache.cpp.
virtual void BTCache::saveFileMap |
( |
| ) |
|
|
inlinevirtual |
Save the file map of a torrent.
Definition at line 49 of file btcache.h.
virtual void BTCache::savePiece |
( |
bt::PieceData * |
| ) |
|
|
inlinevirtual |
The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:53:18 by
doxygen 1.8.7 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.