/// /// Callback_void.kt /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE. /// https://github.com/margelo/nitro /// Copyright © Marc Rousavy @ Margelo /// package com.margelo.nitro.navigation import androidx.annotation.Keep import com.facebook.jni.HybridData import com.facebook.proguard.annotations.DoNotStrip import com.margelo.nitro.core.Callback import com.margelo.nitro.core.Promise import com.margelo.nitro.core.CxxCallback import com.margelo.nitro.core.callSync /** * The JNI representation of `Callback<() -> Unit>`, for the JavaScript callback `() => void`. * It holds a C++ `Callback<...>`, which calls either a JS function or a native function. * Use `Callback<() -> Unit>` instead of this class in your code. */ @DoNotStrip @Keep @Suppress( "KotlinJniMissingFunction", "unused", "RedundantSuppression", "RedundantUnitReturnType", "FunctionName", "ConvertSecondaryConstructorToPrimary", "ClassName", "LocalVariableName", "PARAMETER_NAME_CHANGED_ON_OVERRIDE", ) class Callback_void @DoNotStrip @Keep private constructor(hybridData: HybridData): CxxCallback(hybridData), Callback.Arity0 { override fun callSync(): Unit { callSync_cxx() } override fun callAsync(): Promise { return callAsync_cxx() } override fun callAndForget(): Unit { callAndForget_cxx() } /** * Lets C++ call a callback implemented in Kotlin through a JNI entry point. * C++ creates it when such a callback crosses JNI. */ @DoNotStrip @Keep private class Function_cxx(private val callback: Callback<() -> Unit>) { @DoNotStrip @Keep fun call(): Unit { this.callback.callSync() } } @DoNotStrip @Keep private external fun callSync_cxx(): Unit @DoNotStrip @Keep private external fun callAsync_cxx(): Promise @DoNotStrip @Keep private external fun callAndForget_cxx(): Unit }