kget
segment.cpp
Go to the documentation of this file.
22 Segment::Segment(const KUrl &src, const QPair<KIO::fileoffset_t, KIO::fileoffset_t> &segmentSize, const QPair<int, int> &segmentRange, QObject *parent)
84 #if 0 //TODO: we disable that code till it's implemented in kdelibs, also we need to think, which settings we should use
90 connect(m_getJob, SIGNAL(totalSize(KJob*,qulonglong)), this, SLOT(slotTotalSize(KJob*,qulonglong)));
94 connect(m_getJob, SIGNAL(redirection(KIO::Job *,const KUrl &)), SLOT(slotRedirection(KIO::Job *, const KUrl &)));
214 if (!m_findFilesize && m_totalBytesLeft && static_cast<uint>(m_buffer.size()) >= m_totalBytesLeft)
216 kDebug(5001) << "Segment::slotData() buffer full. stoping transfer...";//TODO really stop it? is this even needed?
238 kDebug(5001) << "Segment::writeBuffer() sending:" << m_buffer.size() << "from job:" << m_getJob;
254 kDebug(5001) << "Segment::writeBuffer() updating segment record of job:" << m_getJob << "--" << m_totalBytesLeft << "bytes left";
347 kDebug(5001) << "Start:" << m_currentSegment << "old end:" << m_endSegment << "new end:" << newEnd << "freed:" << freed;
364 bool Segment::merge(const QPair<KIO::fileoffset_t, KIO::fileoffset_t> &segmentSize, const QPair<int, int> &segmentRange)
void clear()
void canResume()
Definition: transfer.h:84
bool isEmpty() const
Definition: segment.h:43
QPair< KIO::fileoffset_t, KIO::fileoffset_t > segmentSize() const
Definition: segment.cpp:314
Definition: segment.h:46
Definition: segment.h:42
void data(KIO::fileoffset_t offset, const QByteArray &data, bool &worked)
void totalSize(KIO::filesize_t size, QPair< int, int > segmentRange)
void truncate(int pos)
QByteArray & append(char ch)
bool merge(const QPair< KIO::fileoffset_t, KIO::fileoffset_t > &segmentSize, const QPair< int, int > &segmentRange)
Definition: segment.cpp:364
Segment(const KUrl &src, const QPair< KIO::fileoffset_t, KIO::fileoffset_t > &segmentSize, const QPair< int, int > &segmentRange, QObject *parent)
Definition: segment.cpp:22
void finishedSegment(Segment *segment, int segmentNum, bool connectionFinished=true)
void error(Segment *segment, const QString &errorText, Transfer::LogLevel logLevel)
Emitted whenever the transfer is closed with an error.
void finishedDownload(KIO::filesize_t size)
Definition: transfer.h:85
Definition: segment.h:44
void statusChanged(Segment *)
int size() const
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
void urlChanged(const KUrl &newUrl)
singleShot
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.