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

kget

BTTransfer Class Reference

#include <bttransfer.h>

Inheritance diagram for BTTransfer:

Inheritance graph
[legend]

List of all members.


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

enum BTTransfer::BTTransferChange

Here we define the Bittorrent specific flags.

Enumerator:
Tc_ChunksTotal 
Tc_ChunksDownloaded 
Tc_ChunksExcluded 
Tc_ChunksLeft 
Tc_SeedsConnected 
Tc_SeedsDisconnected 
Tc_LeechesConnected 
Tc_LeechesDisconnected 
Tc_SessionBytesDownloaded 
Tc_SessionBytesUploaded 
Tc_TrackersList 

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]

Reimplemented from Transfer.

Definition at line 446 of file bttransfer.cpp.

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]

Reimplemented from Job.

Definition at line 116 of file bttransfer.cpp.

bool BTTransfer::ready (  ) 

Definition at line 467 of file bttransfer.cpp.

int BTTransfer::remainingTime (  )  const [virtual]

Reimplemented from Transfer.

Definition at line 454 of file bttransfer.cpp.

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]

Implements Job.

Definition at line 70 of file bttransfer.cpp.

void BTTransfer::stop (  )  [virtual]

Implements Job.

Definition at line 92 of file bttransfer.cpp.

bool BTTransfer::supportsSpeedLimits (  )  const [inline, virtual]

Reimplemented from Transfer.

Definition at line 61 of file bttransfer.h.

bt::TorrentControl * BTTransfer::torrentControl (  ) 

Definition at line 462 of file bttransfer.cpp.

KUrl::List BTTransfer::trackersList (  )  const

Property-Functions.

Definition at line 357 of file bttransfer.cpp.


The documentation for this class was generated from the following files:
  • bttransfer.h
  • bttransfer.cpp

kget

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

kdenetwork

Skip menu "kdenetwork"
  • kget
  • kopete
  •   kopete
  •   libkopete
  •       libpapillon
  • krfb
Generated for kdenetwork by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal