Added man pages.

git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@475 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
rakshasa
2005-06-25 21:50:32 +00:00
parent 088398d6d6
commit 28b369dc83
11 changed files with 463 additions and 175 deletions
+8 -7
View File
@@ -118,21 +118,22 @@ parse_options(ui::Control* c, OptionHandler* optionHandler, int argc, char** arg
void
initialize_option_handler(ui::Control* c, OptionHandler* optionHandler) {
optionHandler->insert("max_peers", new OptionHandlerInt(c, &apply_download_max_peers, &validate_download_peers));
optionHandler->insert("max_uploads", new OptionHandlerInt(c, &apply_download_max_uploads, &validate_download_peers));
optionHandler->insert("min_peers", new OptionHandlerInt(c, &apply_download_min_peers, &validate_download_peers));
optionHandler->insert("max_uploads", new OptionHandlerInt(c, &apply_download_max_uploads, &validate_download_peers));
optionHandler->insert("download_rate", new OptionHandlerInt(c, &apply_global_download_rate, &validate_rate));
optionHandler->insert("hash_read_ahead", new OptionHandlerInt(c, &apply_hash_read_ahead, &validate_read_ahead));
optionHandler->insert("max_open_files", new OptionHandlerInt(c, &apply_max_open_files, &validate_fd));
optionHandler->insert("upload_rate", new OptionHandlerInt(c, &apply_global_upload_rate, &validate_rate));
optionHandler->insert("check_hash", new OptionHandlerString(c, &apply_check_hash, &validate_yes_no));
optionHandler->insert("directory", new OptionHandlerString(c, &apply_download_directory, &validate_directory));
optionHandler->insert("tracker_dump", new OptionHandlerString(c, &apply_tracker_dump, &validate_yes_no));
optionHandler->insert("bind", new OptionHandlerString(c, &apply_bind, &validate_ip));
optionHandler->insert("ip", new OptionHandlerString(c, &apply_ip, &validate_ip));
optionHandler->insert("port", new OptionHandlerString(c, &apply_port_range, &validate_port_range));
optionHandler->insert("check_hash", new OptionHandlerString(c, &apply_check_hash, &validate_yes_no));
optionHandler->insert("directory", new OptionHandlerString(c, &apply_download_directory, &validate_directory));
optionHandler->insert("hash_read_ahead", new OptionHandlerInt(c, &apply_hash_read_ahead, &validate_read_ahead));
optionHandler->insert("max_open_files", new OptionHandlerInt(c, &apply_max_open_files, &validate_fd));
optionHandler->insert("tracker_dump", new OptionHandlerString(c, &apply_tracker_dump, &validate_yes_no));
}
void
+4 -4
View File
@@ -76,7 +76,7 @@ DownloadList::DownloadList(Control* c) :
}
DownloadList::~DownloadList() {
if (m_window != m_control->get_display().end())
if (is_active())
throw std::logic_error("ui::DownloadList::~DownloadList() called on an active object");
std::for_each(m_uiArray, m_uiArray + DISPLAY_MAX_SIZE, rak::call_delete<ElementBase>());
@@ -93,7 +93,7 @@ DownloadList::~DownloadList() {
void
DownloadList::activate() {
if (m_window != m_control->get_display().end())
if (is_active())
throw std::logic_error("ui::Download::activate() called on an already activated object");
utils::taskScheduler.insert(&m_taskUpdate, utils::Timer::cache() + 1000000);
@@ -115,7 +115,7 @@ DownloadList::activate() {
void
DownloadList::disable() {
if (m_window == m_control->get_display().end())
if (!is_active())
throw std::logic_error("ui::Download::disable() called on an already disabled object");
disable_display();
@@ -141,7 +141,7 @@ DownloadList::disable() {
void
DownloadList::activate_display(Display d) {
if (m_window == m_control->get_display().end())
if (!is_active())
throw std::logic_error("ui::DownloadList::activate_display(...) could not find previous display iterator");
if (d >= DISPLAY_MAX_SIZE)
+2
View File
@@ -77,6 +77,8 @@ public:
input::Bindings& get_bindings() { return *m_bindings; }
bool is_active() const { return m_window != m_control->get_display().end(); }
void activate();
void disable();
+3
View File
@@ -43,6 +43,9 @@ Root::init() {
void
Root::cleanup() {
if (m_downloadList->is_active())
m_downloadList->disable();
delete m_downloadList;
m_control->get_input().erase(&m_bindings);