kget
bttransferhandler.h
Go to the documentation of this file.00001 /* This file is part of the KDE project 00002 00003 Copyright (C) 2007 Lukas Appelhans <l.appelhans@gmx.de> 00004 00005 This program is free software; you can redistribute it and/or 00006 modify it under the terms of the GNU General Public 00007 License as published by the Free Software Foundation; either 00008 version 2 of the License, or (at your option) any later version. 00009 */ 00010 00011 #ifndef _BTTRANSFERHANDLER_H 00012 #define _BTTRANSFERHANDLER_H 00013 00014 #include "bttransfer.h" 00015 #include "core/transferhandler.h" 00016 #include <torrent/torrentcontrol.h> 00017 00018 class Scheduler; 00019 00020 class BTTransferHandler : public TransferHandler 00021 { 00022 public: 00023 BTTransferHandler(BTTransfer * transfer, Scheduler * scheduler); 00024 00025 int chunksTotal() {return m_transfer->chunksTotal();} 00026 int chunksDownloaded() {return m_transfer->chunksDownloaded();} 00027 int chunksExcluded() {return m_transfer->chunksExcluded();} 00028 int chunksLeft() {return m_transfer->chunksLeft();} 00029 int seedsConnected() {return m_transfer->seedsConnected();} 00030 int seedsDisconnected() {return m_transfer->seedsDisconnected();} 00031 int leechesConnected() {return m_transfer->leechesConnected();} 00032 int leechesDisconnected() {return m_transfer->leechesDisconnected();} 00033 int ulRate() {return m_transfer->ulRate();} 00034 int dlRate() {return m_transfer->dlRate();} 00035 bt::TorrentControl * torrentControl() {return m_transfer->torrentControl();} 00036 int ulLimit() {return m_transfer->ulLimit();} 00037 int dlLimit() {return m_transfer->dlLimit();} 00038 int percent() {return m_transfer->percent();} 00039 bool ready() {return m_transfer->ready();} 00040 00041 void addTracker(QString url) {m_transfer->addTracker(url);} 00042 void setTrafficLimits(int ulLimit, int dlLimit) {m_transfer->setTrafficLimits(ulLimit, dlLimit);} 00043 void setMaxShareRatio(float ratio) {m_transfer->setMaxShareRatio(ratio);} 00044 00045 private: 00046 BTTransfer * m_transfer; 00047 }; 00048 00049 #endif
KDE 4.0 API Reference