/// /// HybridOneAudioSpec.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.Promise import com.margelo.nitro.core.HybridObject /** * A Kotlin class representing the OneAudio HybridObject. * Implement this abstract class to create Kotlin-based instances of OneAudio. */ @DoNotStrip @Keep @Suppress( "KotlinJniMissingFunction", "unused", "RedundantSuppression", "RedundantUnitReturnType", "SimpleRedundantLet", "LocalVariableName", "PropertyName", "PrivatePropertyName", "FunctionName" ) abstract class HybridOneAudioSpec: HybridObject() { // Properties // Methods @DoNotStrip @Keep abstract fun getRecordingPermissionStatus(): Promise @DoNotStrip @Keep abstract fun requestRecordingPermission(): Promise @DoNotStrip @Keep abstract fun play(uri: String): Promise @DoNotStrip @Keep abstract fun getPlaybackStatus(): Promise @DoNotStrip @Keep abstract fun pause(): Promise @DoNotStrip @Keep abstract fun resume(): Promise @DoNotStrip @Keep abstract fun seek(positionMs: Double): Promise @DoNotStrip @Keep abstract fun stop(): Promise @DoNotStrip @Keep abstract fun startRecording(): Promise @DoNotStrip @Keep abstract fun getRecordingStatus(): Promise @DoNotStrip @Keep abstract fun pauseRecording(): Promise @DoNotStrip @Keep abstract fun resumeRecording(): Promise @DoNotStrip @Keep abstract fun stopRecording(): Promise abstract fun addInterruptionListener(onEvent: (event: AudioInterruptionEvent) -> Unit): () -> Unit @DoNotStrip @Keep private fun addInterruptionListener_cxx(onEvent: Func_void_AudioInterruptionEvent): Func_void { val __result = addInterruptionListener(onEvent) return Func_void_java(__result) } @DoNotStrip @Keep abstract fun setNowPlayingInfo(info: AudioNowPlayingInfo): Promise @DoNotStrip @Keep abstract fun clearNowPlayingInfo(): Promise abstract fun addRemoteCommandListener(onEvent: (event: AudioRemoteCommandEvent) -> Unit): () -> Unit @DoNotStrip @Keep private fun addRemoteCommandListener_cxx(onEvent: Func_void_AudioRemoteCommandEvent): Func_void { val __result = addRemoteCommandListener(onEvent) return Func_void_java(__result) } @DoNotStrip @Keep abstract fun createPlayer(sourceUri: String?, headers: Map?): String @DoNotStrip @Keep abstract fun playerPlay(playerId: String): Unit @DoNotStrip @Keep abstract fun playerPause(playerId: String): Unit @DoNotStrip @Keep abstract fun playerSeek(playerId: String, seconds: Double, toleranceBeforeMs: Double?, toleranceAfterMs: Double?): Promise @DoNotStrip @Keep abstract fun playerReplace(playerId: String, sourceUri: String?, headers: Map?): Unit @DoNotStrip @Keep abstract fun removePlayer(playerId: String): Unit @DoNotStrip @Keep abstract fun getPlayerStatus(playerId: String): AudioPlayerStatus @DoNotStrip @Keep abstract fun setPlayerRate(playerId: String, rate: Double, pitchQuality: PitchCorrectionQuality?): Unit @DoNotStrip @Keep abstract fun setPlayerVolume(playerId: String, volume: Double): Unit @DoNotStrip @Keep abstract fun setPlayerMuted(playerId: String, muted: Boolean): Unit @DoNotStrip @Keep abstract fun setPlayerLoop(playerId: String, loop: Boolean): Unit @DoNotStrip @Keep abstract fun setPlayerPitchCorrection(playerId: String, enabled: Boolean): Unit // Default implementation of `HybridObject.toString()` override fun toString(): String { return "[HybridObject OneAudio]" } // C++ backing class @DoNotStrip @Keep protected open class CxxPart(javaPart: HybridOneAudioSpec): HybridObject.CxxPart(javaPart) { // C++ JHybridOneAudioSpec::CxxPart::initHybrid(...) @FastNative external override fun initHybrid(): HybridData } override fun createCxxPart(): CxxPart { return CxxPart(this) } companion object { protected const val TAG = "HybridOneAudioSpec" } }