kget
#include <bttransfer.h>
Public Member Functions | |
BTTransfer (TransferGroup *parent, TransferFactory *factory, Scheduler *scheduler, const KUrl &src, const KUrl &dest, const QDomElement *e=0) | |
~BTTransfer () | |
void | addTracker (const QString &url) |
int | chunksDownloaded () const |
int | chunksExcluded () const |
int | chunksLeft () const |
int | chunksTotal () const |
void | deinit (Transfer::DeleteOptions options) |
virtual KUrl | directory () const |
virtual int | elapsedTime () const |
FileModel * | fileModel () |
virtual QList< KUrl > | files () const |
virtual bool | isStalled () const |
virtual bool | isWorking () const |
int | leechesConnected () const |
int | leechesDisconnected () const |
bool | ready () |
virtual int | remainingTime () const |
int | seedsConnected () const |
int | seedsDisconnected () const |
int | sessionBytesDownloaded () const |
int | sessionBytesUploaded () const |
virtual bool | setDirectory (const KUrl &newDirectory) |
void | setPort (int port) |
void | start () |
void | stop () |
bt::TorrentControl * | torrentControl () |
KUrl::List | trackersList () const |
Public Member Functions inherited from Transfer | |
Transfer (TransferGroup *parent, TransferFactory *factory, Scheduler *scheduler, const KUrl &src, const KUrl &dest, const QDomElement *e=0) | |
virtual | ~Transfer () |
virtual QHash< KUrl, QPair < bool, int > > | availableMirrors (const KUrl &file) const |
int | averageDownloadSpeed () const |
Capabilities | capabilities () const |
void | checkShareRatio () |
void | create () |
virtual void | deinit (DeleteOptions options) |
const KUrl & | dest () const |
void | destroy (DeleteOptions options) |
KIO::filesize_t | downloadedSize () const |
int | downloadLimit (SpeedLimit limit) const |
int | downloadSpeed () const |
TransferFactory * | factory () const |
TransferGroup * | group () const |
TransferHandler * | handler () |
virtual void | init () |
bool | isSelected () const |
const QStringList | log () const |
double | maximumShareRatio () |
TransferTreeModel * | model () |
bool | operator< (const Transfer &t2) const |
int | percent () const |
virtual bool | repair (const KUrl &file=KUrl()) |
virtual void | save (const QDomElement &element) |
virtual void | setAvailableMirrors (const KUrl &file, const QHash< KUrl, QPair< bool, int > > &mirrors) |
void | setDownloadLimit (int dlLimit, SpeedLimit limit) |
void | setMaximumShareRatio (double ratio) |
void | setUploadLimit (int ulLimit, SpeedLimit limit) |
virtual Signature * | signature (const KUrl &file) |
const KUrl & | source () const |
QPixmap | statusPixmap () const |
QString | statusText () const |
KIO::filesize_t | totalSize () const |
KIO::filesize_t | uploadedSize () const |
int | uploadLimit (SpeedLimit limit) const |
int | uploadSpeed () const |
virtual Verifier * | verifier (const KUrl &file) |
Public Member Functions inherited from Job | |
Job (Scheduler *scheduler, JobQueue *parent) | |
virtual | ~Job () |
Error | error () const |
JobQueue * | jobQueue () |
Policy | policy () const |
virtual void | resolveError (int errorId) |
void | setError (const QString &text, const QPixmap &pixmap, ErrorType type=AutomaticRetry, int errorId=-1) |
void | setPolicy (Policy jobPolicy) |
void | setStatus (Status jobStatus) |
Status | startStatus () const |
Status | status () const |
Protected Member Functions | |
void | load (const QDomElement *element) |
void | setSpeedLimits (int ulLimit, int dlLimit) |
Protected Member Functions inherited from Transfer | |
void | setCapabilities (Capabilities capabilities) |
void | setStatus (Job::Status jobStatus, const QString &text=QString(), const QPixmap &pix=QPixmap()) |
virtual void | setTransferChange (ChangesFlags change, bool postEvent=false) |
Protected Member Functions inherited from Job | |
void | postJobEvent (Status) |
void | read (QDomNode *n) |
Scheduler * | scheduler () const |
void | setStartStatus (Status jobStatus) |
void | write (QDomNode *n) |
Additional Inherited Members | |
Public Slots inherited from Transfer | |
void | setLog (const QString &message, Transfer::LogLevel level=Log_Info) |
Signals inherited from Transfer | |
void | capabilitiesChanged () |
Static Public Member Functions inherited from Transfer | |
static QPixmap | statusPixmap (Job::Status status) |
static QString | statusText (Job::Status status) |
Protected Attributes inherited from Transfer | |
KUrl | m_dest |
KIO::filesize_t | m_downloadedSize |
int | m_downloadLimit |
int | m_downloadSpeed |
bool | m_isSelected |
QStringList | m_log |
int | m_percent |
KUrl | m_source |
KIO::filesize_t | m_totalSize |
KIO::filesize_t | m_uploadedSize |
int | m_uploadLimit |
int | m_uploadSpeed |
Protected Attributes inherited from Job | |
JobQueue * | m_jobQueue |
Scheduler * | m_scheduler |
Detailed Description
Definition at line 30 of file bttransfer.h.
Member Enumeration Documentation
Here we define the Bittorrent specific flags.
Definition at line 38 of file bttransfer.h.
Constructor & Destructor Documentation
BTTransfer::BTTransfer | ( | TransferGroup * | parent, |
TransferFactory * | factory, | ||
Scheduler * | scheduler, | ||
const KUrl & | src, | ||
const KUrl & | dest, | ||
const QDomElement * | e = 0 |
||
) |
Definition at line 51 of file bttransfer.cpp.
BTTransfer::~BTTransfer | ( | ) |
Definition at line 68 of file bttransfer.cpp.
Member Function Documentation
void BTTransfer::addTracker | ( | const QString & | url | ) |
Definition at line 247 of file bttransfer.cpp.
int BTTransfer::chunksDownloaded | ( | ) | const |
Definition at line 538 of file bttransfer.cpp.
int BTTransfer::chunksExcluded | ( | ) | const |
Definition at line 546 of file bttransfer.cpp.
int BTTransfer::chunksLeft | ( | ) | const |
Definition at line 554 of file bttransfer.cpp.
int BTTransfer::chunksTotal | ( | ) | const |
Definition at line 530 of file bttransfer.cpp.
void BTTransfer::deinit | ( | Transfer::DeleteOptions | options | ) |
Definition at line 76 of file bttransfer.cpp.
|
inlinevirtual |
- Returns
- the directory the Transfer will be stored to
Reimplemented from Transfer.
Definition at line 71 of file bttransfer.h.
|
virtual |
Reimplemented from Transfer.
Definition at line 594 of file bttransfer.cpp.
|
virtual |
- Returns
- a pointer to the FileModel containing all files of this download
Reimplemented from Transfer.
Definition at line 731 of file bttransfer.cpp.
|
virtual |
- Returns
- all files of this transfer
Reimplemented from Transfer.
Definition at line 664 of file bttransfer.cpp.
|
virtual |
Reimplemented functions from Transfer-Class.
Reimplemented from Transfer.
Definition at line 104 of file bttransfer.cpp.
|
virtual |
Reimplemented from Transfer.
Definition at line 109 of file bttransfer.cpp.
int BTTransfer::leechesConnected | ( | ) | const |
Definition at line 578 of file bttransfer.cpp.
int BTTransfer::leechesDisconnected | ( | ) | const |
Definition at line 586 of file bttransfer.cpp.
|
protectedvirtual |
Loads the transfer's info from the QDomElement.
- Parameters
-
element The pointer to the QDomNode where info will be loaded from
Reimplemented from Transfer.
Definition at line 210 of file bttransfer.cpp.
bool BTTransfer::ready | ( | ) |
Definition at line 615 of file bttransfer.cpp.
|
virtual |
Reimplemented from Transfer.
Definition at line 602 of file bttransfer.cpp.
int BTTransfer::seedsConnected | ( | ) | const |
Definition at line 562 of file bttransfer.cpp.
int BTTransfer::seedsDisconnected | ( | ) | const |
Definition at line 570 of file bttransfer.cpp.
int BTTransfer::sessionBytesDownloaded | ( | ) | const |
Definition at line 514 of file bttransfer.cpp.
int BTTransfer::sessionBytesUploaded | ( | ) | const |
Definition at line 522 of file bttransfer.cpp.
|
virtual |
Move the download to the new destination.
- Parameters
-
newDirectory is a directory where the download should be stored
- Returns
- true if newDestination can be used
Reimplemented from Transfer.
Definition at line 145 of file bttransfer.cpp.
void BTTransfer::setPort | ( | int | port | ) |
Public functions of BTTransfer.
Definition at line 231 of file bttransfer.cpp.
|
protectedvirtual |
Function used to set the SpeedLimits to the transfer.
Reimplemented from Transfer.
Definition at line 238 of file bttransfer.cpp.
|
virtual |
Implements Job.
Definition at line 117 of file bttransfer.cpp.
|
virtual |
Implements Job.
Definition at line 178 of file bttransfer.cpp.
bt::TorrentControl * BTTransfer::torrentControl | ( | ) |
Definition at line 610 of file bttransfer.cpp.
KUrl::List BTTransfer::trackersList | ( | ) | const |
Property-Functions.
Definition at line 503 of file bttransfer.cpp.
The documentation for this class was generated from the following files:
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.