From 3212c929aca4f8b86956673625f5fe5920f622ff Mon Sep 17 00:00:00 2001 From: Andrew Resch Date: Sun, 31 May 2009 20:06:47 +0000 Subject: [PATCH] Update python bindings session_settings --- bindings/python/src/session_settings.cpp | 83 +++++++++++++++++++++--- 1 file changed, 75 insertions(+), 8 deletions(-) diff --git a/bindings/python/src/session_settings.cpp b/bindings/python/src/session_settings.cpp index 3942fafae..9b2c4a83a 100644 --- a/bindings/python/src/session_settings.cpp +++ b/bindings/python/src/session_settings.cpp @@ -14,8 +14,10 @@ void bind_session_settings() .def_readwrite("user_agent", &session_settings::user_agent) .def_readwrite("tracker_completion_timeout", &session_settings::tracker_completion_timeout) .def_readwrite("tracker_receive_timeout", &session_settings::tracker_receive_timeout) + .def_readwrite("stop_tracker_timeout", &session_settings::stop_tracker_timeout) .def_readwrite("tracker_maximum_response_length", &session_settings::tracker_maximum_response_length) .def_readwrite("piece_timeout", &session_settings::piece_timeout) + .def_readwrite("request_timeout", &session_settings::request_timeout) .def_readwrite("request_queue_time", &session_settings::request_queue_time) .def_readwrite("max_allowed_in_request_queue", &session_settings::max_allowed_in_request_queue) .def_readwrite("max_out_request_queue", &session_settings::max_out_request_queue) @@ -23,6 +25,7 @@ void bind_session_settings() .def_readwrite("peer_timeout", &session_settings::peer_timeout) .def_readwrite("urlseed_timeout", &session_settings::urlseed_timeout) .def_readwrite("urlseed_pipeline_size", &session_settings::urlseed_pipeline_size) + .def_readwrite("urlseed_wait_retry", &session_settings::urlseed_wait_retry) .def_readwrite("file_pool_size", &session_settings::file_pool_size) .def_readwrite("allow_multiple_connections_per_ip", &session_settings::allow_multiple_connections_per_ip) .def_readwrite("max_failcount", &session_settings::max_failcount) @@ -34,24 +37,67 @@ void bind_session_settings() .def_readwrite("lazy_bitfields", &session_settings::lazy_bitfields) .def_readwrite("inactivity_timeout", &session_settings::inactivity_timeout) .def_readwrite("unchoke_interval", &session_settings::unchoke_interval) + .def_readwrite("optimistic_unchoke_multiplier", &session_settings::optimistic_unchoke_multiplier) + .def_readwrite("num_want", &session_settings::num_want) + .def_readwrite("initial_picker_threshold", &session_settings::initial_picker_threshold) + .def_readwrite("allowed_fast_set_size", &session_settings::allowed_fast_set_size) + .def_readwrite("max_outstanding_disk_bytes_per_connection", &session_settings::max_outstanding_disk_bytes_per_connection) + .def_readwrite("handshake_timeout", &session_settings::handshake_timeout) +#ifndef TORRENT_DISABLE_DHT + .def_readwrite("use_dht_as_fallback", &session_settings::use_dht_as_fallback) +#endif + .def_readwrite("free_torrent_hashes", &session_settings::free_torrent_hashes) + .def_readwrite("upnp_ignore_nonrouters", &session_settings::upnp_ignore_nonrouters) + .def_readwrite("send_buffer_watermark", &session_settings::send_buffer_watermark) + .def_readwrite("auto_upload_slots", &session_settings::auto_upload_slots) + .def_readwrite("auto_upload_slots_rate_based", &session_settings::auto_upload_slots_rate_based) + .def_readwrite("use_parole_mode", &session_settings::use_parole_mode) + .def_readwrite("cache_size", &session_settings::cache_size) + .def_readwrite("cache_buffer_chunk_size", &session_settings::cache_buffer_chunk_size) + .def_readwrite("cache_expiry", &session_settings::cache_expiry) + .def_readwrite("use_read_cache", &session_settings::use_read_cache) + .def_readwrite("disk_io_write_mode", &session_settings::disk_io_write_mode) + .def_readwrite("disk_io_read_mode", &session_settings::disk_io_read_mode) + .def_readwrite("coalesce_reads", &session_settings::coalesce_reads) + .def_readwrite("coalesce_writes", &session_settings:coalesce_writes) + .def_readwrite("outgoing_ports", &session_settings::outgoing_ports) + .def_readwrite("peer_tos", &session_settings::peer_tos) .def_readwrite("active_downloads", &session_settings::active_downloads) .def_readwrite("active_seeds", &session_settings::active_seeds) .def_readwrite("active_limit", &session_settings::active_limit) - .def_readwrite("auto_manage_prefer_seeds", &session_settings::auto_manage_prefer_seeds) + .def_readwrite("auto_manage_prefer_seeds", &session_settings::automanaged_prefer_seeds) .def_readwrite("dont_count_slow_torrents", &session_settings::dont_count_slow_torrents) .def_readwrite("auto_manage_interval", &session_settings::auto_manage_interval) .def_readwrite("share_ratio_limit", &session_settings::share_ratio_limit) .def_readwrite("seed_time_ratio_limit", &session_settings::seed_time_ratio_limit) .def_readwrite("seed_time_limit", &session_settings::seed_time_limit) - .def_readwrite("auto_scraped_interval", &session_settings::auto_scrape_interval) - .def_readwrite("peer_tos", &session_settings::peer_tos) + .def_readwrite("peer_turnover", &session_settings::peer_turnover) + .def_readwrite("peer_turnover_cutoff", &session_settings::peer_turnover_cutoff) + .def_readwrite("close_redundant_connections", &session_settings::close_redundant_connections) + .def_readwrite("auto_scrape_interval", &session_settings::auto_scrape_interval) + .def_readwrite("auto_scrape_min_interval", &session_settings::auto_scrape_min_interval) + .def_readwrite("max_peerlist_size", &session_settings::max_peerlist_size) + .def_readwrite("max_paused_peerlist_size", &session_settings::max_paused_peerlist_size) + .def_readwrite("min_announce_interval", &session_settings::min_announce_interval) + .def_readwrite("prioritize_partial_pieces", &session_settings::prioritize_partial_pieces) + .def_readwrite("auto_manage_startup", &session_settings::auto_manage_startup) .def_readwrite("rate_limit_ip_overhead", &session_settings::rate_limit_ip_overhead) - .def_readwrite("outgoing_ports", &session_settings::outgoing_ports) - .def_readwrite("cache_size", &session_settings::cache_size) - .def_readwrite("cache_expiry", &session_settings::cache_expiry) -#ifndef TORRENT_DISABLE_DHT - .def_readwrite("use_dht_as_fallback", &session_settings::use_dht_as_fallback) + .def_readwrite("announce_to_all_trackers", &session_settings::announce_to_all_trackers) + .def_readwrite("prefer_udp_trackers", &session_settings::prefer_udp_trackers) + .def_readwrite("strict_super_seeding", &session_settings::strict_super_seeding) + .def_readwrite("seeding_piece_quota", &session_settings::seeding_piece_quota) + .def_readwrite("max_sparse_regions", &session_settings::max_sparse_regions) +#ifndef TORRENT_DISABLE_MLOCK + .def_readwrite("lock_disk_cache", &session_settings::lock_disk_cache) #endif + .def_readwrite("max_rejects", &session_settings::max_rejects) + .def_readwrite("recv_socket_buffer_size", &session_settings::recv_socket_buffer_size) + .def_readwrite("send_socket_buffer_size", &session_settings::send_socket_buffer_size) + .def_readwrite("optimize_hashing_for_speed", &session_settings::optimize_hashing_for_speed) + .def_readwrite("file_checks_delay_per_block", &session_settings::file_checks_delay_per_block) + .def_readwrite("disk_cache_algorithm", &session_settings::disk_cache_algorithm) + .def_readwrite("read_cache_line_size", &session_settings::read_cache_line_size) + .def_readwrite("write_cache_line_size", &session_settings::write_cache_line_size) ; enum_("proxy_type") @@ -62,6 +108,18 @@ void bind_session_settings() .value("http", proxy_settings::http) .value("http_pw", proxy_settings::http_pw) ; + + enum_("proxy_settings") .def_readwrite("hostname", &proxy_settings::hostname) .def_readwrite("port", &proxy_settings::port) @@ -70,6 +128,15 @@ void bind_session_settings() .def_readwrite("type", &proxy_settings::type) ; +#ifndef TORRENT_DISABLE_DHT + class_("dht_settings") + .def_readwrite("max_peers_reply", dht_settings::max_peers_reply) + .def_readwrite("search_branching", dht_settings::search_branching) + .def_readwrite("service_port", dht_settings::service_port) + .def_readwrite("max_fail_count", dht_settings::max_fail_count) + ; +#endif + #ifndef TORRENT_DISABLE_ENCRYPTION enum_("enc_policy") .value("forced", pe_settings::forced)