---
source: tests/backends_kotlin_jni_emitter_test.rs
expression: content
---
// Generated by alef. Do not edit by hand.
@file:Suppress(
    "ktlint:standard:max-line-length",
    "ktlint:standard:trailing-comma-on-declaration-site",
    "ktlint:standard:trailing-comma-on-call-site",
    "ktlint:standard:annotation",
    "MaxLineLength",
    "TooManyFunctions",
    "LongParameterList",
)

package dev.sample_crate

@Suppress("TooManyFunctions")
object DemoBridge {
    init { System.loadLibrary("demo_jni") }

    @Throws(DemoBridgeException::class)
    external fun nativeFoo(value: Int): String

    // JNI external funs for client instance methods.
    @Throws(DemoBridgeException::class)
    external fun nativeDefaultClientDoThing(handle: Long, requestJson: String): String
    external fun nativeFreeDefaultClient(handle: Long)

    // JNI streaming external funs — implementations are Rust JNI shims.

    // Streaming JNI externs for DefaultClient.streamData
    @Throws(DemoBridgeException::class)
    external fun nativeDefaultClientStreamDataStart(clientHandle: Long, requestJson: String): Long
    @Throws(DemoBridgeException::class)
    external fun nativeDefaultClientStreamDataNext(streamHandle: Long): String?
    external fun nativeDefaultClientStreamDataFree(streamHandle: Long)
}
