kget
btdatasource.cpp
Go to the documentation of this file.
38 bt::InitLog(KStandardDirs::locateLocal("appdata", "torrentlog.log"));//initialize the torrent-log
40 bt::SetClientInfo("KGet",2,1,0,bt::NORMAL,"KG");//Set client info to KGet, WARNING: Pls change this for every release
71 connect(cache, SIGNAL(dataArrived(KIO::fileoffset_t,QByteArray)), SLOT(getData(KIO::fileoffset_t,QByteArray)));
83 Download *download = new Download(m_source, KStandardDirs::locateLocal("appdata", "tmp/") + m_source.fileName());
92 Uint32 lastChunk = ((m_offset + m_bytes) / tc->getStats().chunk_size) + 1;//The +1 is only a workaround for rounding up, but I dunno how to do it ;)
93 for (int i = firstChunk * tc->getStats().chunk_size * 8; i <= lastChunk * tc->getStats().chunk_size * 8; i++)
140 void BTDataSource::addSegment(const KIO::fileoffset_t offset, const KIO::fileoffset_t bytes, int segmentNum)
Definition: download.h:23
void broken(TransferDataSource *source, TransferDataSource::Error error)
Alert that datasource is no able to send any data.
Definition: btchunkselector.h:29
BTDataSource(const KUrl &srcUrl, QObject *parent)
Definition: btdatasource.cpp:32
This Class is an interface for inter-plugins data change.
Definition: transferdatasource.h:26
virtual void reincluded(bt::Uint32 from, bt::Uint32 to)
Definition: btchunkselector.cpp:247
Definition: btcache.h:156
void data(KIO::fileoffset_t offset, const QByteArray &data, bool &worked)
Returns data in the forms of chucks.
QByteArray right(int len) const
void getData(const KIO::fileoffset_t &off, const QByteArray &dataArray)
Definition: btdatasource.cpp:162
void stop()
QByteArray left(int len) const
void start(int msec)
Definition: btchunkselector.h:49
int size() const
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
Definition: btcache.h:33
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:28:43 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:28:43 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.