Package-level declarations

Types

Link copied to clipboard
interface BasicList<T>
Link copied to clipboard
interface Converter<T, N>
Link copied to clipboard
class JavaJniContinuation<T>(converter: Converter<Any?, T>, continuation: Continuation<T>)
Link copied to clipboard
Link copied to clipboard
class JniBuilder<T>
Link copied to clipboard
class JniConnection(scope: CoroutineScope, env: KsrpcEnvironment<JniSerialized>, nativeEnvironment: Long) : PacketChannelBase<JniSerialized>
Link copied to clipboard
interface JniContinuation<T>
Link copied to clipboard
object JNIControl
Link copied to clipboard
data class JniDecoder<T> : AbstractDecoder
Link copied to clipboard
data class JniEncoder<T> : AbstractEncoder
Link copied to clipboard
open class JniSer(val encoder: JniEncoder<*>, val decoder: JniDecoder<*>)
Link copied to clipboard
Link copied to clipboard
data class JniSerialized(val list: BasicList<*>)
Link copied to clipboard
interface JniTypeConverter<T>
Link copied to clipboard
interface MutableBasicList<T> : BasicList<T>
Link copied to clipboard
class NativeConnection(scope: CoroutineScope, objectRef: jobject, env: KsrpcEnvironment<JniSerialized>) : PacketChannelBase<JniSerialized>
Link copied to clipboard
class NativeJniContinuation<T>(val nativeObject: Long) : JniContinuation<T>
class NativeJniContinuation<T>(continuation: Continuation<T>, typeConverter: Converter<jobject?, T>)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

A simple library class which helps with loading dynamic libraries stored in the JAR archive. These libraries usually contain implementation of some methods in native code (using JNI - Java Native Interface).

Properties

Link copied to clipboard
val CoroutineScope.asNativeScope: Long

Maps the lifecycle of a scope into a matching native scope.

Functions

Link copied to clipboard
Link copied to clipboard
expect fun <V> JniSer.converterOf(serializer: KSerializer<V>): Converter<*, V>
actual fun <V> JniSer.converterOf(serializer: KSerializer<V>): Converter<*, V>
actual fun <V> JniSer.converterOf(serializer: KSerializer<V>): Converter<*, V>
Link copied to clipboard
inline fun <T> JniSer.decodeFromJni(jniSerialized: JniSerialized): T
Link copied to clipboard
inline fun <T> JniSer.encodeToJni(value: T): JniSerialized
Link copied to clipboard
fun finalize(env: CPointer<JNIEnvVar>, clazz: jobject, nativeObject: jlong)
Link copied to clipboard
fun JniSerialized.Companion.fromJvm(jniEnv: CPointer<JNIEnvVar>, serialized: jobject): JniSerialized
Link copied to clipboard
fun jniConnectionClose(env: CPointer<JNIEnvVar>, clazz: jobject, nativeObject: jlong, continuation: jobject)
Link copied to clipboard
fun jniConnectionFinalize(env: CPointer<JNIEnvVar>, clazz: jobject, nativeObject: jlong, nativeEnvironment: jlong)
Link copied to clipboard
fun jniConnectionSendSerialized(env: CPointer<JNIEnvVar>, clazz: jobject, nativeObject: jlong, packet: jobject, continuation: jobject)
Link copied to clipboard
fun jniCreateConnection(env: CPointer<JNIEnvVar>, clazz: jobject, scope: jlong, ksrpcEnv: jlong): jlong
Link copied to clipboard
expect fun <T> newList(): MutableBasicList<T>
actual fun <T> newList(): MutableBasicList<T>
actual fun <T> newList(): MutableBasicList<T>
Link copied to clipboard
Link copied to clipboard
fun resumeFailure(env: CPointer<JNIEnvVar>, clazz: jobject, nativeObject: jlong, input: jobject)
Link copied to clipboard
fun resumeSuccess(env: CPointer<JNIEnvVar>, clazz: jobject, nativeObject: jlong, input: jobject)
Link copied to clipboard
inline fun <T> JniContinuation<T>.resumeWith(result: Result<T>, jniSer: JniSer = JniSer)
Link copied to clipboard
fun JniSerialized.toJvm(jniEnv: CPointer<JNIEnvVar>): jobject
Link copied to clipboard
fun toList(serialized: JniSerialized): List<Any?>
Link copied to clipboard
Link copied to clipboard