/// /// HybridNetSocketDriverSpec.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.net import androidx.annotation.Keep import com.facebook.jni.HybridData import com.facebook.proguard.annotations.DoNotStrip import com.margelo.nitro.core.ArrayBuffer import com.margelo.nitro.core.HybridObject /** * A Kotlin class representing the NetSocketDriver HybridObject. * Implement this abstract class to create Kotlin-based instances of NetSocketDriver. */ @DoNotStrip @Keep @Suppress( "KotlinJniMissingFunction", "unused", "RedundantSuppression", "RedundantUnitReturnType", "SimpleRedundantLet", "LocalVariableName", "PropertyName", "PrivatePropertyName", "FunctionName" ) abstract class HybridNetSocketDriverSpec: HybridObject() { // Properties @get:DoNotStrip @get:Keep abstract val id: Double abstract var onEvent: (event: Double, data: ArrayBuffer) -> Unit private var onEvent_cxx: Func_void_double_std__shared_ptr_ArrayBuffer_ @Keep @DoNotStrip get() { return Func_void_double_std__shared_ptr_ArrayBuffer__java(onEvent) } @Keep @DoNotStrip set(value) { onEvent = value } // Methods @DoNotStrip @Keep abstract fun connect(host: String, port: Double): Unit @DoNotStrip @Keep abstract fun connectTLS(host: String, port: Double, serverName: String?, rejectUnauthorized: Boolean?): Unit @DoNotStrip @Keep abstract fun connectTLSWithContext(host: String, port: Double, serverName: String?, rejectUnauthorized: Boolean?, secureContextId: Double?): Unit @DoNotStrip @Keep abstract fun getAuthorizationError(): String? @DoNotStrip @Keep abstract fun getProtocol(): String? @DoNotStrip @Keep abstract fun getCipher(): String? @DoNotStrip @Keep abstract fun getALPN(): String? @DoNotStrip @Keep abstract fun getPeerCertificateJSON(): String? @DoNotStrip @Keep abstract fun getEphemeralKeyInfo(): String? @DoNotStrip @Keep abstract fun getSharedSigalgs(): String? @DoNotStrip @Keep abstract fun isSessionReused(): Boolean @DoNotStrip @Keep abstract fun getSession(): ArrayBuffer? @DoNotStrip @Keep abstract fun setSession(session: ArrayBuffer): Unit @DoNotStrip @Keep abstract fun connectUnix(path: String): Unit @DoNotStrip @Keep abstract fun connectUnixTLS(path: String, serverName: String?, rejectUnauthorized: Boolean?): Unit @DoNotStrip @Keep abstract fun connectUnixTLSWithContext(path: String, serverName: String?, rejectUnauthorized: Boolean?, secureContextId: Double?): Unit @DoNotStrip @Keep abstract fun write(data: ArrayBuffer): Unit @DoNotStrip @Keep abstract fun pause(): Unit @DoNotStrip @Keep abstract fun resume(): Unit @DoNotStrip @Keep abstract fun shutdown(): Unit @DoNotStrip @Keep abstract fun setTimeout(timeout: Double): Unit @DoNotStrip @Keep abstract fun destroy(): Unit @DoNotStrip @Keep abstract fun resetAndDestroy(): Unit @DoNotStrip @Keep abstract fun enableKeylog(): Unit @DoNotStrip @Keep abstract fun enableTrace(): Unit @DoNotStrip @Keep abstract fun exportKeyingMaterial(length: Double, label: String, context: ArrayBuffer?): ArrayBuffer? @DoNotStrip @Keep abstract fun setNoDelay(enable: Boolean): Unit @DoNotStrip @Keep abstract fun setKeepAlive(enable: Boolean, delay: Double): Unit @DoNotStrip @Keep abstract fun getLocalAddress(): String @DoNotStrip @Keep abstract fun getRemoteAddress(): String // Default implementation of `HybridObject.toString()` override fun toString(): String { return "[HybridObject NetSocketDriver]" } // C++ backing class @DoNotStrip @Keep protected open class CxxPart(javaPart: HybridNetSocketDriverSpec): HybridObject.CxxPart(javaPart) { // C++ JHybridNetSocketDriverSpec::CxxPart::initHybrid(...) external override fun initHybrid(): HybridData } override fun createCxxPart(): CxxPart { return CxxPart(this) } companion object { protected const val TAG = "HybridNetSocketDriverSpec" } }