- New peers can manually be added to a torrent

This commit is contained in:
Christophe Dumez 2009-11-17 11:46:43 +00:00
commit 94f3323270
10 changed files with 265 additions and 2 deletions

View file

@ -290,6 +290,11 @@ void QTorrentHandle::file_progress(std::vector<size_type>& fp) {
return h.file_progress(fp);
}
bool QTorrentHandle::is_checking() const {
Q_ASSERT(h.is_valid());
return h.status().state == torrent_status::checking_files || h.status().state == torrent_status::checking_resume_data;
}
size_type QTorrentHandle::all_time_download() {
Q_ASSERT(h.is_valid());
return h.status().all_time_download;
@ -498,6 +503,11 @@ void QTorrentHandle::resolve_countries(bool r) {
h.resolve_countries(r);
}
void QTorrentHandle::connect_peer(asio::ip::tcp::endpoint const& adr, int source) const {
Q_ASSERT(h.is_valid());
h.connect_peer(adr, source);
}
//
// Operators
//