File indexing completed on 2024-04-21 04:57:12
0001 /* This file is part of the KDE project 0002 0003 Copyright (C) 2008 Lukas Appelhans <l.appelhans@gmx.de> 0004 0005 This program is free software; you can redistribute it and/or 0006 modify it under the terms of the GNU General Public 0007 License as published by the Free Software Foundation; either 0008 version 2 of the License, or (at your option) any later version. 0009 */ 0010 0011 #ifndef KGETBTCHUNKSELECTOR_H 0012 #define KGETBTCHUNKSELECTOR_H 0013 0014 #include <download/chunkselector.h> 0015 #include <list> 0016 #include <util/constants.h> 0017 #include <util/timer.h> 0018 0019 #include <QObject> 0020 0021 namespace bt 0022 { 0023 class BitSet; 0024 class ChunkManager; 0025 class Downloader; 0026 class PeerManager; 0027 class PieceDownloader; 0028 } 0029 0030 class BTChunkSelector : public bt::ChunkSelector 0031 { 0032 public: 0033 BTChunkSelector(bt::ChunkManager &cman, bt::Downloader &downer, bt::PeerManager &pman); 0034 ~BTChunkSelector(); 0035 }; 0036 0037 class BTChunkSelectorFactory : public QObject, public bt::ChunkSelectorFactoryInterface 0038 { 0039 Q_OBJECT 0040 public: 0041 BTChunkSelectorFactory(); 0042 ~BTChunkSelectorFactory(); 0043 0044 bt::ChunkSelectorInterface *createChunkSelector(bt::ChunkManager &cman, bt::Downloader &downer, bt::PeerManager &pman); 0045 0046 Q_SIGNALS: 0047 void selectorAdded(BTChunkSelector *selector); 0048 }; 0049 0050 #endif