Cleaned up option_handler_rules.*, it now uses the slot_map_* properly.

Erases the screen upon quit.

Added option for checking the hash for completed downloads.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@471 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
rakshasa
2005-06-21 16:23:34 +00:00
parent 7e77635353
commit bc27fd19cb
11 changed files with 122 additions and 108 deletions
+12 -7
View File
@@ -31,7 +31,7 @@ namespace core {
class Download {
public:
bool is_open() { return m_download.is_open(); }
bool is_done() { return m_download.get_chunks_done() == m_download.get_chunks_total(); }
inline bool is_done();
void set_download(torrent::Download d);
void release_download();
@@ -41,15 +41,15 @@ public:
const std::string& get_message() { return m_message; }
void start() { m_download.start(); }
void stop() { m_download.stop(); }
void set_root_directory(const std::string& d);
void open() { m_download.open(); }
void close() { m_download.close(); }
template <typename Ret, Ret (torrent::Download::*func)()>
void call() { (m_download.*func)(); }
void hash_resume_save() { m_download.hash_resume_save(); }
template <typename Ret, typename Arg1, Ret (torrent::Download::*func)(Arg1)>
void call(Arg1 a1) { (m_download.*func)(a1); }
bool operator == (const std::string& str) { return str == m_download.get_hash(); }
bool operator == (const std::string& str) { return str == m_download.get_hash(); }
private:
void receive_tracker_msg(std::string msg);
@@ -64,6 +64,11 @@ private:
sigc::connection m_connStorageError;
};
inline bool
Download::is_done() {
return m_download.get_chunks_done() == m_download.get_chunks_total();
}
}
#endif