kget
BTTransfer Class Reference
#include <bttransfer.h>

Detailed Description
Definition at line 27 of file bttransfer.h.
Public Types | |
| enum | BTTransferChange { Tc_ChunksTotal = 0x00010000, Tc_ChunksDownloaded = 0x00020000, Tc_ChunksExcluded = 0x00040000, Tc_ChunksLeft = 0x00080000, Tc_SeedsConnected = 0x00100000, Tc_SeedsDisconnected = 0x00200000, Tc_LeechesConnected = 0x00400000, Tc_LeechesDisconnected = 0x00800000, Tc_SessionBytesDownloaded = 0x04000000, Tc_SessionBytesUploaded = 0x08000000, Tc_TrackersList = 0x10000000 } |
Public Member Functions | |
| void | addTracker (const QString &url) |
| BTTransfer (TransferGroup *parent, TransferFactory *factory, Scheduler *scheduler, const KUrl &src, const KUrl &dest, const QDomElement *e=0) | |
| int | chunksDownloaded () const |
| int | chunksExcluded () const |
| int | chunksLeft () const |
| int | chunksTotal () const |
| virtual int | elapsedTime () const |
| bool | isResumable () const |
| int | leechesConnected () const |
| int | leechesDisconnected () const |
| void | postDeleteEvent () |
| bool | ready () |
| virtual int | remainingTime () const |
| int | seedsConnected () const |
| int | seedsDisconnected () const |
| int | sessionBytesDownloaded () const |
| int | sessionBytesUploaded () const |
| void | setPort (int port) |
| void | start () |
| void | stop () |
| bool | supportsSpeedLimits () const |
| bt::TorrentControl * | torrentControl () |
| KUrl::List | trackersList () const |
| ~BTTransfer () | |
Protected Member Functions | |
| void | setSpeedLimits (int ulLimit, int dlLimit) |
Member Enumeration Documentation
Here we define the Bittorrent specific flags.
- Enumerator:
Definition at line 35 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 43 of file bttransfer.cpp.
| BTTransfer::~BTTransfer | ( | ) |
Definition at line 56 of file bttransfer.cpp.
Member Function Documentation
| void BTTransfer::addTracker | ( | const QString & | url | ) |
Definition at line 186 of file bttransfer.cpp.
| int BTTransfer::chunksDownloaded | ( | ) | const |
Definition at line 390 of file bttransfer.cpp.
| int BTTransfer::chunksExcluded | ( | ) | const |
Definition at line 398 of file bttransfer.cpp.
| int BTTransfer::chunksLeft | ( | ) | const |
Definition at line 406 of file bttransfer.cpp.
| int BTTransfer::chunksTotal | ( | ) | const |
Definition at line 382 of file bttransfer.cpp.
| int BTTransfer::elapsedTime | ( | ) | const [virtual] |
| bool BTTransfer::isResumable | ( | ) | const [virtual] |
Reimplemented functions from Transfer-Class (transfer.cpp).
Implements Job.
Definition at line 65 of file bttransfer.cpp.
| int BTTransfer::leechesConnected | ( | ) | const |
Definition at line 430 of file bttransfer.cpp.
| int BTTransfer::leechesDisconnected | ( | ) | const |
Definition at line 438 of file bttransfer.cpp.
| void BTTransfer::postDeleteEvent | ( | ) | [virtual] |
| bool BTTransfer::ready | ( | ) |
Definition at line 467 of file bttransfer.cpp.
| int BTTransfer::remainingTime | ( | ) | const [virtual] |
| int BTTransfer::seedsConnected | ( | ) | const |
Definition at line 414 of file bttransfer.cpp.
| int BTTransfer::seedsDisconnected | ( | ) | const |
Definition at line 422 of file bttransfer.cpp.
| int BTTransfer::sessionBytesDownloaded | ( | ) | const |
Definition at line 366 of file bttransfer.cpp.
| int BTTransfer::sessionBytesUploaded | ( | ) | const |
Definition at line 374 of file bttransfer.cpp.
| void BTTransfer::setPort | ( | int | port | ) |
void BTTransfer::load(const QDomElement &e) { kDebug(5001); m_source = KUrl(e.attribute("Source")); m_dest = KUrl(e.attribute("Dest"));
m_totalSize = e.attribute("TotalSize").toULongLong(); m_processedSize = e.attribute("ProcessedSize").toULongLong();
if( m_totalSize != 0) m_percent = (int)((100.0 * m_processedSize) / m_totalSize); else m_percent = 0;
if((m_totalSize == m_processedSize) && (m_totalSize != 0)) { setStatus(Job::Finished, i18nc("transfer state: finished", "Finished"), SmallIcon("dialog-ok")); "ok" icon should probably be "dialog-success", but we don't have that icon in KDE 4.0 } else { setStatus(status(), i18nc("transfer state: stopped", "Stopped"), SmallIcon("process-stop")); } }
void BTTransfer::save(const QDomElement &element) { kDebug(5001);
QDomElement e = element;
Transfer::save(e); } Public functions of BTTransfer
Definition at line 172 of file bttransfer.cpp.
| void BTTransfer::setSpeedLimits | ( | int | uploadLimit, | |
| int | downloadLimit | |||
| ) | [protected, virtual] |
Function used to set the SpeedLimits to the transfer.
Reimplemented from Transfer.
Definition at line 177 of file bttransfer.cpp.
| void BTTransfer::start | ( | ) | [virtual] |
| void BTTransfer::stop | ( | ) | [virtual] |
| bool BTTransfer::supportsSpeedLimits | ( | ) | const [inline, virtual] |
| bt::TorrentControl * BTTransfer::torrentControl | ( | ) |
Definition at line 462 of file bttransfer.cpp.
| KUrl::List BTTransfer::trackersList | ( | ) | const |
The documentation for this class was generated from the following files:
KDE 4.2 API Reference