update bindings

This commit is contained in:
Andrew Resch 2008-09-30 21:38:39 +00:00
parent 26b872dee9
commit a449610e15
3 changed files with 47 additions and 39 deletions

View File

@ -278,6 +278,7 @@ void bind_alert()
class_<file_renamed_alert, bases<torrent_alert>, noncopyable>(
"file_renamed_alert", no_init
)
.def_readonly("index", &file_renamed_alert::index)
.def_readonly("name", &file_renamed_alert::name)
;
@ -285,6 +286,7 @@ void bind_alert()
"file_rename_failed_alert", no_init
)
.def_readonly("index", &file_rename_failed_alert::index)
.def_readonly("msg", &file_rename_failed_alert::msg)
;
class_<torrent_resumed_alert, bases<torrent_alert>, noncopyable>(

View File

@ -317,6 +317,7 @@ void bind_torrent_handle()
.def("move_storage", _(&torrent_handle::move_storage))
.def("info_hash", _(&torrent_handle::info_hash))
.def("force_recheck", _(&torrent_handle::force_recheck))
.def("rename_file", _(&torrent_handle::rename_file))
;
}

View File

@ -63,7 +63,10 @@ namespace
return result;
}
std::string metadata(torrent_info const& ti) {
std::string result(ti.metadata().get(), ti.metadata_size());
return result;
}
} // namespace unnamed
void bind_torrent_info()
@ -101,6 +104,8 @@ void bind_torrent_info()
.def("add_node", &add_node)
.def("nodes", &nodes)
.def("metadata", &metadata)
.def("metadata_size", &torrent_info::metadata_size)
;
class_<file_entry>("file_entry")