Skip to content

Commit

Permalink
Update to master.
Browse files Browse the repository at this point in the history
  • Loading branch information
aldenml committed Dec 15, 2015
1 parent 67f517c commit 3dc726f
Show file tree
Hide file tree
Showing 6 changed files with 71 additions and 565 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -901,6 +901,7 @@ public class libtorrent_jni {
public final static native void torrent_info_add_http_seed__SWIG_1(long jarg1, torrent_info jarg1_, String jarg2, String jarg3);
public final static native void torrent_info_add_http_seed__SWIG_2(long jarg1, torrent_info jarg1_, String jarg2);
public final static native long torrent_info_web_seeds(long jarg1, torrent_info jarg1_);
public final static native void torrent_info_set_web_seeds(long jarg1, torrent_info jarg1_, long jarg2, web_seed_entry_vector jarg2_);
public final static native long torrent_info_total_size(long jarg1, torrent_info jarg1_);
public final static native int torrent_info_piece_length(long jarg1, torrent_info jarg1_);
public final static native int torrent_info_num_pieces(long jarg1, torrent_info jarg1_);
Expand Down Expand Up @@ -1024,8 +1025,6 @@ public class libtorrent_jni {
public final static native void torrent_handle_queue_position_down(long jarg1, torrent_handle jarg1_);
public final static native void torrent_handle_queue_position_top(long jarg1, torrent_handle jarg1_);
public final static native void torrent_handle_queue_position_bottom(long jarg1, torrent_handle jarg1_);
public final static native void torrent_handle_resolve_countries__SWIG_0(long jarg1, torrent_handle jarg1_, boolean jarg2);
public final static native boolean torrent_handle_resolve_countries__SWIG_1(long jarg1, torrent_handle jarg1_);
public final static native void torrent_handle_set_ssl_certificate__SWIG_0(long jarg1, torrent_handle jarg1_, String jarg2, String jarg3, String jarg4, String jarg5);
public final static native void torrent_handle_set_ssl_certificate__SWIG_1(long jarg1, torrent_handle jarg1_, String jarg2, String jarg3, String jarg4);
public final static native void torrent_handle_set_ssl_certificate_buffer(long jarg1, torrent_handle jarg1_, String jarg2, String jarg3, String jarg4);
Expand Down Expand Up @@ -1057,7 +1056,6 @@ public class libtorrent_jni {
public final static native int torrent_handle_max_uploads(long jarg1, torrent_handle jarg1_);
public final static native void torrent_handle_set_max_connections(long jarg1, torrent_handle jarg1_, int jarg2);
public final static native int torrent_handle_max_connections(long jarg1, torrent_handle jarg1_);
public final static native void torrent_handle_set_tracker_login(long jarg1, torrent_handle jarg1_, String jarg2, String jarg3);
public final static native void torrent_handle_move_storage__SWIG_0(long jarg1, torrent_handle jarg1_, String jarg2, int jarg3);
public final static native void torrent_handle_move_storage__SWIG_1(long jarg1, torrent_handle jarg1_, String jarg2);
public final static native void torrent_handle_rename_file(long jarg1, torrent_handle jarg1_, int jarg2, String jarg3);
Expand Down Expand Up @@ -2294,8 +2292,6 @@ public class libtorrent_jni {
public final static native void cache_status_pieces_set(long jarg1, cache_status jarg1_, long jarg2, cached_piece_info_vector jarg2_);
public final static native long cache_status_pieces_get(long jarg1, cache_status jarg1_);
public final static native void delete_cache_status(long jarg1);
public final static native void peer_info_inet_as_name_set(long jarg1, peer_info jarg1_, String jarg2);
public final static native String peer_info_inet_as_name_get(long jarg1, peer_info jarg1_);
public final static native void peer_info_client_set(long jarg1, peer_info jarg1_, String jarg2);
public final static native String peer_info_client_get(long jarg1, peer_info jarg1_);
public final static native void peer_info_pieces_set(long jarg1, peer_info jarg1_, long jarg2, bitfield jarg2_);
Expand Down Expand Up @@ -2365,8 +2361,6 @@ public class libtorrent_jni {
public final static native int peer_info_used_receive_buffer_get(long jarg1, peer_info jarg1_);
public final static native void peer_info_num_hashfails_set(long jarg1, peer_info jarg1_, int jarg2);
public final static native int peer_info_num_hashfails_get(long jarg1, peer_info jarg1_);
public final static native void peer_info_inet_as_set(long jarg1, peer_info jarg1_, int jarg2);
public final static native int peer_info_inet_as_get(long jarg1, peer_info jarg1_);
public final static native void peer_info_download_queue_length_set(long jarg1, peer_info jarg1_, int jarg2);
public final static native int peer_info_download_queue_length_get(long jarg1, peer_info jarg1_);
public final static native void peer_info_timed_out_requests_set(long jarg1, peer_info jarg1_, int jarg2);
Expand Down Expand Up @@ -2430,8 +2424,6 @@ public class libtorrent_jni {
public final static native char peer_info_read_state_get(long jarg1, peer_info jarg1_);
public final static native void peer_info_write_state_set(long jarg1, peer_info jarg1_, char jarg2);
public final static native char peer_info_write_state_get(long jarg1, peer_info jarg1_);
public final static native void peer_info_country_set(long jarg1, peer_info jarg1_, String jarg2);
public final static native String peer_info_country_get(long jarg1, peer_info jarg1_);
public final static native long new_peer_info();
public final static native void delete_peer_info(long jarg1);
public final static native int peer_list_entry_banned_get();
Expand Down
24 changes: 0 additions & 24 deletions src/main/java/com/frostwire/jlibtorrent/swig/peer_info.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,6 @@ public synchronized void delete() {
}
}

public void setInet_as_name(String value) {
libtorrent_jni.peer_info_inet_as_name_set(swigCPtr, this, value);
}

public String getInet_as_name() {
return libtorrent_jni.peer_info_inet_as_name_get(swigCPtr, this);
}

public void setClient(String value) {
libtorrent_jni.peer_info_client_set(swigCPtr, this, value);
}
Expand Down Expand Up @@ -216,14 +208,6 @@ public int getNum_hashfails() {
return libtorrent_jni.peer_info_num_hashfails_get(swigCPtr, this);
}

public void setInet_as(int value) {
libtorrent_jni.peer_info_inet_as_set(swigCPtr, this, value);
}

public int getInet_as() {
return libtorrent_jni.peer_info_inet_as_get(swigCPtr, this);
}

public void setDownload_queue_length(int value) {
libtorrent_jni.peer_info_download_queue_length_set(swigCPtr, this, value);
}
Expand Down Expand Up @@ -450,14 +434,6 @@ public char getWrite_state() {
return libtorrent_jni.peer_info_write_state_get(swigCPtr, this);
}

public void setCountry(String value) {
libtorrent_jni.peer_info_country_set(swigCPtr, this, value);
}

public String getCountry() {
return libtorrent_jni.peer_info_country_get(swigCPtr, this);
}

public peer_info() {
this(libtorrent_jni.new_peer_info(), true);
}
Expand Down
12 changes: 0 additions & 12 deletions src/main/java/com/frostwire/jlibtorrent/swig/torrent_handle.java
Original file line number Diff line number Diff line change
Expand Up @@ -219,14 +219,6 @@ public void queue_position_bottom() {
libtorrent_jni.torrent_handle_queue_position_bottom(swigCPtr, this);
}

public void resolve_countries(boolean r) {
libtorrent_jni.torrent_handle_resolve_countries__SWIG_0(swigCPtr, this, r);
}

public boolean resolve_countries() {
return libtorrent_jni.torrent_handle_resolve_countries__SWIG_1(swigCPtr, this);
}

public void set_ssl_certificate(String certificate, String private_key, String dh_params, String passphrase) {
libtorrent_jni.torrent_handle_set_ssl_certificate__SWIG_0(swigCPtr, this, certificate, private_key, dh_params, passphrase);
}
Expand Down Expand Up @@ -351,10 +343,6 @@ public int max_connections() {
return libtorrent_jni.torrent_handle_max_connections(swigCPtr, this);
}

public void set_tracker_login(String name, String password) {
libtorrent_jni.torrent_handle_set_tracker_login(swigCPtr, this, name, password);
}

public void move_storage(String save_path, int flags) {
libtorrent_jni.torrent_handle_move_storage__SWIG_0(swigCPtr, this, save_path, flags);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,10 @@ public web_seed_entry_vector web_seeds() {
return new web_seed_entry_vector(libtorrent_jni.torrent_info_web_seeds(swigCPtr, this), false);
}

public void set_web_seeds(web_seed_entry_vector seeds) {
libtorrent_jni.torrent_info_set_web_seeds(swigCPtr, this, web_seed_entry_vector.getCPtr(seeds), seeds);
}

public long total_size() {
return libtorrent_jni.torrent_info_total_size(swigCPtr, this);
}
Expand Down
188 changes: 22 additions & 166 deletions swig/libtorrent_jni.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18105,6 +18105,26 @@ SWIGEXPORT jlong JNICALL Java_com_frostwire_jlibtorrent_swig_libtorrent_1jni_tor
}


SWIGEXPORT void JNICALL Java_com_frostwire_jlibtorrent_swig_libtorrent_1jni_torrent_1info_1set_1web_1seeds(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) {
libtorrent::torrent_info *arg1 = (libtorrent::torrent_info *) 0 ;
std::vector< libtorrent::web_seed_entry > arg2 ;
std::vector< libtorrent::web_seed_entry > *argp2 ;

(void)jenv;
(void)jcls;
(void)jarg1_;
(void)jarg2_;
arg1 = *(libtorrent::torrent_info **)&jarg1;
argp2 = *(std::vector< libtorrent::web_seed_entry > **)&jarg2;
if (!argp2) {
SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "Attempt to dereference null std::vector< libtorrent::web_seed_entry >");
return ;
}
arg2 = *argp2;
(arg1)->set_web_seeds(arg2);
}


SWIGEXPORT jlong JNICALL Java_com_frostwire_jlibtorrent_swig_libtorrent_1jni_torrent_1info_1total_1size(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
jlong jresult = 0 ;
libtorrent::torrent_info *arg1 = (libtorrent::torrent_info *) 0 ;
Expand Down Expand Up @@ -19959,34 +19979,6 @@ SWIGEXPORT void JNICALL Java_com_frostwire_jlibtorrent_swig_libtorrent_1jni_torr
}


SWIGEXPORT void JNICALL Java_com_frostwire_jlibtorrent_swig_libtorrent_1jni_torrent_1handle_1resolve_1countries_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jboolean jarg2) {
libtorrent::torrent_handle *arg1 = (libtorrent::torrent_handle *) 0 ;
bool arg2 ;

(void)jenv;
(void)jcls;
(void)jarg1_;
arg1 = *(libtorrent::torrent_handle **)&jarg1;
arg2 = jarg2 ? true : false;
(arg1)->resolve_countries(arg2);
}


SWIGEXPORT jboolean JNICALL Java_com_frostwire_jlibtorrent_swig_libtorrent_1jni_torrent_1handle_1resolve_1countries_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
jboolean jresult = 0 ;
libtorrent::torrent_handle *arg1 = (libtorrent::torrent_handle *) 0 ;
bool result;

(void)jenv;
(void)jcls;
(void)jarg1_;
arg1 = *(libtorrent::torrent_handle **)&jarg1;
result = (bool)((libtorrent::torrent_handle const *)arg1)->resolve_countries();
jresult = (jboolean)result;
return jresult;
}


SWIGEXPORT void JNICALL Java_com_frostwire_jlibtorrent_swig_libtorrent_1jni_torrent_1handle_1set_1ssl_1certificate_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jstring jarg3, jstring jarg4, jstring jarg5) {
libtorrent::torrent_handle *arg1 = (libtorrent::torrent_handle *) 0 ;
std::string *arg2 = 0 ;
Expand Down Expand Up @@ -20545,37 +20537,6 @@ SWIGEXPORT jint JNICALL Java_com_frostwire_jlibtorrent_swig_libtorrent_1jni_torr
}


SWIGEXPORT void JNICALL Java_com_frostwire_jlibtorrent_swig_libtorrent_1jni_torrent_1handle_1set_1tracker_1login(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jstring jarg3) {
libtorrent::torrent_handle *arg1 = (libtorrent::torrent_handle *) 0 ;
std::string *arg2 = 0 ;
std::string *arg3 = 0 ;

(void)jenv;
(void)jcls;
(void)jarg1_;
arg1 = *(libtorrent::torrent_handle **)&jarg1;
if(!jarg2) {
SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
return ;
}
const char *arg2_pstr = (const char *)jenv->GetStringUTFChars(jarg2, 0);
if (!arg2_pstr) return ;
std::string arg2_str(arg2_pstr);
arg2 = &arg2_str;
jenv->ReleaseStringUTFChars(jarg2, arg2_pstr);
if(!jarg3) {
SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
return ;
}
const char *arg3_pstr = (const char *)jenv->GetStringUTFChars(jarg3, 0);
if (!arg3_pstr) return ;
std::string arg3_str(arg3_pstr);
arg3 = &arg3_str;
jenv->ReleaseStringUTFChars(jarg3, arg3_pstr);
((libtorrent::torrent_handle const *)arg1)->set_tracker_login((std::string const &)*arg2,(std::string const &)*arg3);
}


SWIGEXPORT void JNICALL Java_com_frostwire_jlibtorrent_swig_libtorrent_1jni_torrent_1handle_1move_1storage_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jint jarg3) {
libtorrent::torrent_handle *arg1 = (libtorrent::torrent_handle *) 0 ;
std::string *arg2 = 0 ;
Expand Down Expand Up @@ -37680,42 +37641,6 @@ SWIGEXPORT void JNICALL Java_com_frostwire_jlibtorrent_swig_libtorrent_1jni_dele
}


SWIGEXPORT void JNICALL Java_com_frostwire_jlibtorrent_swig_libtorrent_1jni_peer_1info_1inet_1as_1name_1set(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
libtorrent::peer_info *arg1 = (libtorrent::peer_info *) 0 ;
std::string *arg2 = 0 ;

(void)jenv;
(void)jcls;
(void)jarg1_;
arg1 = *(libtorrent::peer_info **)&jarg1;
if(!jarg2) {
SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
return ;
}
const char *arg2_pstr = (const char *)jenv->GetStringUTFChars(jarg2, 0);
if (!arg2_pstr) return ;
std::string arg2_str(arg2_pstr);
arg2 = &arg2_str;
jenv->ReleaseStringUTFChars(jarg2, arg2_pstr);
if (arg1) (arg1)->inet_as_name = *arg2;
}


SWIGEXPORT jstring JNICALL Java_com_frostwire_jlibtorrent_swig_libtorrent_1jni_peer_1info_1inet_1as_1name_1get(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
jstring jresult = 0 ;
libtorrent::peer_info *arg1 = (libtorrent::peer_info *) 0 ;
std::string *result = 0 ;

(void)jenv;
(void)jcls;
(void)jarg1_;
arg1 = *(libtorrent::peer_info **)&jarg1;
result = (std::string *) & ((arg1)->inet_as_name);
jresult = jenv->NewStringUTF(result->c_str());
return jresult;
}


SWIGEXPORT void JNICALL Java_com_frostwire_jlibtorrent_swig_libtorrent_1jni_peer_1info_1client_1set(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
libtorrent::peer_info *arg1 = (libtorrent::peer_info *) 0 ;
std::string *arg2 = 0 ;
Expand Down Expand Up @@ -38641,34 +38566,6 @@ SWIGEXPORT jint JNICALL Java_com_frostwire_jlibtorrent_swig_libtorrent_1jni_peer
}


SWIGEXPORT void JNICALL Java_com_frostwire_jlibtorrent_swig_libtorrent_1jni_peer_1info_1inet_1as_1set(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) {
libtorrent::peer_info *arg1 = (libtorrent::peer_info *) 0 ;
int arg2 ;

(void)jenv;
(void)jcls;
(void)jarg1_;
arg1 = *(libtorrent::peer_info **)&jarg1;
arg2 = (int)jarg2;
if (arg1) (arg1)->inet_as = arg2;
}


SWIGEXPORT jint JNICALL Java_com_frostwire_jlibtorrent_swig_libtorrent_1jni_peer_1info_1inet_1as_1get(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
jint jresult = 0 ;
libtorrent::peer_info *arg1 = (libtorrent::peer_info *) 0 ;
int result;

(void)jenv;
(void)jcls;
(void)jarg1_;
arg1 = *(libtorrent::peer_info **)&jarg1;
result = (int) ((arg1)->inet_as);
jresult = (jint)result;
return jresult;
}


SWIGEXPORT void JNICALL Java_com_frostwire_jlibtorrent_swig_libtorrent_1jni_peer_1info_1download_1queue_1length_1set(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) {
libtorrent::peer_info *arg1 = (libtorrent::peer_info *) 0 ;
int arg2 ;
Expand Down Expand Up @@ -39539,47 +39436,6 @@ SWIGEXPORT jchar JNICALL Java_com_frostwire_jlibtorrent_swig_libtorrent_1jni_pee
}


SWIGEXPORT void JNICALL Java_com_frostwire_jlibtorrent_swig_libtorrent_1jni_peer_1info_1country_1set(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
libtorrent::peer_info *arg1 = (libtorrent::peer_info *) 0 ;
char *arg2 ;

(void)jenv;
(void)jcls;
(void)jarg1_;
arg1 = *(libtorrent::peer_info **)&jarg1;
arg2 = 0;
if (jarg2) {
arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
if (!arg2) return ;
}
{
if(arg2) {
strncpy((char*)arg1->country, (const char *)arg2, 2-1);
arg1->country[2-1] = 0;
} else {
arg1->country[0] = 0;
}
}

if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
}


SWIGEXPORT jstring JNICALL Java_com_frostwire_jlibtorrent_swig_libtorrent_1jni_peer_1info_1country_1get(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
jstring jresult = 0 ;
libtorrent::peer_info *arg1 = (libtorrent::peer_info *) 0 ;
char *result = 0 ;

(void)jenv;
(void)jcls;
(void)jarg1_;
arg1 = *(libtorrent::peer_info **)&jarg1;
result = (char *)(char *) ((arg1)->country);
if (result) jresult = jenv->NewStringUTF((const char *)result);
return jresult;
}


SWIGEXPORT jlong JNICALL Java_com_frostwire_jlibtorrent_swig_libtorrent_1jni_new_1peer_1info(JNIEnv *jenv, jclass jcls) {
jlong jresult = 0 ;
libtorrent::peer_info *result = 0 ;
Expand Down Expand Up @@ -51081,7 +50937,7 @@ SWIGEXPORT jstring JNICALL Java_com_frostwire_jlibtorrent_swig_libtorrent_1jni_L

(void)jenv;
(void)jcls;
result = (char *)("c1cb1393fbad32003404039a7a830020a5fef434");
result = (char *)("0b04cb4ee01d474ebec5253a8363dd528a4cb715");
if (result) jresult = jenv->NewStringUTF((const char *)result);
return jresult;
}
Expand All @@ -51093,7 +50949,7 @@ SWIGEXPORT jstring JNICALL Java_com_frostwire_jlibtorrent_swig_libtorrent_1jni_J

(void)jenv;
(void)jcls;
result = (char *)("8e84954287ad340d32f1670dac7c64a635efd661");
result = (char *)("67f517cf81b45267c50fc7f8d550bbd8a175d057");
if (result) jresult = jenv->NewStringUTF((const char *)result);
return jresult;
}
Expand Down

0 comments on commit 3dc726f

Please sign in to comment.