Revert "Introduce KTLS based http downoader API stub"

This reverts commit a256864c84.
This commit is contained in:
tarsin committed 2023-06-03 22:16:51 +08:00
1 parent a256864c84
commit a015e54569
3 files changed
+1 -17

No files matched your search

+1 -1
View File
@@ -63,5 +63,5 @@ FetchContent_MakeAvailable(libarchive)
include_directories(${libarchive_SOURCE_DIR}/libarchive)
# Build and link our app's native lib
add_library(${PROJECT_NAME} SHARED archive.c gifutils.c http_downloader.c natsort/strnatcmp.c)
add_library(${PROJECT_NAME} SHARED archive.c gifutils.c natsort/strnatcmp.c)
target_link_libraries(${PROJECT_NAME} archive_static log)
-13
View File
@@ -1,13 +0,0 @@
#include <jni.h>
// This JNI function makes https call and save responseBody directly to filesystem to avoid copy on JVM heap
JNIEXPORT jlong JNICALL
Java_com_hippo_ehviewer_spider_SpiderDenKt_makeHttpsCallAndSaveToFd(JNIEnv *env, jclass clazz,jstring url, jboolean do_sni, jint fd) {
// TODO: implement makeHttpsCallAndSaveToFd()
}
// Is KTLS supported? if not, we maybe use [TLSChannel]https://github.com/marianobarrios/tls-channel and do DirectByteBuffer IO
JNIEXPORT jboolean JNICALL
Java_com_hippo_ehviewer_spider_SpiderDenKt_kernelSupportKTLS(JNIEnv *env, jclass clazz) {
// TODO: implement kernelSupportKTLS()
}
@@ -275,6 +275,3 @@ fun GalleryInfo.putToDownloadDir() {
val dirname = FileUtils.sanitizeFilename("$gid-$title")
EhDB.putDownloadDirname(gid, dirname)
}
private external fun makeHttpsCallAndSaveToFd(url: String, doSni: Boolean, fd: Int): Long
private external fun kernelSupportKTLS(): Boolean