mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-08-14 14:12:31 +00:00
* Starting work on ElementText for displaying generic information.
* If a storage error was thrown from make_directory in EntryList::open, it would try to erase a FileMeta that wasn't inserted. git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@753 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
@@ -91,6 +91,8 @@ Download::Download(download_type d) :
|
||||
|
||||
m_variables.insert("directory", new utils::VariableStringSlot(rak::mem_fn(&m_fileList, &torrent::FileList::root_dir), rak::mem_fn(this, &Download::set_root_directory)));
|
||||
|
||||
m_variables.insert("info_hash", new utils::VariableStringSlot(rak::mem_fn(&m_download, &torrent::Download::info_hash), NULL));
|
||||
|
||||
m_variables.insert("min_peers", new utils::VariableValueSlot(rak::mem_fn(&m_download, &download_type::peers_min), rak::mem_fn(&m_download, &download_type::set_peers_min)));
|
||||
m_variables.insert("max_peers", new utils::VariableValueSlot(rak::mem_fn(&m_download, &download_type::peers_max), rak::mem_fn(&m_download, &download_type::set_peers_max)));
|
||||
m_variables.insert("max_uploads", new utils::VariableValueSlot(rak::mem_fn(&m_download, &download_type::uploads_max), rak::mem_fn(&m_download, &download_type::set_uploads_max)));
|
||||
|
||||
+3
-1
@@ -37,6 +37,7 @@
|
||||
#ifndef RTORRENT_CORE_DOWNLOAD_H
|
||||
#define RTORRENT_CORE_DOWNLOAD_H
|
||||
|
||||
#include <rak/string_manip.h>
|
||||
#include <sigc++/connection.h>
|
||||
#include <torrent/download.h>
|
||||
#include <torrent/file_list.h>
|
||||
@@ -83,13 +84,14 @@ public:
|
||||
const std::string& variable_string(const std::string& key) const { return m_variables.get_string(key); }
|
||||
|
||||
download_type* download() { return &m_download; }
|
||||
const download_type* download() const { return &m_download; }
|
||||
const download_type* c_download() const { return &m_download; }
|
||||
|
||||
torrent::Object* bencode() { return m_download.bencode(); }
|
||||
file_list_type* file_list() { return &m_fileList; }
|
||||
tracker_list_type* tracker_list() { return &m_trackerList; }
|
||||
|
||||
const std::string& info_hash() const { return m_download.info_hash(); }
|
||||
std::string info_hash_hex() const { return rak::transform_hex(m_download.info_hash()); }
|
||||
|
||||
const std::string& message() const { return m_message; }
|
||||
void set_message(const std::string& msg) { m_message = msg; }
|
||||
|
||||
Reference in New Issue
Block a user