1 /* This file is part of the KDE project
3 Copyright (C) 2007 Lukas Appelhans <l.appelhans@gmx.de>
5 This program is free software; you can redistribute it and/or
6 modify it under the terms of the GNU General Public
7 License as published by the Free Software Foundation; either
8 version 2 of the License, or (at your option) any later version.
11 #ifndef _BTTRANSFERHANDLER_H
12 #define _BTTRANSFERHANDLER_H
14 #include "bttransfer.h"
15 #include "core/transferhandler.h"
16 #include <torrent/torrentcontrol.h>
20 class BTAdvancedDetailsWidget
;
28 class BTTransferHandler
: public QObject
, public TransferHandler
32 BTTransferHandler(BTTransfer
* transfer
, Scheduler
* scheduler
);
34 int chunksTotal() const {return m_transfer
->chunksTotal();}
35 int chunksDownloaded() const {return m_transfer
->chunksDownloaded();}
36 int chunksExcluded() const {return m_transfer
->chunksExcluded();}
37 int chunksLeft() const {return m_transfer
->chunksLeft();}
38 int seedsConnected() const {return m_transfer
->seedsConnected();}
39 int seedsDisconnected() const {return m_transfer
->seedsDisconnected();}
40 int leechesConnected() const {return m_transfer
->leechesConnected();}
41 int leechesDisconnected() const {return m_transfer
->leechesDisconnected();}
42 bt::TorrentControl
* torrentControl() const {return m_transfer
->torrentControl();}
43 bool ready() const {return m_transfer
->ready();}
45 void addTracker(QString url
) {m_transfer
->addTracker(url
);}
46 kt::Monitor
* torrentMonitor() const;
49 void createAdvancedDetails();
53 void removeAdvancedDetails();
57 BTTransfer
* m_transfer
;
58 BTAdvancedDetailsWidget
*advancedDetails
;