- Added piece_availability() to qtorrenthandle to prepare for piece availability widget (bar)

This commit is contained in:
Christophe Dumez 2009-11-12 19:44:05 +00:00
parent daef9ece75
commit bc2a4b622b
2 changed files with 6 additions and 0 deletions

View file

@ -85,6 +85,11 @@ bitfield QTorrentHandle::pieces() const {
return h.status().pieces;
}
void QTorrentHandle::piece_availability(std::vector<int>& avail) const {
Q_ASSERT(h.is_valid());
h.piece_availability(avail);
}
void QTorrentHandle::get_download_queue(std::vector<partial_piece_info>& queue) const {
Q_ASSERT(h.is_valid());
h.get_download_queue(queue);

View file

@ -64,6 +64,7 @@ class QTorrentHandle {
QString name() const;
float progress() const;
bitfield pieces() const;
void piece_availability(std::vector<int>& avail) const;
void get_download_queue(std::vector<partial_piece_info>& queue) const;
QString current_tracker() const;
bool is_valid() const;