Skip to content

Commit

Permalink
Type cleanup.
Browse files Browse the repository at this point in the history
  • Loading branch information
aldenml committed Feb 25, 2015
1 parent c6dd37d commit 9d01e10
Show file tree
Hide file tree
Showing 9 changed files with 210 additions and 449 deletions.

This file was deleted.

This file was deleted.

67 changes: 67 additions & 0 deletions src/com/frostwire/jlibtorrent/swig/block_cache_reference.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 3.0.5
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */

package com.frostwire.jlibtorrent.swig;

public class block_cache_reference {
private long swigCPtr;
protected boolean swigCMemOwn;

protected block_cache_reference(long cPtr, boolean cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = cPtr;
}

protected static long getCPtr(block_cache_reference obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}

protected void finalize() {
delete();
}

public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
libtorrent_jni.delete_block_cache_reference(swigCPtr);
}
swigCPtr = 0;
}
}

public void setStorage(SWIGTYPE_p_void value) {
libtorrent_jni.block_cache_reference_storage_set(swigCPtr, this, SWIGTYPE_p_void.getCPtr(value));
}

public SWIGTYPE_p_void getStorage() {
long cPtr = libtorrent_jni.block_cache_reference_storage_get(swigCPtr, this);
return (cPtr == 0) ? null : new SWIGTYPE_p_void(cPtr, false);
}

public void setPiece(int value) {
libtorrent_jni.block_cache_reference_piece_set(swigCPtr, this, value);
}

public int getPiece() {
return libtorrent_jni.block_cache_reference_piece_get(swigCPtr, this);
}

public void setBlock(int value) {
libtorrent_jni.block_cache_reference_block_set(swigCPtr, this, value);
}

public int getBlock() {
return libtorrent_jni.block_cache_reference_block_get(swigCPtr, this);
}

public block_cache_reference() {
this(libtorrent_jni.new_block_cache_reference(), true);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ public void free_disk_buffer(String b) {
libtorrent_jni.buffer_allocator_interface_free_disk_buffer(swigCPtr, this, b);
}

public void reclaim_block(SWIGTYPE_p_block_cache_reference ref) {
libtorrent_jni.buffer_allocator_interface_reclaim_block(swigCPtr, this, SWIGTYPE_p_block_cache_reference.getCPtr(ref));
public void reclaim_block(block_cache_reference ref) {
libtorrent_jni.buffer_allocator_interface_reclaim_block(swigCPtr, this, block_cache_reference.getCPtr(ref), ref);
}

public String allocate_disk_buffer(SWIGTYPE_p_bool exceeded, SWIGTYPE_p_boost__shared_ptrT_libtorrent__disk_observer_t o, String category) {
Expand Down
4 changes: 0 additions & 4 deletions src/com/frostwire/jlibtorrent/swig/libtorrent.java
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,6 @@ public static int source_rank(int source_bitmask) {
return libtorrent_jni.source_rank(source_bitmask);
}

public static void nop(String arg0, SWIGTYPE_p_void arg1, SWIGTYPE_p_block_cache_reference arg2) {
libtorrent_jni.nop(arg0, SWIGTYPE_p_void.getCPtr(arg1), SWIGTYPE_p_block_cache_reference.getCPtr(arg2));
}

public static void initialize_file_progress(SWIGTYPE_p_std__vectorT_unsigned_long_long_t file_progress, SWIGTYPE_p_piece_picker picker, file_storage fs) {
libtorrent_jni.initialize_file_progress(SWIGTYPE_p_std__vectorT_unsigned_long_long_t.getCPtr(file_progress), SWIGTYPE_p_piece_picker.getCPtr(picker), file_storage.getCPtr(fs), fs);
}
Expand Down
19 changes: 9 additions & 10 deletions src/com/frostwire/jlibtorrent/swig/libtorrent_jni.java
Original file line number Diff line number Diff line change
Expand Up @@ -2587,7 +2587,6 @@ public class libtorrent_jni {
public final static native long peer_connection_args_peerinfo_get(long jarg1, peer_connection_args jarg1_);
public final static native long new_peer_connection_args();
public final static native void delete_peer_connection_args(long jarg1);
public final static native void nop(String jarg1, long jarg2, long jarg3);
public final static native long new_peer_connection_hot_members(long jarg1, long jarg2, long jarg3);
public final static native void peer_connection_hot_members_m_ses_set(long jarg1, peer_connection_hot_members jarg1_, long jarg2);
public final static native long peer_connection_hot_members_m_ses_get(long jarg1, peer_connection_hot_members jarg1_);
Expand Down Expand Up @@ -2726,14 +2725,6 @@ public class libtorrent_jni {
public final static native void peer_connection_cork_socket(long jarg1, peer_connection jarg1_);
public final static native boolean peer_connection_is_corked(long jarg1, peer_connection jarg1_);
public final static native void peer_connection_uncork_socket(long jarg1, peer_connection jarg1_);
public final static native void peer_connection_append_send_buffer__SWIG_0(long jarg1, peer_connection jarg1_, String jarg2, int jarg3, long jarg4, long jarg5, long jarg6);
public final static native void peer_connection_append_send_buffer__SWIG_1(long jarg1, peer_connection jarg1_, String jarg2, int jarg3, long jarg4, long jarg5);
public final static native void peer_connection_append_send_buffer__SWIG_2(long jarg1, peer_connection jarg1_, String jarg2, int jarg3, long jarg4);
public final static native void peer_connection_append_send_buffer__SWIG_3(long jarg1, peer_connection jarg1_, String jarg2, int jarg3);
public final static native void peer_connection_append_const_send_buffer__SWIG_0(long jarg1, peer_connection jarg1_, String jarg2, int jarg3, long jarg4, long jarg5, long jarg6);
public final static native void peer_connection_append_const_send_buffer__SWIG_1(long jarg1, peer_connection jarg1_, String jarg2, int jarg3, long jarg4, long jarg5);
public final static native void peer_connection_append_const_send_buffer__SWIG_2(long jarg1, peer_connection jarg1_, String jarg2, int jarg3, long jarg4);
public final static native void peer_connection_append_const_send_buffer__SWIG_3(long jarg1, peer_connection jarg1_, String jarg2, int jarg3);
public final static native void peer_connection_set_country(long jarg1, peer_connection jarg1_, String jarg2);
public final static native boolean peer_connection_has_country(long jarg1, peer_connection jarg1_);
public final static native int peer_connection_outstanding_bytes(long jarg1, peer_connection jarg1_);
Expand Down Expand Up @@ -2956,9 +2947,17 @@ public class libtorrent_jni {
public final static native void crypto_plugin_set_outgoing_key(long jarg1, crypto_plugin jarg1_, long jarg2, int jarg3);
public final static native int crypto_plugin_encrypt(long jarg1, crypto_plugin jarg1_, long jarg2);
public final static native void crypto_plugin_decrypt(long jarg1, crypto_plugin jarg1_, long jarg2, long jarg3, long jarg4, long jarg5);
public final static native void block_cache_reference_storage_set(long jarg1, block_cache_reference jarg1_, long jarg2);
public final static native long block_cache_reference_storage_get(long jarg1, block_cache_reference jarg1_);
public final static native void block_cache_reference_piece_set(long jarg1, block_cache_reference jarg1_, int jarg2);
public final static native int block_cache_reference_piece_get(long jarg1, block_cache_reference jarg1_);
public final static native void block_cache_reference_block_set(long jarg1, block_cache_reference jarg1_, int jarg2);
public final static native int block_cache_reference_block_get(long jarg1, block_cache_reference jarg1_);
public final static native long new_block_cache_reference();
public final static native void delete_block_cache_reference(long jarg1);
public final static native String buffer_allocator_interface_allocate_disk_buffer__SWIG_0(long jarg1, buffer_allocator_interface jarg1_, String jarg2);
public final static native void buffer_allocator_interface_free_disk_buffer(long jarg1, buffer_allocator_interface jarg1_, String jarg2);
public final static native void buffer_allocator_interface_reclaim_block(long jarg1, buffer_allocator_interface jarg1_, long jarg2);
public final static native void buffer_allocator_interface_reclaim_block(long jarg1, buffer_allocator_interface jarg1_, long jarg2, block_cache_reference jarg2_);
public final static native String buffer_allocator_interface_allocate_disk_buffer__SWIG_1(long jarg1, buffer_allocator_interface jarg1_, long jarg2, long jarg3, String jarg4);
public final static native String buffer_allocator_interface_async_allocate_disk_buffer(long jarg1, buffer_allocator_interface jarg1_, String jarg2, long jarg3);
public final static native void delete_buffer_allocator_interface(long jarg1);
Expand Down
32 changes: 0 additions & 32 deletions src/com/frostwire/jlibtorrent/swig/peer_connection.java
Original file line number Diff line number Diff line change
Expand Up @@ -542,38 +542,6 @@ public void uncork_socket() {
libtorrent_jni.peer_connection_uncork_socket(swigCPtr, this);
}

public void append_send_buffer(String buffer, int size, SWIGTYPE_p_chained_buffer__free_buffer_fun destructor, SWIGTYPE_p_void userdata, SWIGTYPE_p_block_cache_reference ref) {
libtorrent_jni.peer_connection_append_send_buffer__SWIG_0(swigCPtr, this, buffer, size, SWIGTYPE_p_chained_buffer__free_buffer_fun.getCPtr(destructor), SWIGTYPE_p_void.getCPtr(userdata), SWIGTYPE_p_block_cache_reference.getCPtr(ref));
}

public void append_send_buffer(String buffer, int size, SWIGTYPE_p_chained_buffer__free_buffer_fun destructor, SWIGTYPE_p_void userdata) {
libtorrent_jni.peer_connection_append_send_buffer__SWIG_1(swigCPtr, this, buffer, size, SWIGTYPE_p_chained_buffer__free_buffer_fun.getCPtr(destructor), SWIGTYPE_p_void.getCPtr(userdata));
}

public void append_send_buffer(String buffer, int size, SWIGTYPE_p_chained_buffer__free_buffer_fun destructor) {
libtorrent_jni.peer_connection_append_send_buffer__SWIG_2(swigCPtr, this, buffer, size, SWIGTYPE_p_chained_buffer__free_buffer_fun.getCPtr(destructor));
}

public void append_send_buffer(String buffer, int size) {
libtorrent_jni.peer_connection_append_send_buffer__SWIG_3(swigCPtr, this, buffer, size);
}

public void append_const_send_buffer(String buffer, int size, SWIGTYPE_p_chained_buffer__free_buffer_fun destructor, SWIGTYPE_p_void userdata, SWIGTYPE_p_block_cache_reference ref) {
libtorrent_jni.peer_connection_append_const_send_buffer__SWIG_0(swigCPtr, this, buffer, size, SWIGTYPE_p_chained_buffer__free_buffer_fun.getCPtr(destructor), SWIGTYPE_p_void.getCPtr(userdata), SWIGTYPE_p_block_cache_reference.getCPtr(ref));
}

public void append_const_send_buffer(String buffer, int size, SWIGTYPE_p_chained_buffer__free_buffer_fun destructor, SWIGTYPE_p_void userdata) {
libtorrent_jni.peer_connection_append_const_send_buffer__SWIG_1(swigCPtr, this, buffer, size, SWIGTYPE_p_chained_buffer__free_buffer_fun.getCPtr(destructor), SWIGTYPE_p_void.getCPtr(userdata));
}

public void append_const_send_buffer(String buffer, int size, SWIGTYPE_p_chained_buffer__free_buffer_fun destructor) {
libtorrent_jni.peer_connection_append_const_send_buffer__SWIG_2(swigCPtr, this, buffer, size, SWIGTYPE_p_chained_buffer__free_buffer_fun.getCPtr(destructor));
}

public void append_const_send_buffer(String buffer, int size) {
libtorrent_jni.peer_connection_append_const_send_buffer__SWIG_3(swigCPtr, this, buffer, size);
}

public void set_country(String c) {
libtorrent_jni.peer_connection_set_country(swigCPtr, this, c);
}
Expand Down
5 changes: 5 additions & 0 deletions swig/libtorrent.i
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
#include "libtorrent/torrent.hpp"
#include "libtorrent/session.hpp"
#include "libtorrent/extensions.hpp"
#include "libtorrent/disk_io_job.hpp"
#include "libtorrent/disk_buffer_holder.hpp"
#include "libtorrent/disk_buffer_pool.hpp"
#include "libtorrent/bt_peer_connection.hpp"
Expand Down Expand Up @@ -413,6 +414,7 @@ namespace std {
%ignore libtorrent::convert_path_to_posix;
%ignore libtorrent::hex_to_int;
%ignore libtorrent::to_hex;
%ignore libtorrent::nop;

%ignore libtorrent::tracker_manager::tracker_manager;
%ignore libtorrent::tracker_manager::queue_request;
Expand Down Expand Up @@ -456,6 +458,8 @@ namespace std {
%ignore libtorrent::peer_connection::add_extension;
%ignore libtorrent::peer_connection::find_plugin;
%ignore libtorrent::peer_connection::received_listen_port() const;
%ignore libtorrent::peer_connection::append_const_send_buffer;
%ignore libtorrent::peer_connection::append_send_buffer;
%ignore libtorrent::bt_peer_connection::send_buffer;
%ignore libtorrent::bt_peer_connection::write_metadata;
%ignore libtorrent::bt_peer_connection::write_metadata_request;
Expand Down Expand Up @@ -618,6 +622,7 @@ namespace std {
%include "libtorrent/torrent.hpp"
%include "libtorrent/session.hpp"
%include "libtorrent/extensions.hpp"
%include "libtorrent/disk_io_job.hpp"
%include "libtorrent/disk_buffer_holder.hpp"
%include "libtorrent/disk_buffer_pool.hpp"
%include "libtorrent/bt_peer_connection.hpp"
Expand Down

0 comments on commit 9d01e10

Please sign in to comment.