Added new jar and support for manga (tachiyomi)
This commit is contained in:
Binary file not shown.
@@ -6,8 +6,9 @@ void main() async {
|
||||
WidgetsFlutterBinding.ensureInitialized();
|
||||
|
||||
AniyomiBridge bridge = AniyomiBridge();
|
||||
bridge.loadExtension("https://kohiden.xyz/Kohi-den/extensions/raw/branch/main/apk/aniyomi-all.animeonsen-v14.7.apk");
|
||||
List<JSAnime> animes = bridge.getSearchResults("Shingeki", 1, "animeonsen");
|
||||
await Future.delayed(Duration(seconds: 2));
|
||||
bridge.loadAnimeExtension("https://kohiden.xyz/Kohi-den/extensions/raw/branch/main/apk/aniyomi-all.animeonsen-v14.7.apk");
|
||||
List<JSAnime> animes = bridge.getAnimeSearchResults("Shingeki", 1, "animeonsen");
|
||||
print(animes);
|
||||
animes.forEach((anime) => print(anime.getTitle().toDartString()));
|
||||
|
||||
|
||||
28
installJRE.sh
Normal file → Executable file
28
installJRE.sh
Normal file → Executable file
@@ -1,10 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Usage: ./setup_jre.sh <platform>
|
||||
# Example: ./setup_jre.sh macos
|
||||
|
||||
set -e
|
||||
|
||||
PLATFORM=$1
|
||||
|
||||
if [ -z "$PLATFORM" ]; then
|
||||
@@ -13,16 +9,15 @@ if [ -z "$PLATFORM" ]; then
|
||||
fi
|
||||
|
||||
PROJECT_DIR=$(pwd)
|
||||
JRE_SRC="$PROJECT_DIR/jre/$PLATFORM/customjre"
|
||||
|
||||
if [ ! -d "$JRE_SRC" ]; then
|
||||
echo "Error: JRE source folder not found: $JRE_SRC"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
case "$PLATFORM" in
|
||||
macos)
|
||||
# Locate Flutter macOS build output
|
||||
JRE_SRC="/Users/kevin/IdeaProjects/k3vinb5_aniyomi_bridge/jre/$PLATFORM/customjre"
|
||||
if [ ! -d "$JRE_SRC" ]; then
|
||||
echo "Error: JRE source folder not found: $JRE_SRC"
|
||||
exit 1
|
||||
fi
|
||||
APP_BUNDLE="$PROJECT_DIR/build/macos/Build/Products/Debug/Runner.app"
|
||||
RESOURCES_DIR="$APP_BUNDLE/Contents/Resources"
|
||||
mkdir -p "$RESOURCES_DIR/jre"
|
||||
@@ -32,20 +27,17 @@ case "$PLATFORM" in
|
||||
|
||||
linux)
|
||||
# Linux Flutter executable folder
|
||||
JRE_SRC="/home/kevin/Projects/k3vinb5_aniyomi_bridge/jre/$PLATFORM/customjre"
|
||||
if [ ! -d "$JRE_SRC" ]; then
|
||||
echo "Error: JRE source folder not found: $JRE_SRC"
|
||||
exit 1
|
||||
fi
|
||||
BUILD_DIR="$PROJECT_DIR/build/linux/x64/debug/bundle"
|
||||
mkdir -p "$BUILD_DIR/jre"
|
||||
cp -R "$JRE_SRC" "$BUILD_DIR/jre/"
|
||||
echo "Copied custom JRE to $BUILD_DIR/jre/"
|
||||
;;
|
||||
|
||||
windows)
|
||||
# Windows Flutter executable folder
|
||||
BUILD_DIR="$PROJECT_DIR/build/windows/runner/Debug"
|
||||
mkdir -p "$BUILD_DIR/jre"
|
||||
cp -R "$JRE_SRC" "$BUILD_DIR/jre/"
|
||||
echo "Copied custom JRE to $BUILD_DIR/jre/"
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Unsupported platform: $PLATFORM"
|
||||
exit 1
|
||||
|
||||
9
jnigen/page.yaml
Normal file
9
jnigen/page.yaml
Normal file
@@ -0,0 +1,9 @@
|
||||
output:
|
||||
dart:
|
||||
path: ../lib/jmodels/jpage.dart
|
||||
structure: single_file
|
||||
|
||||
class_path:
|
||||
- '../assets/aniyomibridge-core.jar'
|
||||
classes:
|
||||
- 'eu.kanade.tachiyomi.source.model.Page'
|
||||
9
jnigen/schapter.yaml
Normal file
9
jnigen/schapter.yaml
Normal file
@@ -0,0 +1,9 @@
|
||||
output:
|
||||
dart:
|
||||
path: ../lib/jmodels/jschapter.dart
|
||||
structure: single_file
|
||||
|
||||
class_path:
|
||||
- '../assets/aniyomibridge-core.jar'
|
||||
classes:
|
||||
- 'eu.kanade.tachiyomi.source.model.SChapter'
|
||||
9
jnigen/smanga.yaml
Normal file
9
jnigen/smanga.yaml
Normal file
@@ -0,0 +1,9 @@
|
||||
output:
|
||||
dart:
|
||||
path: ../lib/jmodels/jsmanga.dart
|
||||
structure: single_file
|
||||
|
||||
class_path:
|
||||
- '../assets/aniyomibridge-core.jar'
|
||||
classes:
|
||||
- 'eu.kanade.tachiyomi.source.model.SManga'
|
||||
@@ -1,19 +1,25 @@
|
||||
import 'dart:io';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:k3vinb5_aniyomi_bridge/jmodels/jvideo.dart';
|
||||
import 'package:jni/jni.dart';
|
||||
import 'package:path_provider/path_provider.dart';
|
||||
import 'package:path/path.dart' as path;
|
||||
import 'package:jni/jni.dart';
|
||||
import 'package:k3vinb5_aniyomi_bridge/jmodels/jvideo.dart';
|
||||
import 'package:k3vinb5_aniyomi_bridge/jmodels/janiyomibridge.dart';
|
||||
import 'package:k3vinb5_aniyomi_bridge/jmodels/jsanime.dart';
|
||||
import 'package:k3vinb5_aniyomi_bridge/jmodels/jsepisode.dart';
|
||||
import 'package:k3vinb5_aniyomi_bridge/jmodels/jsmanga.dart';
|
||||
import 'package:k3vinb5_aniyomi_bridge/jmodels/jschapter.dart';
|
||||
import 'package:k3vinb5_aniyomi_bridge/jmodels/jpage.dart';
|
||||
|
||||
class AniyomiBridge {
|
||||
|
||||
static final _aniyomiBridgeDir = "aniyomibridge";
|
||||
static late final String _applicationSupportDirectory;
|
||||
static final _packageAssetsDir = "packages/k3vinb5_aniyomi_bridge/assets";
|
||||
static const String _aniyomiBridgeDir = "aniyomibridge";
|
||||
static const String _aniyomiBridgeAnimeExtensionsDir = "animeExtensions";
|
||||
static const String _aniyomiBridgeMangaExtensionsDir = "mangaExtensions";
|
||||
static const String _aniyomiBridgeJarName ="aniyomibridge-core.jar";
|
||||
static const String _packageAssetsDir = "packages/k3vinb5_aniyomi_bridge/assets";
|
||||
static late final JAniyomiBridge _jAniyomiBridge;
|
||||
static late final String _supportDirectoryPath;
|
||||
|
||||
AniyomiBridge() {
|
||||
_initJvm();
|
||||
@@ -21,6 +27,7 @@ class AniyomiBridge {
|
||||
|
||||
Future<void> _initJvm() async {
|
||||
Directory supportDirectory = await getApplicationSupportDirectory();
|
||||
_supportDirectoryPath = supportDirectory.path;
|
||||
await _loadJarIfNeeded(supportDirectory);
|
||||
Jni.spawn(
|
||||
dylibDir: _getDylibDir(supportDirectory),
|
||||
@@ -28,17 +35,24 @@ class AniyomiBridge {
|
||||
);
|
||||
JAniyomiBridge.init();
|
||||
_jAniyomiBridge = JAniyomiBridge();
|
||||
_applicationSupportDirectory = supportDirectory.path;
|
||||
}
|
||||
|
||||
List<JSAnime> getSearchResults(String query, int page, String source) {
|
||||
JList<JObject?>? searchResults = _jAniyomiBridge.getSearchResults(JString.fromString(query), page, JString.fromString(source));
|
||||
List<JSAnime> getAnimeSearchResults(String query, int page, String source) {
|
||||
JList<JObject?>? searchResults = _jAniyomiBridge.getAnimeSearchResults(JString.fromString(query), page, JString.fromString(source));
|
||||
if (searchResults == null) {
|
||||
return [];
|
||||
}
|
||||
return searchResults.cast<JObject?>().where(_jObjIsNotNull).map((jObj) => jObj!.as<JSAnime>(JSAnime.type)).toList();
|
||||
}
|
||||
|
||||
List<JSManga> getMangaSearchResults(String query, int page, String source) {
|
||||
JList<JObject?>? searchResults = _jAniyomiBridge.getMangaSearchResults(JString.fromString(query), page, JString.fromString(source));
|
||||
if (searchResults == null) {
|
||||
return [];
|
||||
}
|
||||
return searchResults.cast<JObject?>().where(_jObjIsNotNull).map((jObj) => jObj!.as<JSManga>(JSManga.type)).toList();
|
||||
}
|
||||
|
||||
List<JSEpisode> getEpisodeList(JSAnime sAnime, String source) {
|
||||
JList<JObject?>? episodeList = _jAniyomiBridge.getEpisodeList(sAnime, JString.fromString(source));
|
||||
if (episodeList == null) {
|
||||
@@ -47,6 +61,14 @@ class AniyomiBridge {
|
||||
return episodeList.cast<JObject?>().where(_jObjIsNotNull).map((jObj) => jObj!.as<JSEpisode>(JSEpisode.type)).toList();
|
||||
}
|
||||
|
||||
List<JSChapter> getChapterList(JSManga sManga, String source) {
|
||||
JList<JObject?>? episodeList = _jAniyomiBridge.getEpisodeList(sManga, JString.fromString(source));
|
||||
if (episodeList == null) {
|
||||
return [];
|
||||
}
|
||||
return episodeList.cast<JObject?>().where(_jObjIsNotNull).map((jObj) => jObj!.as<JSChapter>(JSChapter.type)).toList();
|
||||
}
|
||||
|
||||
List<JVideo> getVideoList(JSEpisode sEpisode, String source) {
|
||||
JList<JObject?>? videoList = _jAniyomiBridge.getVideoList(sEpisode, JString.fromString(source));
|
||||
if (videoList == null) {
|
||||
@@ -55,12 +77,32 @@ class AniyomiBridge {
|
||||
return videoList.cast<JObject?>().where(_jObjIsNotNull).map((jObj) => jObj!.as<JVideo>(JVideo.type)).toList();
|
||||
}
|
||||
|
||||
void loadExtension(String extensionUrl) {
|
||||
_jAniyomiBridge.loadExtension(JString.fromString(extensionUrl));
|
||||
List<JPage> getPageList(JSChapter sChapter, String source) {
|
||||
JList<JObject?>? videoList = _jAniyomiBridge.getVideoList(sChapter, JString.fromString(source));
|
||||
if (videoList == null) {
|
||||
return [];
|
||||
}
|
||||
return videoList.cast<JObject?>().where(_jObjIsNotNull).map((jObj) => jObj!.as<JPage>(JPage.type)).toList();
|
||||
}
|
||||
|
||||
List<String>? getLoadedExtensions() {
|
||||
JList<JString?>? loadedExtensions = _jAniyomiBridge.getLoadedExtensions();
|
||||
void loadAnimeExtension(String extensionUrl) {
|
||||
_jAniyomiBridge.loadAnimeExtension(JString.fromString(extensionUrl), JString.fromString(path.join(_supportDirectoryPath, _aniyomiBridgeAnimeExtensionsDir)));
|
||||
}
|
||||
|
||||
void loadMangaExtension(String extensionUrl) {
|
||||
_jAniyomiBridge.loadMangaExtension(JString.fromString(extensionUrl), JString.fromString(path.join(_supportDirectoryPath, _aniyomiBridgeMangaExtensionsDir)));
|
||||
}
|
||||
|
||||
List<String>? getLoadedAnimeExtensions() {
|
||||
JList<JString?>? loadedExtensions = _jAniyomiBridge.getAnimeLoadedExtensions();
|
||||
if (loadedExtensions == null) {
|
||||
return null;
|
||||
}
|
||||
return loadedExtensions.cast<JString>().map((jStr) => jStr.toDartString()).toList();
|
||||
}
|
||||
|
||||
List<String>? getLoadedMangaExtensions() {
|
||||
JList<JString?>? loadedExtensions = _jAniyomiBridge.getMangaLoadedExtensions();
|
||||
if (loadedExtensions == null) {
|
||||
return null;
|
||||
}
|
||||
@@ -83,15 +125,14 @@ class AniyomiBridge {
|
||||
}
|
||||
|
||||
List<String> _getClassPath(Directory supportDirectory) {
|
||||
return [path.join(supportDirectory.absolute.path, _aniyomiBridgeDir, "aniyomibridge-core.jar")];
|
||||
return [path.join(supportDirectory.absolute.path, _aniyomiBridgeDir, _aniyomiBridgeJarName)];
|
||||
}
|
||||
|
||||
Future<void> _loadJarIfNeeded(Directory supportDirectory) async {
|
||||
String aniyomiBridgeCorePath = path.join(supportDirectory.path, _aniyomiBridgeDir, "aniyomibridge-core.jar");
|
||||
String aniyomiBridgeCorePath = path.join(supportDirectory.path, _aniyomiBridgeDir, _aniyomiBridgeJarName);
|
||||
File aniyomiBridgeCore = File(aniyomiBridgeCorePath);
|
||||
if (!(await aniyomiBridgeCore.exists())) {
|
||||
print("Copying aniyomibridge-core.jar to $aniyomiBridgeCorePath");
|
||||
_copyAssetToFile("$_packageAssetsDir/aniyomibridge-core.jar", aniyomiBridgeCorePath);
|
||||
_copyAssetToFile("$_packageAssetsDir/$_aniyomiBridgeJarName", aniyomiBridgeCorePath);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -113,45 +113,12 @@ class JAniyomiBridge extends jni$_.JObject {
|
||||
_init(_class.reference.pointer, _id_init as jni$_.JMethodIDPtr).check();
|
||||
}
|
||||
|
||||
static final _id_loadExtension = _class.instanceMethodId(
|
||||
r'loadExtension',
|
||||
r'(Ljava/lang/String;)V',
|
||||
);
|
||||
|
||||
static final _loadExtension =
|
||||
jni$_.ProtectedJniExtensions.lookup<
|
||||
jni$_.NativeFunction<
|
||||
jni$_.JThrowablePtr Function(
|
||||
jni$_.Pointer<jni$_.Void>,
|
||||
jni$_.JMethodIDPtr,
|
||||
jni$_.VarArgs<(jni$_.Pointer<jni$_.Void>,)>,
|
||||
)
|
||||
>
|
||||
>('globalEnv_CallVoidMethod')
|
||||
.asFunction<
|
||||
jni$_.JThrowablePtr Function(
|
||||
jni$_.Pointer<jni$_.Void>,
|
||||
jni$_.JMethodIDPtr,
|
||||
jni$_.Pointer<jni$_.Void>,
|
||||
)
|
||||
>();
|
||||
|
||||
/// from: `public void loadExtension(java.lang.String string)`
|
||||
void loadExtension(jni$_.JString? string) {
|
||||
final _$string = string?.reference ?? jni$_.jNullReference;
|
||||
_loadExtension(
|
||||
reference.pointer,
|
||||
_id_loadExtension as jni$_.JMethodIDPtr,
|
||||
_$string.pointer,
|
||||
).check();
|
||||
}
|
||||
|
||||
static final _id_loadExtensionFile = _class.instanceMethodId(
|
||||
r'loadExtensionFile',
|
||||
static final _id_loadAnimeExtension = _class.instanceMethodId(
|
||||
r'loadAnimeExtension',
|
||||
r'(Ljava/lang/String;Ljava/lang/String;)V',
|
||||
);
|
||||
|
||||
static final _loadExtensionFile =
|
||||
static final _loadAnimeExtension =
|
||||
jni$_.ProtectedJniExtensions.lookup<
|
||||
jni$_.NativeFunction<
|
||||
jni$_.JThrowablePtr Function(
|
||||
@@ -172,24 +139,62 @@ class JAniyomiBridge extends jni$_.JObject {
|
||||
)
|
||||
>();
|
||||
|
||||
/// from: `public void loadExtensionFile(java.lang.String string, java.lang.String string1)`
|
||||
void loadExtensionFile(jni$_.JString? string, jni$_.JString? string1) {
|
||||
/// from: `public void loadAnimeExtension(java.lang.String string, java.lang.String string1)`
|
||||
void loadAnimeExtension(jni$_.JString? string, jni$_.JString? string1) {
|
||||
final _$string = string?.reference ?? jni$_.jNullReference;
|
||||
final _$string1 = string1?.reference ?? jni$_.jNullReference;
|
||||
_loadExtensionFile(
|
||||
_loadAnimeExtension(
|
||||
reference.pointer,
|
||||
_id_loadExtensionFile as jni$_.JMethodIDPtr,
|
||||
_id_loadAnimeExtension as jni$_.JMethodIDPtr,
|
||||
_$string.pointer,
|
||||
_$string1.pointer,
|
||||
).check();
|
||||
}
|
||||
|
||||
static final _id_getLoadedExtensions = _class.instanceMethodId(
|
||||
r'getLoadedExtensions',
|
||||
static final _id_loadMangaExtension = _class.instanceMethodId(
|
||||
r'loadMangaExtension',
|
||||
r'(Ljava/lang/String;Ljava/lang/String;)V',
|
||||
);
|
||||
|
||||
static final _loadMangaExtension =
|
||||
jni$_.ProtectedJniExtensions.lookup<
|
||||
jni$_.NativeFunction<
|
||||
jni$_.JThrowablePtr Function(
|
||||
jni$_.Pointer<jni$_.Void>,
|
||||
jni$_.JMethodIDPtr,
|
||||
jni$_.VarArgs<
|
||||
(jni$_.Pointer<jni$_.Void>, jni$_.Pointer<jni$_.Void>)
|
||||
>,
|
||||
)
|
||||
>
|
||||
>('globalEnv_CallVoidMethod')
|
||||
.asFunction<
|
||||
jni$_.JThrowablePtr Function(
|
||||
jni$_.Pointer<jni$_.Void>,
|
||||
jni$_.JMethodIDPtr,
|
||||
jni$_.Pointer<jni$_.Void>,
|
||||
jni$_.Pointer<jni$_.Void>,
|
||||
)
|
||||
>();
|
||||
|
||||
/// from: `public void loadMangaExtension(java.lang.String string, java.lang.String string1)`
|
||||
void loadMangaExtension(jni$_.JString? string, jni$_.JString? string1) {
|
||||
final _$string = string?.reference ?? jni$_.jNullReference;
|
||||
final _$string1 = string1?.reference ?? jni$_.jNullReference;
|
||||
_loadMangaExtension(
|
||||
reference.pointer,
|
||||
_id_loadMangaExtension as jni$_.JMethodIDPtr,
|
||||
_$string.pointer,
|
||||
_$string1.pointer,
|
||||
).check();
|
||||
}
|
||||
|
||||
static final _id_getAnimeLoadedExtensions = _class.instanceMethodId(
|
||||
r'getAnimeLoadedExtensions',
|
||||
r'()Ljava/util/List;',
|
||||
);
|
||||
|
||||
static final _getLoadedExtensions =
|
||||
static final _getAnimeLoadedExtensions =
|
||||
jni$_.ProtectedJniExtensions.lookup<
|
||||
jni$_.NativeFunction<
|
||||
jni$_.JniResult Function(
|
||||
@@ -205,12 +210,12 @@ class JAniyomiBridge extends jni$_.JObject {
|
||||
)
|
||||
>();
|
||||
|
||||
/// from: `public java.util.List<java.lang.String> getLoadedExtensions()`
|
||||
/// from: `public java.util.List<java.lang.String> getAnimeLoadedExtensions()`
|
||||
/// The returned object must be released after use, by calling the [release] method.
|
||||
jni$_.JList<jni$_.JString?>? getLoadedExtensions() {
|
||||
return _getLoadedExtensions(
|
||||
jni$_.JList<jni$_.JString?>? getAnimeLoadedExtensions() {
|
||||
return _getAnimeLoadedExtensions(
|
||||
reference.pointer,
|
||||
_id_getLoadedExtensions as jni$_.JMethodIDPtr,
|
||||
_id_getAnimeLoadedExtensions as jni$_.JMethodIDPtr,
|
||||
).object<jni$_.JList<jni$_.JString?>?>(
|
||||
const jni$_.JListNullableType<jni$_.JString?>(
|
||||
jni$_.JStringNullableType(),
|
||||
@@ -218,12 +223,46 @@ class JAniyomiBridge extends jni$_.JObject {
|
||||
);
|
||||
}
|
||||
|
||||
static final _id_getSearchResults = _class.instanceMethodId(
|
||||
r'getSearchResults',
|
||||
static final _id_getMangaLoadedExtensions = _class.instanceMethodId(
|
||||
r'getMangaLoadedExtensions',
|
||||
r'()Ljava/util/List;',
|
||||
);
|
||||
|
||||
static final _getMangaLoadedExtensions =
|
||||
jni$_.ProtectedJniExtensions.lookup<
|
||||
jni$_.NativeFunction<
|
||||
jni$_.JniResult Function(
|
||||
jni$_.Pointer<jni$_.Void>,
|
||||
jni$_.JMethodIDPtr,
|
||||
)
|
||||
>
|
||||
>('globalEnv_CallObjectMethod')
|
||||
.asFunction<
|
||||
jni$_.JniResult Function(
|
||||
jni$_.Pointer<jni$_.Void>,
|
||||
jni$_.JMethodIDPtr,
|
||||
)
|
||||
>();
|
||||
|
||||
/// from: `public java.util.List<java.lang.String> getMangaLoadedExtensions()`
|
||||
/// The returned object must be released after use, by calling the [release] method.
|
||||
jni$_.JList<jni$_.JString?>? getMangaLoadedExtensions() {
|
||||
return _getMangaLoadedExtensions(
|
||||
reference.pointer,
|
||||
_id_getMangaLoadedExtensions as jni$_.JMethodIDPtr,
|
||||
).object<jni$_.JList<jni$_.JString?>?>(
|
||||
const jni$_.JListNullableType<jni$_.JString?>(
|
||||
jni$_.JStringNullableType(),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
static final _id_getAnimeSearchResults = _class.instanceMethodId(
|
||||
r'getAnimeSearchResults',
|
||||
r'(Ljava/lang/String;ILjava/lang/String;)Ljava/util/List;',
|
||||
);
|
||||
|
||||
static final _getSearchResults =
|
||||
static final _getAnimeSearchResults =
|
||||
jni$_.ProtectedJniExtensions.lookup<
|
||||
jni$_.NativeFunction<
|
||||
jni$_.JniResult Function(
|
||||
@@ -249,18 +288,71 @@ class JAniyomiBridge extends jni$_.JObject {
|
||||
)
|
||||
>();
|
||||
|
||||
/// from: `public java.util.List<eu.kanade.tachiyomi.animesource.model.SAnime> getSearchResults(java.lang.String string, int i, java.lang.String string1)`
|
||||
/// from: `public java.util.List<eu.kanade.tachiyomi.animesource.model.SAnime> getAnimeSearchResults(java.lang.String string, int i, java.lang.String string1)`
|
||||
/// The returned object must be released after use, by calling the [release] method.
|
||||
jni$_.JList<jni$_.JObject?>? getSearchResults(
|
||||
jni$_.JList<jni$_.JObject?>? getAnimeSearchResults(
|
||||
jni$_.JString? string,
|
||||
int i,
|
||||
jni$_.JString? string1,
|
||||
) {
|
||||
final _$string = string?.reference ?? jni$_.jNullReference;
|
||||
final _$string1 = string1?.reference ?? jni$_.jNullReference;
|
||||
return _getSearchResults(
|
||||
return _getAnimeSearchResults(
|
||||
reference.pointer,
|
||||
_id_getSearchResults as jni$_.JMethodIDPtr,
|
||||
_id_getAnimeSearchResults as jni$_.JMethodIDPtr,
|
||||
_$string.pointer,
|
||||
i,
|
||||
_$string1.pointer,
|
||||
).object<jni$_.JList<jni$_.JObject?>?>(
|
||||
const jni$_.JListNullableType<jni$_.JObject?>(
|
||||
jni$_.JObjectNullableType(),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
static final _id_getMangaSearchResults = _class.instanceMethodId(
|
||||
r'getMangaSearchResults',
|
||||
r'(Ljava/lang/String;ILjava/lang/String;)Ljava/util/List;',
|
||||
);
|
||||
|
||||
static final _getMangaSearchResults =
|
||||
jni$_.ProtectedJniExtensions.lookup<
|
||||
jni$_.NativeFunction<
|
||||
jni$_.JniResult Function(
|
||||
jni$_.Pointer<jni$_.Void>,
|
||||
jni$_.JMethodIDPtr,
|
||||
jni$_.VarArgs<
|
||||
(
|
||||
jni$_.Pointer<jni$_.Void>,
|
||||
jni$_.Int32,
|
||||
jni$_.Pointer<jni$_.Void>,
|
||||
)
|
||||
>,
|
||||
)
|
||||
>
|
||||
>('globalEnv_CallObjectMethod')
|
||||
.asFunction<
|
||||
jni$_.JniResult Function(
|
||||
jni$_.Pointer<jni$_.Void>,
|
||||
jni$_.JMethodIDPtr,
|
||||
jni$_.Pointer<jni$_.Void>,
|
||||
int,
|
||||
jni$_.Pointer<jni$_.Void>,
|
||||
)
|
||||
>();
|
||||
|
||||
/// from: `public java.util.List<eu.kanade.tachiyomi.source.model.SManga> getMangaSearchResults(java.lang.String string, int i, java.lang.String string1)`
|
||||
/// The returned object must be released after use, by calling the [release] method.
|
||||
jni$_.JList<jni$_.JObject?>? getMangaSearchResults(
|
||||
jni$_.JString? string,
|
||||
int i,
|
||||
jni$_.JString? string1,
|
||||
) {
|
||||
final _$string = string?.reference ?? jni$_.jNullReference;
|
||||
final _$string1 = string1?.reference ?? jni$_.jNullReference;
|
||||
return _getMangaSearchResults(
|
||||
reference.pointer,
|
||||
_id_getMangaSearchResults as jni$_.JMethodIDPtr,
|
||||
_$string.pointer,
|
||||
i,
|
||||
_$string1.pointer,
|
||||
@@ -317,6 +409,52 @@ class JAniyomiBridge extends jni$_.JObject {
|
||||
);
|
||||
}
|
||||
|
||||
static final _id_getChapterList = _class.instanceMethodId(
|
||||
r'getChapterList',
|
||||
r'(Leu/kanade/tachiyomi/source/model/SManga;Ljava/lang/String;)Ljava/util/List;',
|
||||
);
|
||||
|
||||
static final _getChapterList =
|
||||
jni$_.ProtectedJniExtensions.lookup<
|
||||
jni$_.NativeFunction<
|
||||
jni$_.JniResult Function(
|
||||
jni$_.Pointer<jni$_.Void>,
|
||||
jni$_.JMethodIDPtr,
|
||||
jni$_.VarArgs<
|
||||
(jni$_.Pointer<jni$_.Void>, jni$_.Pointer<jni$_.Void>)
|
||||
>,
|
||||
)
|
||||
>
|
||||
>('globalEnv_CallObjectMethod')
|
||||
.asFunction<
|
||||
jni$_.JniResult Function(
|
||||
jni$_.Pointer<jni$_.Void>,
|
||||
jni$_.JMethodIDPtr,
|
||||
jni$_.Pointer<jni$_.Void>,
|
||||
jni$_.Pointer<jni$_.Void>,
|
||||
)
|
||||
>();
|
||||
|
||||
/// from: `public java.util.List<eu.kanade.tachiyomi.source.model.SChapter> getChapterList(eu.kanade.tachiyomi.source.model.SManga sManga, java.lang.String string)`
|
||||
/// The returned object must be released after use, by calling the [release] method.
|
||||
jni$_.JList<jni$_.JObject?>? getChapterList(
|
||||
jni$_.JObject? sManga,
|
||||
jni$_.JString? string,
|
||||
) {
|
||||
final _$sManga = sManga?.reference ?? jni$_.jNullReference;
|
||||
final _$string = string?.reference ?? jni$_.jNullReference;
|
||||
return _getChapterList(
|
||||
reference.pointer,
|
||||
_id_getChapterList as jni$_.JMethodIDPtr,
|
||||
_$sManga.pointer,
|
||||
_$string.pointer,
|
||||
).object<jni$_.JList<jni$_.JObject?>?>(
|
||||
const jni$_.JListNullableType<jni$_.JObject?>(
|
||||
jni$_.JObjectNullableType(),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
static final _id_getVideoList = _class.instanceMethodId(
|
||||
r'getVideoList',
|
||||
r'(Leu/kanade/tachiyomi/animesource/model/SEpisode;Ljava/lang/String;)Ljava/util/List;',
|
||||
@@ -362,6 +500,52 @@ class JAniyomiBridge extends jni$_.JObject {
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
static final _id_getPageList = _class.instanceMethodId(
|
||||
r'getPageList',
|
||||
r'(Leu/kanade/tachiyomi/source/model/SChapter;Ljava/lang/String;)Ljava/util/List;',
|
||||
);
|
||||
|
||||
static final _getPageList =
|
||||
jni$_.ProtectedJniExtensions.lookup<
|
||||
jni$_.NativeFunction<
|
||||
jni$_.JniResult Function(
|
||||
jni$_.Pointer<jni$_.Void>,
|
||||
jni$_.JMethodIDPtr,
|
||||
jni$_.VarArgs<
|
||||
(jni$_.Pointer<jni$_.Void>, jni$_.Pointer<jni$_.Void>)
|
||||
>,
|
||||
)
|
||||
>
|
||||
>('globalEnv_CallObjectMethod')
|
||||
.asFunction<
|
||||
jni$_.JniResult Function(
|
||||
jni$_.Pointer<jni$_.Void>,
|
||||
jni$_.JMethodIDPtr,
|
||||
jni$_.Pointer<jni$_.Void>,
|
||||
jni$_.Pointer<jni$_.Void>,
|
||||
)
|
||||
>();
|
||||
|
||||
/// from: `public java.util.List<eu.kanade.tachiyomi.source.model.Page> getPageList(eu.kanade.tachiyomi.source.model.SChapter sChapter, java.lang.String string)`
|
||||
/// The returned object must be released after use, by calling the [release] method.
|
||||
jni$_.JList<jni$_.JObject?>? getPageList(
|
||||
jni$_.JObject? sChapter,
|
||||
jni$_.JString? string,
|
||||
) {
|
||||
final _$sChapter = sChapter?.reference ?? jni$_.jNullReference;
|
||||
final _$string = string?.reference ?? jni$_.jNullReference;
|
||||
return _getPageList(
|
||||
reference.pointer,
|
||||
_id_getPageList as jni$_.JMethodIDPtr,
|
||||
_$sChapter.pointer,
|
||||
_$string.pointer,
|
||||
).object<jni$_.JList<jni$_.JObject?>?>(
|
||||
const jni$_.JListNullableType<jni$_.JObject?>(
|
||||
jni$_.JObjectNullableType(),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
final class $AniyomiBridge$NullableType extends jni$_.JObjType<JAniyomiBridge?> {
|
||||
|
||||
1126
lib/jmodels/jpage.dart
Normal file
1126
lib/jmodels/jpage.dart
Normal file
File diff suppressed because it is too large
Load Diff
1004
lib/jmodels/jschapter.dart
Normal file
1004
lib/jmodels/jschapter.dart
Normal file
File diff suppressed because it is too large
Load Diff
1618
lib/jmodels/jsmanga.dart
Normal file
1618
lib/jmodels/jsmanga.dart
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user