/// /// HybridOneFetchSpec.kt /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE. /// https://github.com/mrousavy/nitro /// Copyright © Marc Rousavy @ Margelo /// package com.margelo.nitro.one import androidx.annotation.Keep import com.facebook.jni.HybridData import com.facebook.proguard.annotations.DoNotStrip import dalvik.annotation.optimization.FastNative import com.margelo.nitro.core.ArrayBuffer import com.margelo.nitro.core.HybridObject /** * A Kotlin class representing the OneFetch HybridObject. * Implement this abstract class to create Kotlin-based instances of OneFetch. */ @DoNotStrip @Keep @Suppress( "KotlinJniMissingFunction", "unused", "RedundantSuppression", "RedundantUnitReturnType", "SimpleRedundantLet", "LocalVariableName", "PropertyName", "PrivatePropertyName", "FunctionName" ) abstract class HybridOneFetchSpec: HybridObject() { // Properties // Methods abstract fun start(id: Double, request: FetchNativeRequest, onResponse: (response: FetchNativeResponse) -> Unit, onChunk: (chunk: ArrayBuffer) -> Unit, onComplete: () -> Unit, onError: (message: String) -> Unit): Unit @DoNotStrip @Keep private fun start_cxx(id: Double, request: FetchNativeRequest, onResponse: Func_void_FetchNativeResponse, onChunk: Func_void_std__shared_ptr_ArrayBuffer_, onComplete: Func_void, onError: Func_void_std__string): Unit { val __result = start(id, request, onResponse, onChunk, onComplete, onError) return __result } @DoNotStrip @Keep abstract fun cancel(id: Double): Unit @DoNotStrip @Keep abstract fun storeBlob(bytes: ArrayBuffer): String // Default implementation of `HybridObject.toString()` override fun toString(): String { return "[HybridObject OneFetch]" } // C++ backing class @DoNotStrip @Keep protected open class CxxPart(javaPart: HybridOneFetchSpec): HybridObject.CxxPart(javaPart) { // C++ JHybridOneFetchSpec::CxxPart::initHybrid(...) @FastNative external override fun initHybrid(): HybridData } override fun createCxxPart(): CxxPart { return CxxPart(this) } companion object { protected const val TAG = "HybridOneFetchSpec" } }