fix python binding of port_mapping_t
This commit is contained in:
parent
fe1c395579
commit
9c7f87ed5d
|
@ -575,7 +575,7 @@ void bind_alert()
|
||||||
|
|
||||||
class_<portmap_error_alert, bases<alert>, noncopyable>(
|
class_<portmap_error_alert, bases<alert>, noncopyable>(
|
||||||
"portmap_error_alert", no_init)
|
"portmap_error_alert", no_init)
|
||||||
.def_readonly("mapping", &portmap_error_alert::mapping)
|
.add_property("mapping", make_getter(&portmap_error_alert::mapping, by_value()))
|
||||||
.def_readonly("error", &portmap_error_alert::error)
|
.def_readonly("error", &portmap_error_alert::error)
|
||||||
.def_readonly("map_transport", &portmap_error_alert::map_transport)
|
.def_readonly("map_transport", &portmap_error_alert::map_transport)
|
||||||
#ifndef TORRENT_NO_DEPRECATE
|
#ifndef TORRENT_NO_DEPRECATE
|
||||||
|
@ -586,7 +586,7 @@ void bind_alert()
|
||||||
;
|
;
|
||||||
|
|
||||||
class_<portmap_alert, bases<alert>, noncopyable>("portmap_alert", no_init)
|
class_<portmap_alert, bases<alert>, noncopyable>("portmap_alert", no_init)
|
||||||
.def_readonly("mapping", &portmap_alert::mapping)
|
.add_property("mapping", make_getter(&portmap_alert::mapping, by_value()))
|
||||||
.def_readonly("external_port", &portmap_alert::external_port)
|
.def_readonly("external_port", &portmap_alert::external_port)
|
||||||
.def_readonly("map_protocol", &portmap_alert::map_protocol)
|
.def_readonly("map_protocol", &portmap_alert::map_protocol)
|
||||||
.def_readonly("map_transport", &portmap_alert::map_transport)
|
.def_readonly("map_transport", &portmap_alert::map_transport)
|
||||||
|
|
|
@ -19,6 +19,7 @@
|
||||||
#include "libtorrent/file_storage.hpp" // for file_flags_t
|
#include "libtorrent/file_storage.hpp" // for file_flags_t
|
||||||
#include "libtorrent/alert.hpp"
|
#include "libtorrent/alert.hpp"
|
||||||
#include "libtorrent/create_torrent.hpp" // for create_flags_t
|
#include "libtorrent/create_torrent.hpp" // for create_flags_t
|
||||||
|
#include "libtorrent/portmap.hpp" // for port_mapping_t
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
using namespace boost::python;
|
using namespace boost::python;
|
||||||
|
@ -299,6 +300,7 @@ void bind_converters()
|
||||||
|
|
||||||
to_python_converter<lt::piece_index_t, from_strong_typedef<lt::piece_index_t>>();
|
to_python_converter<lt::piece_index_t, from_strong_typedef<lt::piece_index_t>>();
|
||||||
to_python_converter<lt::file_index_t, from_strong_typedef<lt::file_index_t>>();
|
to_python_converter<lt::file_index_t, from_strong_typedef<lt::file_index_t>>();
|
||||||
|
to_python_converter<lt::port_mapping_t, from_strong_typedef<lt::port_mapping_t>>();
|
||||||
to_python_converter<lt::torrent_flags_t, from_bitfield_flag<lt::torrent_flags_t>>();
|
to_python_converter<lt::torrent_flags_t, from_bitfield_flag<lt::torrent_flags_t>>();
|
||||||
to_python_converter<lt::peer_flags_t, from_bitfield_flag<lt::peer_flags_t>>();
|
to_python_converter<lt::peer_flags_t, from_bitfield_flag<lt::peer_flags_t>>();
|
||||||
to_python_converter<lt::peer_source_flags_t, from_bitfield_flag<lt::peer_source_flags_t>>();
|
to_python_converter<lt::peer_source_flags_t, from_bitfield_flag<lt::peer_source_flags_t>>();
|
||||||
|
@ -358,6 +360,7 @@ void bind_converters()
|
||||||
|
|
||||||
to_strong_typedef<lt::piece_index_t>();
|
to_strong_typedef<lt::piece_index_t>();
|
||||||
to_strong_typedef<lt::file_index_t>();
|
to_strong_typedef<lt::file_index_t>();
|
||||||
|
to_strong_typedef<lt::port_mapping_t>();
|
||||||
to_bitfield_flag<lt::torrent_flags_t>();
|
to_bitfield_flag<lt::torrent_flags_t>();
|
||||||
to_bitfield_flag<lt::peer_flags_t>();
|
to_bitfield_flag<lt::peer_flags_t>();
|
||||||
to_bitfield_flag<lt::peer_source_flags_t>();
|
to_bitfield_flag<lt::peer_source_flags_t>();
|
||||||
|
|
Loading…
Reference in New Issue