Skip to content

Commit

Permalink
Swig cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
aldenml committed Feb 10, 2016
1 parent 21ab912 commit 7b48ea8
Show file tree
Hide file tree
Showing 8 changed files with 222 additions and 1,990 deletions.

This file was deleted.

This file was deleted.

5 changes: 0 additions & 5 deletions src/main/java/com/frostwire/jlibtorrent/swig/libtorrent.java
Expand Up @@ -157,11 +157,6 @@ public static void set_piece_hashes(create_torrent t, String p, error_code ec) {
libtorrent_jni.set_piece_hashes(create_torrent.getCPtr(t), t, p, error_code.getCPtr(ec), ec);
}

public static dht_storage_interface dht_default_storage_constructor(sha1_hash id, dht_settings settings) {
long cPtr = libtorrent_jni.dht_default_storage_constructor(sha1_hash.getCPtr(id), id, dht_settings.getCPtr(settings), settings);
return (cPtr == 0) ? null : new dht_storage_interface(cPtr, false);
}

public static boolean is_utp_stream_logging() {
return libtorrent_jni.is_utp_stream_logging();
}
Expand Down
22 changes: 0 additions & 22 deletions src/main/java/com/frostwire/jlibtorrent/swig/libtorrent_jni.java
Expand Up @@ -2475,8 +2475,6 @@ public class libtorrent_jni {
public final static native int session_handle_tcp_get();
public final static native int session_handle_add_port_mapping(long jarg1, session_handle jarg1_, int jarg2, int jarg3, int jarg4);
public final static native void session_handle_delete_port_mapping(long jarg1, session_handle jarg1_, int jarg2);
public final static native void session_handle_add_lt_trackers_extension(long jarg1, session_handle jarg1_);
public final static native void session_handle_add_smart_ban_extension(long jarg1, session_handle jarg1_);
public final static native void session_handle_dht_get_item__SWIG_1(long jarg1, session_handle jarg1_, long jarg2, byte_vector jarg2_, String jarg3);
public final static native void session_handle_dht_get_item__SWIG_2(long jarg1, session_handle jarg1_, long jarg2, byte_vector jarg2_);
public final static native void session_handle_dht_put_item__SWIG_1(long jarg1, session_handle jarg1_, long jarg2, byte_vector jarg2_, long jarg3, byte_vector jarg3_, long jarg4, entry jarg4_, String jarg5);
Expand Down Expand Up @@ -2909,26 +2907,6 @@ public class libtorrent_jni {
public final static native int ed25519_signature_size_get();
public final static native int ed25519_scalar_size_get();
public final static native int ed25519_shared_secret_size_get();
public final static native void dht_storage_counters_torrents_set(long jarg1, dht_storage_counters jarg1_, int jarg2);
public final static native int dht_storage_counters_torrents_get(long jarg1, dht_storage_counters jarg1_);
public final static native void dht_storage_counters_peers_set(long jarg1, dht_storage_counters jarg1_, int jarg2);
public final static native int dht_storage_counters_peers_get(long jarg1, dht_storage_counters jarg1_);
public final static native void dht_storage_counters_immutable_data_set(long jarg1, dht_storage_counters jarg1_, int jarg2);
public final static native int dht_storage_counters_immutable_data_get(long jarg1, dht_storage_counters jarg1_);
public final static native void dht_storage_counters_mutable_data_set(long jarg1, dht_storage_counters jarg1_, int jarg2);
public final static native int dht_storage_counters_mutable_data_get(long jarg1, dht_storage_counters jarg1_);
public final static native long new_dht_storage_counters();
public final static native void delete_dht_storage_counters(long jarg1);
public final static native boolean dht_storage_interface_get_peers(long jarg1, dht_storage_interface jarg1_, long jarg2, sha1_hash jarg2_, boolean jarg3, boolean jarg4, long jarg5, entry jarg5_);
public final static native void dht_storage_interface_announce_peer(long jarg1, dht_storage_interface jarg1_, long jarg2, sha1_hash jarg2_, long jarg3, tcp_endpoint jarg3_, String jarg4, boolean jarg5);
public final static native boolean dht_storage_interface_get_immutable_item(long jarg1, dht_storage_interface jarg1_, long jarg2, sha1_hash jarg2_, long jarg3, entry jarg3_);
public final static native void dht_storage_interface_put_immutable_item(long jarg1, dht_storage_interface jarg1_, long jarg2, sha1_hash jarg2_, String jarg3, int jarg4, long jarg5, address jarg5_);
public final static native boolean dht_storage_interface_get_mutable_item(long jarg1, dht_storage_interface jarg1_, long jarg2, sha1_hash jarg2_, long jarg3, boolean jarg4, long jarg5, entry jarg5_);
public final static native void dht_storage_interface_put_mutable_item(long jarg1, dht_storage_interface jarg1_, long jarg2, sha1_hash jarg2_, String jarg3, int jarg4, String jarg5, long jarg6, String jarg7, String jarg8, int jarg9, long jarg10, address jarg10_);
public final static native void dht_storage_interface_tick(long jarg1, dht_storage_interface jarg1_);
public final static native long dht_storage_interface_counters(long jarg1, dht_storage_interface jarg1_);
public final static native void delete_dht_storage_interface(long jarg1);
public final static native long dht_default_storage_constructor(long jarg1, sha1_hash jarg1_, long jarg2, dht_settings jarg2_);
public final static native long new_address__SWIG_0();
public final static native long new_address__SWIG_1(long jarg1, address_v4 jarg1_);
public final static native long new_address__SWIG_2(long jarg1, address_v6 jarg1_);
Expand Down
Expand Up @@ -244,14 +244,6 @@ public void delete_port_mapping(int handle) {
libtorrent_jni.session_handle_delete_port_mapping(swigCPtr, this, handle);
}

public void add_lt_trackers_extension() {
libtorrent_jni.session_handle_add_lt_trackers_extension(swigCPtr, this);
}

public void add_smart_ban_extension() {
libtorrent_jni.session_handle_add_smart_ban_extension(swigCPtr, this);
}

public void dht_get_item(byte_vector key_v, String salt) {
libtorrent_jni.session_handle_dht_get_item__SWIG_1(swigCPtr, this, byte_vector.getCPtr(key_v), key_v, salt);
}
Expand Down
19 changes: 0 additions & 19 deletions swig/libtorrent.i
Expand Up @@ -75,13 +75,6 @@
#include "libtorrent/torrent_status.hpp"
#include "libtorrent/ed25519.hpp"

#include "libtorrent/kademlia/dht_storage.hpp"

#include "libtorrent/extensions/ut_pex.hpp"
#include "libtorrent/extensions/ut_metadata.hpp"
#include "libtorrent/extensions/lt_trackers.hpp"
#include "libtorrent/extensions/smart_ban.hpp"

using namespace boost;
using namespace boost::system;

Expand Down Expand Up @@ -494,8 +487,6 @@ namespace std {
%ignore libtorrent::bitfield::begin;
%ignore libtorrent::bitfield::end;

%ignore libtorrent::dht::dht_storage_interface::get_mutable_item_seq;

%ignore boost::throws;
%ignore boost::detail::throws;
%ignore boost::asio::ip::address_v4::to_bytes;
Expand Down Expand Up @@ -604,8 +595,6 @@ namespace std {
%include "libtorrent/torrent_status.hpp"
%include "libtorrent/ed25519.hpp"

%include "libtorrent/kademlia/dht_storage.hpp"

namespace boost {

namespace asio {
Expand Down Expand Up @@ -852,14 +841,6 @@ namespace libtorrent {

%extend session_handle {

void add_lt_trackers_extension() {
$self->add_extension(&libtorrent::create_lt_trackers_plugin);
}

void add_smart_ban_extension() {
$self->add_extension(&libtorrent::create_smart_ban_plugin);
}

void dht_get_item(std::vector<int8_t>& key_v, std::string salt = std::string()) {
if (key_v.size() != 32) {
throw std::invalid_argument("Public key must be of size 32");
Expand Down

0 comments on commit 7b48ea8

Please sign in to comment.