diff --git a/src/main/java/org/libtorrent4j/swig/file_storage.java b/src/main/java/org/libtorrent4j/swig/file_storage.java index 7a07c99..19642e1 100644 --- a/src/main/java/org/libtorrent4j/swig/file_storage.java +++ b/src/main/java/org/libtorrent4j/swig/file_storage.java @@ -258,6 +258,8 @@ public String file_name_ex(int index) { public final static long max_file_size = libtorrent_jni.file_storage_max_file_size_get(); public final static long max_file_offset = libtorrent_jni.file_storage_max_file_offset_get(); + public final static int max_num_pieces = libtorrent_jni.file_storage_max_num_pieces_get(); + public final static int max_piece_size = libtorrent_jni.file_storage_max_piece_size_get(); public final static file_flags_t flag_pad_file = new file_flags_t(libtorrent_jni.file_storage_flag_pad_file_get(), false); public final static file_flags_t flag_hidden = new file_flags_t(libtorrent_jni.file_storage_flag_hidden_get(), false); public final static file_flags_t flag_executable = new file_flags_t(libtorrent_jni.file_storage_flag_executable_get(), false); diff --git a/src/main/java/org/libtorrent4j/swig/libtorrent_jni.java b/src/main/java/org/libtorrent4j/swig/libtorrent_jni.java index 21f0284..6c3b4ef 100644 --- a/src/main/java/org/libtorrent4j/swig/libtorrent_jni.java +++ b/src/main/java/org/libtorrent4j/swig/libtorrent_jni.java @@ -970,6 +970,8 @@ public class libtorrent_jni { public final static native long new_file_storage__SWIG_1(long jarg1, file_storage jarg1_); public final static native long file_storage_max_file_size_get(); public final static native long file_storage_max_file_offset_get(); + public final static native int file_storage_max_num_pieces_get(); + public final static native int file_storage_max_piece_size_get(); public final static native boolean file_storage_is_valid(long jarg1, file_storage jarg1_); public final static native void file_storage_reserve(long jarg1, file_storage jarg1_, int jarg2); public final static native void file_storage_rename_file(long jarg1, file_storage jarg1_, int jarg2, String jarg3); diff --git a/swig/build-macos-arm64.sh b/swig/build-macos-arm64.sh index 83ebce4..ed8a2df 100755 --- a/swig/build-macos-arm64.sh +++ b/swig/build-macos-arm64.sh @@ -1,6 +1,6 @@ #!/bin/bash -export BOOST_ROOT=$DEVELOPMENT_ROOT/boost_1_80_0 +export BOOST_ROOT=$DEVELOPMENT_ROOT/boost_1_86_0 export LIBTORRENT_ROOT=$PWD/deps/libtorrent export OPENSSL_ROOT=$DEVELOPMENT_ROOT/openssl-macos diff --git a/swig/build-macos.sh b/swig/build-macos.sh index 3aabd68..0619a6d 100755 --- a/swig/build-macos.sh +++ b/swig/build-macos.sh @@ -1,6 +1,6 @@ #!/bin/bash -export BOOST_ROOT=$DEVELOPMENT_ROOT/boost_1_80_0 +export BOOST_ROOT=$DEVELOPMENT_ROOT/boost_1_86_0 export LIBTORRENT_ROOT=$PWD/deps/libtorrent export OPENSSL_ROOT=$DEVELOPMENT_ROOT/openssl-macos diff --git a/swig/deps/libtorrent b/swig/deps/libtorrent index 8e53eba..9fbe56a 160000 --- a/swig/deps/libtorrent +++ b/swig/deps/libtorrent @@ -1 +1 @@ -Subproject commit 8e53eba82fc74c40905fd6b05b6ed24ee6b6b2a1 +Subproject commit 9fbe56a81d75e3b8f0cfdd43b4fc05de48875767 diff --git a/swig/libtorrent_jni.cpp b/swig/libtorrent_jni.cpp index 28595fa..5baf4ba 100644 --- a/swig/libtorrent_jni.cpp +++ b/swig/libtorrent_jni.cpp @@ -29261,6 +29261,30 @@ SWIGEXPORT jlong JNICALL Java_org_libtorrent4j_swig_libtorrent_1jni_file_1storag } +SWIGEXPORT jint JNICALL Java_org_libtorrent4j_swig_libtorrent_1jni_file_1storage_1max_1num_1pieces_1get(JNIEnv *jenv, jclass jcls) { + jint jresult = 0 ; + int result; + + (void)jenv; + (void)jcls; + result = (int)libtorrent::file_storage::max_num_pieces; + jresult = (jint)result; + return jresult; +} + + +SWIGEXPORT jint JNICALL Java_org_libtorrent4j_swig_libtorrent_1jni_file_1storage_1max_1piece_1size_1get(JNIEnv *jenv, jclass jcls) { + jint jresult = 0 ; + int result; + + (void)jenv; + (void)jcls; + result = (int)libtorrent::file_storage::max_piece_size; + jresult = (jint)result; + return jresult; +} + + SWIGEXPORT jboolean JNICALL Java_org_libtorrent4j_swig_libtorrent_1jni_file_1storage_1is_1valid(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) { jboolean jresult = 0 ; libtorrent::file_storage *arg1 = (libtorrent::file_storage *) 0 ; diff --git a/swig/run-swig.sh b/swig/run-swig.sh index 0663632..7fed858 100755 --- a/swig/run-swig.sh +++ b/swig/run-swig.sh @@ -1,6 +1,6 @@ #!/bin/bash -BOOST_ROOT=$DEVELOPMENT_ROOT/boost_1_80_0 +BOOST_ROOT=$DEVELOPMENT_ROOT/boost_1_86_0 LIBTORRENT_ROOT=deps/libtorrent function fixCode() {