updated python bindings to build
This commit is contained in:
parent
a259b2ba93
commit
b968f26273
|
@ -13,8 +13,10 @@ using namespace libtorrent;
|
|||
void bind_create_torrent()
|
||||
{
|
||||
void (file_storage::*add_file0)(file_entry const&) = &file_storage::add_file;
|
||||
void (file_storage::*add_file1)(fs::path const&, size_type, int) = &file_storage::add_file;
|
||||
void (file_storage::*add_file2)(fs::wpath const&, size_type, int) = &file_storage::add_file;
|
||||
void (file_storage::*add_file1)(fs::path const&, size_type, int, std::time_t, fs::path const&) = &file_storage::add_file;
|
||||
#ifndef BOOST_FILESYSTEM_NARROW_ONLY
|
||||
void (file_storage::*add_file2)(fs::wpath const&, size_type, int, std::time_t, fs::path const&) = &file_storage::add_file;
|
||||
#endif
|
||||
|
||||
void (file_storage::*set_name0)(std::string const&) = &file_storage::set_name;
|
||||
void (file_storage::*set_name1)(std::wstring const&) = &file_storage::set_name;
|
||||
|
@ -22,8 +24,10 @@ void bind_create_torrent()
|
|||
class_<file_storage>("file_storage")
|
||||
.def("is_valid", &file_storage::is_valid)
|
||||
.def("add_file", add_file0)
|
||||
.def("add_file", add_file1, (arg("path"), arg("size"), arg("flags") = 0))
|
||||
.def("add_file", add_file2, (arg("path"), arg("size"), arg("flags") = 0))
|
||||
.def("add_file", add_file1, (arg("path"), arg("size"), arg("flags") = 0, arg("mtime") = 0, arg("linkpath") = ""))
|
||||
#ifndef BOOST_FILESYSTEM_NARROW_ONLY
|
||||
.def("add_file", add_file2, (arg("path"), arg("size"), arg("flags") = 0, arg("mtime") = 0, arg("linkpath") = ""))
|
||||
#endif
|
||||
.def("num_files", &file_storage::num_files)
|
||||
.def("at", &file_storage::at, return_internal_reference<>())
|
||||
.def("total_size", &file_storage::total_size)
|
||||
|
|
|
@ -89,6 +89,11 @@ void bind_torrent_info()
|
|||
{
|
||||
return_value_policy<copy_const_reference> copy;
|
||||
|
||||
void (torrent_info::*rename_file0)(int, std::string const&) = &torrent_info::rename_file;
|
||||
#ifndef BOOST_FILESYSTEM_NARROW_ONLY
|
||||
void (torrent_info::*rename_file1)(int, std::wstring const&) = &torrent_info::rename_file;
|
||||
#endif
|
||||
|
||||
class_<file_slice>("file_slice")
|
||||
.def_readwrite("file_index", &file_slice::file_index)
|
||||
.def_readwrite("offset", &file_slice::offset)
|
||||
|
@ -123,7 +128,10 @@ void bind_torrent_info()
|
|||
.def("file_at", &torrent_info::file_at, return_internal_reference<>())
|
||||
.def("file_at_offset", &torrent_info::file_at_offset)
|
||||
.def("files", &files, (arg("storage")=false))
|
||||
.def("rename_file", &torrent_info::rename_file)
|
||||
.def("rename_file", rename_file0)
|
||||
#ifndef BOOST_FILESYSTEM_NARROW_ONLY
|
||||
.def("rename_file", rename_file1)
|
||||
#endif
|
||||
|
||||
.def("priv", &torrent_info::priv)
|
||||
.def("trackers", range(begin_trackers, end_trackers))
|
||||
|
|
Loading…
Reference in New Issue