Browse Source

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

adaptive-webui-19844
Christophe Dumez 15 years ago
parent
commit
bc2a4b622b
  1. 5
      src/qtorrenthandle.cpp
  2. 1
      src/qtorrenthandle.h

5
src/qtorrenthandle.cpp

@ -85,6 +85,11 @@ bitfield QTorrentHandle::pieces() const { @@ -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);

1
src/qtorrenthandle.h

@ -64,6 +64,7 @@ class QTorrentHandle { @@ -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;

Loading…
Cancel
Save