Skip to content

Commit

Permalink
Cleanup.
Browse files Browse the repository at this point in the history
  • Loading branch information
aldenml committed Dec 2, 2015
1 parent 17ebbd9 commit d679b32
Show file tree
Hide file tree
Showing 5 changed files with 215 additions and 445 deletions.
53 changes: 0 additions & 53 deletions src/main/java/com/frostwire/jlibtorrent/swig/bitfield.java
Original file line number Diff line number Diff line change
Expand Up @@ -103,59 +103,6 @@ public int count() {
return libtorrent_jni.bitfield_count(swigCPtr, this);
}

static public class const_iterator {
private transient long swigCPtr;
protected transient boolean swigCMemOwn;

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

protected static long getCPtr(const_iterator 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_bitfield_const_iterator(swigCPtr);
}
swigCPtr = 0;
}
}

public boolean __ref__() {
return libtorrent_jni.bitfield_const_iterator___ref__(swigCPtr, this);
}

public const_iterator() {
this(libtorrent_jni.new_bitfield_const_iterator(), true);
}

public boolean op_eq(bitfield.const_iterator rhs) {
return libtorrent_jni.bitfield_const_iterator_op_eq(swigCPtr, this, bitfield.const_iterator.getCPtr(rhs), rhs);
}

public boolean op_neq(bitfield.const_iterator rhs) {
return libtorrent_jni.bitfield_const_iterator_op_neq(swigCPtr, this, bitfield.const_iterator.getCPtr(rhs), rhs);
}

}

public bitfield.const_iterator begin() {
return new bitfield.const_iterator(libtorrent_jni.bitfield_begin(swigCPtr, this), true);
}

public bitfield.const_iterator end() {
return new bitfield.const_iterator(libtorrent_jni.bitfield_end(swigCPtr, this), true);
}

public void resize(int bits, boolean val) {
libtorrent_jni.bitfield_resize__SWIG_0(swigCPtr, this, bits, val);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -640,13 +640,6 @@ public class libtorrent_jni {
public final static native boolean bitfield_empty(long jarg1, bitfield jarg1_);
public final static native String bitfield_data(long jarg1, bitfield jarg1_);
public final static native int bitfield_count(long jarg1, bitfield jarg1_);
public final static native boolean bitfield_const_iterator___ref__(long jarg1, bitfield.const_iterator jarg1_);
public final static native long new_bitfield_const_iterator();
public final static native boolean bitfield_const_iterator_op_eq(long jarg1, bitfield.const_iterator jarg1_, long jarg2, bitfield.const_iterator jarg2_);
public final static native boolean bitfield_const_iterator_op_neq(long jarg1, bitfield.const_iterator jarg1_, long jarg2, bitfield.const_iterator jarg2_);
public final static native void delete_bitfield_const_iterator(long jarg1);
public final static native long bitfield_begin(long jarg1, bitfield jarg1_);
public final static native long bitfield_end(long jarg1, bitfield jarg1_);
public final static native void bitfield_resize__SWIG_0(long jarg1, bitfield jarg1_, int jarg2, boolean jarg3);
public final static native void bitfield_resize__SWIG_1(long jarg1, bitfield jarg1_, int jarg2);
public final static native void bitfield_set_all(long jarg1, bitfield jarg1_);
Expand Down
4 changes: 4 additions & 0 deletions swig/libtorrent.i
Original file line number Diff line number Diff line change
Expand Up @@ -639,6 +639,9 @@ namespace std {
%ignore libtorrent::stat_file;
%ignore libtorrent::fileop;
%ignore libtorrent::readwritev;
%ignore libtorrent::bitfield::const_iterator;
%ignore libtorrent::bitfield::begin;
%ignore libtorrent::bitfield::end;

%ignore boost::throws;
%ignore boost::detail::throws;
Expand Down Expand Up @@ -680,6 +683,7 @@ namespace std {
%rename(op_gt) operator>;
%rename(op_get_at) operator[];

%rename(libtorrent_no_error) libtorrent::errors::no_error;
%rename(libtorrent_no_error) libtorrent::errors::no_error;
%rename(libtorrent_errors) libtorrent::errors::error_code_enum;
%rename(bdecode_no_error) libtorrent::bdecode_errors::no_error;
Expand Down
113 changes: 1 addition & 112 deletions swig/libtorrent_jni.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13482,117 +13482,6 @@ SWIGEXPORT jint JNICALL Java_com_frostwire_jlibtorrent_swig_libtorrent_1jni_bitf
}


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

(void)jenv;
(void)jcls;
(void)jarg1_;
arg1 = *(libtorrent::bitfield::const_iterator **)&jarg1;
result = (bool)(arg1)->operator *();
jresult = (jboolean)result;
return jresult;
}


SWIGEXPORT jlong JNICALL Java_com_frostwire_jlibtorrent_swig_libtorrent_1jni_new_1bitfield_1const_1iterator(JNIEnv *jenv, jclass jcls) {
jlong jresult = 0 ;
libtorrent::bitfield::const_iterator *result = 0 ;

(void)jenv;
(void)jcls;
result = (libtorrent::bitfield::const_iterator *)new libtorrent::bitfield::const_iterator();
*(libtorrent::bitfield::const_iterator **)&jresult = result;
return jresult;
}


SWIGEXPORT jboolean JNICALL Java_com_frostwire_jlibtorrent_swig_libtorrent_1jni_bitfield_1const_1iterator_1op_1eq(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) {
jboolean jresult = 0 ;
libtorrent::bitfield::const_iterator *arg1 = (libtorrent::bitfield::const_iterator *) 0 ;
libtorrent::bitfield::const_iterator *arg2 = 0 ;
bool result;

(void)jenv;
(void)jcls;
(void)jarg1_;
(void)jarg2_;
arg1 = *(libtorrent::bitfield::const_iterator **)&jarg1;
arg2 = *(libtorrent::bitfield::const_iterator **)&jarg2;
if (!arg2) {
SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "libtorrent::bitfield::const_iterator const & reference is null");
return 0;
}
result = (bool)((libtorrent::bitfield::const_iterator const *)arg1)->operator ==((libtorrent::bitfield::const_iterator const &)*arg2);
jresult = (jboolean)result;
return jresult;
}


SWIGEXPORT jboolean JNICALL Java_com_frostwire_jlibtorrent_swig_libtorrent_1jni_bitfield_1const_1iterator_1op_1neq(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) {
jboolean jresult = 0 ;
libtorrent::bitfield::const_iterator *arg1 = (libtorrent::bitfield::const_iterator *) 0 ;
libtorrent::bitfield::const_iterator *arg2 = 0 ;
bool result;

(void)jenv;
(void)jcls;
(void)jarg1_;
(void)jarg2_;
arg1 = *(libtorrent::bitfield::const_iterator **)&jarg1;
arg2 = *(libtorrent::bitfield::const_iterator **)&jarg2;
if (!arg2) {
SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "libtorrent::bitfield::const_iterator const & reference is null");
return 0;
}
result = (bool)((libtorrent::bitfield::const_iterator const *)arg1)->operator !=((libtorrent::bitfield::const_iterator const &)*arg2);
jresult = (jboolean)result;
return jresult;
}


SWIGEXPORT void JNICALL Java_com_frostwire_jlibtorrent_swig_libtorrent_1jni_delete_1bitfield_1const_1iterator(JNIEnv *jenv, jclass jcls, jlong jarg1) {
libtorrent::bitfield::const_iterator *arg1 = (libtorrent::bitfield::const_iterator *) 0 ;

(void)jenv;
(void)jcls;
arg1 = *(libtorrent::bitfield::const_iterator **)&jarg1;
delete arg1;
}


SWIGEXPORT jlong JNICALL Java_com_frostwire_jlibtorrent_swig_libtorrent_1jni_bitfield_1begin(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
jlong jresult = 0 ;
libtorrent::bitfield *arg1 = (libtorrent::bitfield *) 0 ;
libtorrent::bitfield::const_iterator result;

(void)jenv;
(void)jcls;
(void)jarg1_;
arg1 = *(libtorrent::bitfield **)&jarg1;
result = ((libtorrent::bitfield const *)arg1)->begin();
*(libtorrent::bitfield::const_iterator **)&jresult = new libtorrent::bitfield::const_iterator((const libtorrent::bitfield::const_iterator &)result);
return jresult;
}


SWIGEXPORT jlong JNICALL Java_com_frostwire_jlibtorrent_swig_libtorrent_1jni_bitfield_1end(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
jlong jresult = 0 ;
libtorrent::bitfield *arg1 = (libtorrent::bitfield *) 0 ;
libtorrent::bitfield::const_iterator result;

(void)jenv;
(void)jcls;
(void)jarg1_;
arg1 = *(libtorrent::bitfield **)&jarg1;
result = ((libtorrent::bitfield const *)arg1)->end();
*(libtorrent::bitfield::const_iterator **)&jresult = new libtorrent::bitfield::const_iterator((const libtorrent::bitfield::const_iterator &)result);
return jresult;
}


SWIGEXPORT void JNICALL Java_com_frostwire_jlibtorrent_swig_libtorrent_1jni_bitfield_1resize_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2, jboolean jarg3) {
libtorrent::bitfield *arg1 = (libtorrent::bitfield *) 0 ;
int arg2 ;
Expand Down Expand Up @@ -53959,7 +53848,7 @@ SWIGEXPORT jstring JNICALL Java_com_frostwire_jlibtorrent_swig_libtorrent_1jni_J

(void)jenv;
(void)jcls;
result = (char *)("4a7ff33156fc33950fc621fa5530a4a26a17e3c9");
result = (char *)("17ebbd904c97c26069564ebc48dc533eee648bad");
if (result) jresult = jenv->NewStringUTF((const char *)result);
return jresult;
}
Expand Down

0 comments on commit d679b32

Please sign in to comment.