kget
BTDataSource Class Reference
#include <btdatasource.h>
Inheritance diagram for BTDataSource:

Public Member Functions | |
BTDataSource (const KUrl &srcUrl, QObject *parent) | |
~BTDataSource () | |
void | addSegments (const QPair< KIO::fileoffset_t, KIO::fileoffset_t > &segmentSize, const QPair< int, int > &segmentRange) |
void | getData (const KIO::fileoffset_t &off, const QByteArray &dataArray) |
void | start () |
void | stop () |
![]() | |
TransferDataSource (const KUrl &srcUrl, QObject *parent) | |
virtual | ~TransferDataSource () |
virtual QList< QPair< int, int > > | assignedSegments () const |
Transfer::Capabilities | capabilities () const |
virtual int | changeNeeded () const |
virtual int | countUnfinishedSegments () const |
virtual int | currentSegments () const |
ulong | currentSpeed () const |
virtual void | findFileSize (KIO::fileoffset_t segmentSize) |
virtual int | paralellSegments () const |
virtual QPair< int, int > | removeConnection () |
virtual void | setParalellSegments (int paralellSegments) |
virtual void | setSupposedSize (KIO::filesize_t supposedSize) |
KUrl | sourceUrl () const |
virtual QPair< int, int > | split () |
Additional Inherited Members | |
![]() | |
enum | Error { Unknown, WrongDownloadSize, NotResumeable } |
![]() | |
void | broken (TransferDataSource *source, TransferDataSource::Error error) |
void | brokenSegments (TransferDataSource *source, QPair< int, int > segmentRange) |
void | capabilitiesChanged () |
void | data (KIO::fileoffset_t offset, const QByteArray &data, bool &worked) |
void | data (const QList< KUrl > &data) |
void | data (const QString type, const QString checksum) |
void | finished () |
void | finishedDownload (TransferDataSource *source, KIO::filesize_t fileSize) |
void | finishedSegment (TransferDataSource *source, int segmentNumber, bool connectionFinished=true) |
void | foundFileSize (TransferDataSource *source, KIO::filesize_t fileSize, const QPair< int, int > &segmentRange) |
void | freeSegments (TransferDataSource *source, QPair< int, int > segmentRange) |
void | log (const QString &message, Transfer::LogLevel logLevel) |
void | speed (ulong speed) |
void | urlChanged (const KUrl &old, const KUrl &newUrl) |
![]() | |
void | setCapabilities (Transfer::Capabilities capabilities) |
![]() | |
int | m_currentSegments |
int | m_paralellSegments |
KUrl | m_sourceUrl |
ulong | m_speed |
KIO::filesize_t | m_supposedSize |
Detailed Description
Definition at line 30 of file btdatasource.h.
Constructor & Destructor Documentation
BTDataSource::BTDataSource | ( | const KUrl & | srcUrl, |
QObject * | parent | ||
) |
Definition at line 32 of file btdatasource.cpp.
BTDataSource::~BTDataSource | ( | ) |
Definition at line 62 of file btdatasource.cpp.
Member Function Documentation
|
virtual |
Adds multiple continuous segments that should be downloaded by this TransferDataSource.
- Parameters
-
segmentSize first is always the general segmentSize, second the segmentSize of the last segment in the range. If just one (the last) segment was assigned, then first would not equal second, this is to ensure that first can be used to calculate the offset TransferDataSources have to handle all that internally. segmentRange first the beginning, second the end
Implements TransferDataSource.
void BTDataSource::getData | ( | const KIO::fileoffset_t & | off, |
const QByteArray & | dataArray | ||
) |
Definition at line 162 of file btdatasource.cpp.
|
virtual |
Implements TransferDataSource.
Definition at line 79 of file btdatasource.cpp.
|
virtual |
Implements TransferDataSource.
Definition at line 111 of file btdatasource.cpp.
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
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.