/// /// HybridOneBatterySpec.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 OneBattery HybridObject. * Implement this abstract class to create Kotlin-based instances of OneBattery. */ @DoNotStrip @Keep @Suppress( "KotlinJniMissingFunction", "unused", "RedundantSuppression", "RedundantUnitReturnType", "SimpleRedundantLet", "LocalVariableName", "PropertyName", "PrivatePropertyName", "FunctionName" ) abstract class HybridOneBatterySpec: HybridObject() { // Properties // Methods @DoNotStrip @Keep abstract fun getLevel(): Promise @DoNotStrip @Keep abstract fun getState(): Promise @DoNotStrip @Keep abstract fun getPowerState(): Promise @DoNotStrip @Keep abstract fun isLowPowerModeEnabled(): Promise @DoNotStrip @Keep abstract fun isAvailable(): Boolean abstract fun addLevelListener(listener: (event: BatteryLevelEvent) -> Unit): () -> Unit @DoNotStrip @Keep private fun addLevelListener_cxx(listener: Func_void_BatteryLevelEvent): Func_void { val __result = addLevelListener(listener) return Func_void_java(__result) } abstract fun addStateListener(listener: (event: BatteryStateEvent) -> Unit): () -> Unit @DoNotStrip @Keep private fun addStateListener_cxx(listener: Func_void_BatteryStateEvent): Func_void { val __result = addStateListener(listener) return Func_void_java(__result) } abstract fun addLowPowerModeListener(listener: (event: BatteryPowerModeEvent) -> Unit): () -> Unit @DoNotStrip @Keep private fun addLowPowerModeListener_cxx(listener: Func_void_BatteryPowerModeEvent): Func_void { val __result = addLowPowerModeListener(listener) return Func_void_java(__result) } // Default implementation of `HybridObject.toString()` override fun toString(): String { return "[HybridObject OneBattery]" } // C++ backing class @DoNotStrip @Keep protected open class CxxPart(javaPart: HybridOneBatterySpec): HybridObject.CxxPart(javaPart) { // C++ JHybridOneBatterySpec::CxxPart::initHybrid(...) @FastNative external override fun initHybrid(): HybridData } override fun createCxxPart(): CxxPart { return CxxPart(this) } companion object { protected const val TAG = "HybridOneBatterySpec" } }