• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdenetwork API Reference
  • KDE Home
  • Contact Us
 

kget

Public Member Functions | List of all members
BTDataSource Class Reference

#include <btdatasource.h>

Inheritance diagram for BTDataSource:
Inheritance graph
[legend]

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 ()
 
- Public Member Functions inherited from TransferDataSource
 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

- Public Types inherited from TransferDataSource
enum  Error { Unknown, WrongDownloadSize, NotResumeable }
 
- Signals inherited from TransferDataSource
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)
 
- Protected Member Functions inherited from TransferDataSource
void setCapabilities (Transfer::Capabilities capabilities)
 
- Protected Attributes inherited from TransferDataSource
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

void BTDataSource::addSegments ( const QPair< KIO::fileoffset_t, KIO::fileoffset_t > &  segmentSize,
const QPair< int, int > &  segmentRange 
)
virtual

Adds multiple continuous segments that should be downloaded by this TransferDataSource.

Parameters
segmentSizefirst 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.
segmentRangefirst 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.

void BTDataSource::start ( )
virtual

Implements TransferDataSource.

Definition at line 79 of file btdatasource.cpp.

void BTDataSource::stop ( )
virtual

Implements TransferDataSource.

Definition at line 111 of file btdatasource.cpp.


The documentation for this class was generated from the following files:
  • btdatasource.h
  • btdatasource.cpp
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.

kget

Skip menu "kget"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members

kdenetwork API Reference

Skip menu "kdenetwork API Reference"
  • kget
  • kopete
  •   kopete
  •   libkopete
  • krdc
  • krfb

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal