updated python bindings

This commit is contained in:
Arvid Norberg 2007-06-08 23:57:22 +00:00
parent 6447a074eb
commit 92f4792ee7
2 changed files with 33 additions and 1 deletions

View File

@ -21,7 +21,6 @@ void bind_peer_info()
.def_readonly("total_upload", &peer_info::total_upload)
.def_readonly("pid", &peer_info::pid)
.def_readonly("pieces", &peer_info::pieces)
.def_readonly("seed", &peer_info::seed)
.def_readonly("upload_limit", &peer_info::upload_limit)
.def_readonly("download_limit", &peer_info::download_limit)
.def_readonly("load_balancing", &peer_info::load_balancing)
@ -45,6 +44,12 @@ void bind_peer_info()
pi.attr("handshake") = (int)peer_info::handshake;
pi.attr("connecting") = (int)peer_info::connecting;
pi.attr("queued") = (int)peer_info::queued;
pi.attr("on_parole") = (int)peer_info::on_parole;
pi.attr("seed") = (int)peer_info::seed;
#ifndef TORRENT_DISABLE_ENCRYPTION
pi.attr("rc4_encrypted") = (int)peer_info::rc4_encrypted;
pi.attr("plaintext_encrypted") = (int)peer_info::plaintext_encrypted;
#endif
pi.attr("standard_bittorrent") = 0;
pi.attr("web_seed") = 1;

View File

@ -23,6 +23,20 @@ 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("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)
.def_readwrite("min_reconnect_time", &session_settings::min_reconnect_time)
.def_readwrite("peer_connect_timeout", &session_settings::peer_connect_timeout)
.def_readwrite("ignore_limits_on_local_network", &session_settings::ignore_limits_on_local_network)
.def_readwrite("connection_speed", &session_settings::connection_speed)
.def_readwrite("send_redundant_have", &session_settings::send_redundant_have)
.def_readwrite("lazy_bitfields", &session_settings::lazy_bitfields)
.def_readwrite("inactivity_timeout", &session_settings::inactivity_timeout)
.def_readwrite("unchoke_interval", &session_settings::unchoke_interval)
#ifndef TORRENT_DISABLE_DHT
.def_readwrite("use_dht_as_fallback", &session_settings::use_dht_as_fallback)
#endif
;
scope ps = class_<proxy_settings>("proxy_settings")
@ -38,5 +52,18 @@ void bind_session_settings()
ps.attr("socks5_pw") = (int)proxy_settings::socks5_pw;
ps.attr("http") = (int)proxy_settings::http;
ps.attr("http_pw") = (int)proxy_settings::http_pw;
scope pes = class_<pe_settings>("pe_settings")
.def_readwrite("out_enc_policy", &pe_settings::out_enc_policy)
.def_readwrite("in_enc_policy", &pe_settings::in_enc_policy)
.def_readwrite("allowed_enc_level", &pe_settings::allowed_enc_level)
.def_readwrite("prefer_rc4", &pe_settings::prefer_rc4)
;
pes.attr("forced") = pe_settings::forced;
pes.attr("enabled") = pe_settings::enabled;
pes.attr("disabled") = pe_settings::disabled;
pes.attr("plaintext") = pe_settings::plaintext;
pes.attr("rc4") = pe_settings::rc4;
}