21 #ifndef BT_STREAMINGCHUNKSELECTOR_H
22 #define BT_STREAMINGCHUNKSELECTOR_H
24 #include <ktorrent_export.h>
26 #include <download/chunkselector.h>
39 StreamingChunkSelector();
40 ~StreamingChunkSelector()
override;
42 void init(ChunkManager* cman, Downloader* downer, PeerManager* pman)
override;
44 void dataChecked(
const bt::BitSet& ok_chunks, Uint32 from, Uint32 to)
override;
45 void reincluded(bt::Uint32 from, bt::Uint32 to)
override;
46 void reinsert(bt::Uint32 chunk)
override;
47 bool selectRange(bt::Uint32& from, bt::Uint32& to, bt::Uint32 max_len)
override;
50 Uint32 criticialWindowSize()
const {
return critical_window_size;}
58 void setSequentialRange(bt::Uint32 from, bt::Uint32 to);
61 void setCursor(bt::Uint32 chunk);
69 bt::Uint32 range_start;
72 bt::Uint32 critical_window_size;
73 std::list<Uint32> range;
74 std::set<Uint32> preview_chunks;
79 #endif // BT_STREAMINGCHUNKSELECTOR_H