Add ip_filter to libtorrent bindings.
This commit is contained in:
parent
bd99ebf190
commit
72e0a35986
|
@ -179,7 +179,8 @@ char const* session_start_natpmp_doc =
|
|||
"";
|
||||
char const* session_stop_natpmp_doc =
|
||||
"";
|
||||
|
||||
char const* session_set_ip_filter_doc =
|
||||
"";
|
||||
// -- alert -----------------------------------------------------------------
|
||||
|
||||
char const* alert_doc =
|
||||
|
|
|
@ -21,6 +21,7 @@ void bind_extensions();
|
|||
void bind_peer_plugin();
|
||||
void bind_torrent();
|
||||
void bind_peer_info();
|
||||
void bind_ip_filter();
|
||||
|
||||
BOOST_PYTHON_MODULE(libtorrent)
|
||||
{
|
||||
|
@ -44,5 +45,6 @@ BOOST_PYTHON_MODULE(libtorrent)
|
|||
bind_peer_plugin();
|
||||
bind_torrent();
|
||||
bind_peer_info();
|
||||
bind_ip_filter();
|
||||
}
|
||||
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
#include <libtorrent/session.hpp>
|
||||
#include <libtorrent/torrent.hpp>
|
||||
#include <libtorrent/storage.hpp>
|
||||
#include <libtorrent/ip_filter.hpp>
|
||||
#include <boost/python.hpp>
|
||||
#include "gil.hpp"
|
||||
|
||||
|
@ -57,6 +58,7 @@ extern char const* session_stop_lsd_doc;
|
|||
extern char const* session_stop_upnp_doc;
|
||||
extern char const* session_start_natpmp_doc;
|
||||
extern char const* session_stop_natpmp_doc;
|
||||
extern char const* session_set_ip_filter_doc;
|
||||
|
||||
namespace
|
||||
{
|
||||
|
@ -260,6 +262,7 @@ void bind_session()
|
|||
.def("stop_lsd", allow_threads(&session::stop_lsd), session_stop_lsd_doc)
|
||||
.def("start_natpmp", allow_threads(&session::start_natpmp), session_start_natpmp_doc)
|
||||
.def("stop_natpmp", allow_threads(&session::stop_natpmp), session_stop_natpmp_doc)
|
||||
.def("set_ip_filter", allow_threads(&session::set_ip_filter), session_set_ip_filter_doc)
|
||||
;
|
||||
|
||||
register_ptr_to_python<std::auto_ptr<alert> >();
|
||||
|
|
Loading…
Reference in New Issue