libktorrent
2.2.0
|
#include <torrentfilestream.h>
Public Types | |
typedef QSharedPointer< TorrentFileStream > | Ptr |
typedef QWeakPointer< TorrentFileStream > | WPtr |
Public Member Functions | |
TorrentFileStream (TorrentControl *tc, ChunkManager *cman, bool streaming_mode, QObject *parent) | |
TorrentFileStream (TorrentControl *tc, Uint32 file_index, ChunkManager *cman, bool streaming_mode, QObject *parent) | |
bool | atEnd () const override |
Are we at the end of the file. | |
qint64 | bytesAvailable () const override |
How many bytes are there available. | |
const BitSet & | chunksBitSet () const |
Get a BitSet of all the chunks of this TorrentFileStream. | |
void | close () override |
Close the device. | |
Uint32 | currentChunk () const |
Get the current chunk relative to the first chunk of the file. | |
bool | isSequential () const override |
The stream is not sequential. | |
bool | open (QIODevice::OpenMode mode) override |
Open the device (only readonly access will be allowed) | |
QString | path () const |
Get the path of the file. | |
qint64 | pos () const override |
Get the current stream position. | |
bool | reset () override |
Reset the stream. | |
bool | seek (qint64 pos) override |
Seek, will fail if attempting to seek to a point which is not downloaded yet. | |
qint64 | size () const override |
Get the total size. | |
Protected Member Functions | |
void | emitReadChannelFinished () |
qint64 | readData (char *data, qint64 maxlen) override |
qint64 | writeData (const char *data, qint64 len) override |
QIODevice which streams a file of a torrent or the whole torrent (for single file torrents) This object should not be manually constructed.
Definition at line 43 of file torrentfilestream.h.