added some functions missing from the python binding

This commit is contained in:
Arvid Norberg 2011-11-16 06:12:48 +00:00
parent fdc5e7e8b2
commit 4efabcefff
3 changed files with 12 additions and 0 deletions

View File

@ -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

View File

@ -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);
}

View File

@ -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))