From 4efabceffff2b54c2a94df51eaa9c111b3d9769b Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Wed, 16 Nov 2011 06:12:48 +0000 Subject: [PATCH] added some functions missing from the python binding --- ChangeLog | 1 + bindings/python/src/magnet_uri.cpp | 6 ++++++ bindings/python/src/torrent_handle.cpp | 5 +++++ 3 files changed, 12 insertions(+) diff --git a/ChangeLog b/ChangeLog index e75eba572..3fce54918 100644 --- a/ChangeLog +++ b/ChangeLog @@ -98,6 +98,7 @@ incoming connection * added more detailed instrumentation of the disk I/O thread + * added some functions missing from the python binding * fixed rare piece picker bug * fixed invalid torrent_status::finished_time * fixed bugs in dont-have and upload-only extension messages diff --git a/bindings/python/src/magnet_uri.cpp b/bindings/python/src/magnet_uri.cpp index 83ba4a4f3..08e13f313 100644 --- a/bindings/python/src/magnet_uri.cpp +++ b/bindings/python/src/magnet_uri.cpp @@ -32,9 +32,15 @@ namespace { return add_magnet_uri(s, uri, p, ec); #endif } + + std::string (*make_magnet_uri0)(torrent_handle const&) = make_magnet_uri; + std::string (*make_magnet_uri1)(torrent_info const&) = make_magnet_uri; } void bind_magnet_uri() { def("add_magnet_uri", &_add_magnet_uri); + def("make_magnet_uri", make_magnet_uri0); + def("make_magnet_uri", make_magnet_uri1); } + diff --git a/bindings/python/src/torrent_handle.cpp b/bindings/python/src/torrent_handle.cpp index 8f399fe9f..1b3d38e4d 100644 --- a/bindings/python/src/torrent_handle.cpp +++ b/bindings/python/src/torrent_handle.cpp @@ -265,6 +265,9 @@ void bind_torrent_handle() { void (torrent_handle::*force_reannounce0)() const = &torrent_handle::force_reannounce; + bool (torrent_handle::*super_seeding0)() const = &torrent_handle::super_seeding; + void (torrent_handle::*super_seeding1)(bool) const = &torrent_handle::super_seeding; + int (torrent_handle::*piece_priority0)(int) const = &torrent_handle::piece_priority; void (torrent_handle::*piece_priority1)(int, int) const = &torrent_handle::piece_priority; @@ -302,6 +305,8 @@ void bind_torrent_handle() .def("resume", _(&torrent_handle::resume)) .def("clear_error", _(&torrent_handle::clear_error)) .def("set_priority", _(&torrent_handle::set_priority)) + .def("super_seeding", super_seeding0) + .def("super_seeding", super_seeding1) .def("auto_managed", _(&torrent_handle::auto_managed)) .def("queue_position", _(&torrent_handle::queue_position))