// ignore_for_file: non_constant_identifier_names, camel_case_types, missing_return, unused_import, unused_local_variable, dead_code, unnecessary_cast
//////////////////////////////////////////////////////////
// GENERATED BY FLUTTIFY. DO NOT EDIT IT.
//////////////////////////////////////////////////////////

import 'dart:typed_data';

import 'package:tencent_live_fluttify/src/android/android.export.g.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/services.dart';

import 'package:foundation_fluttify/foundation_fluttify.dart';

class com_tencent_rtmp_sharp_jni_RingBuffer extends java_lang_Object  {
  //region constants
  static const String name__ = 'com.tencent.rtmp.sharp.jni.RingBuffer';

  
  //endregion

  //region creators
  static Future<com_tencent_rtmp_sharp_jni_RingBuffer> create__() async {
    final refId = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod('ObjectFactory::createcom_tencent_rtmp_sharp_jni_RingBuffer__', );
    final object = com_tencent_rtmp_sharp_jni_RingBuffer()..refId = refId..tag__ = 'tencent_live_fluttify';
    return object;
  }
  
  static Future<com_tencent_rtmp_sharp_jni_RingBuffer> create__int(int var1) async {
    final refId = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod('ObjectFactory::createcom_tencent_rtmp_sharp_jni_RingBuffer__int', {"var1": var1});
    final object = com_tencent_rtmp_sharp_jni_RingBuffer()..refId = refId..tag__ = 'tencent_live_fluttify';
    return object;
  }
  
  static Future<List<com_tencent_rtmp_sharp_jni_RingBuffer>> create_batch__(int length) async {
    if (false) {
      return Future.error('all args must have same length!');
    }
    final List resultBatch = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod('ObjectFactory::create_batchcom_tencent_rtmp_sharp_jni_RingBuffer__', {'length': length});
  
    final List<com_tencent_rtmp_sharp_jni_RingBuffer> typedResult = resultBatch.map((result) => com_tencent_rtmp_sharp_jni_RingBuffer()..refId = result..tag__ = 'tencent_live_fluttify').toList();
    return typedResult;
  }
  
  static Future<List<com_tencent_rtmp_sharp_jni_RingBuffer>> create_batch__int(List<int> var1) async {
    if (false) {
      return Future.error('all args must have same length!');
    }
    final List resultBatch = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod('ObjectFactory::create_batchcom_tencent_rtmp_sharp_jni_RingBuffer__int', [for (int __i__ = 0; __i__ < var1.length; __i__++) {"var1": var1[__i__]}]);
  
    final List<com_tencent_rtmp_sharp_jni_RingBuffer> typedResult = resultBatch.map((result) => com_tencent_rtmp_sharp_jni_RingBuffer()..refId = result..tag__ = 'tencent_live_fluttify').toList();
    return typedResult;
  }
  
  //endregion

  //region getters
  Future<int> get_c_totalSize() async {
    final __result__ = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod("com.tencent.rtmp.sharp.jni.RingBuffer::get_c_totalSize", {'__this__': this});
    return __result__ == null ? null : (__result__);
  }
  
  Future<Uint8List> get_m_pBuf() async {
    final __result__ = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod("com.tencent.rtmp.sharp.jni.RingBuffer::get_m_pBuf", {'__this__': this});
    return __result__ == null ? null : (__result__ as Uint8List);
  }
  
  Future<int> get_m_read() async {
    final __result__ = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod("com.tencent.rtmp.sharp.jni.RingBuffer::get_m_read", {'__this__': this});
    return __result__ == null ? null : (__result__);
  }
  
  Future<int> get_m_write() async {
    final __result__ = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod("com.tencent.rtmp.sharp.jni.RingBuffer::get_m_write", {'__this__': this});
    return __result__ == null ? null : (__result__);
  }
  
  Future<bool> get_m_isEmpty() async {
    final __result__ = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod("com.tencent.rtmp.sharp.jni.RingBuffer::get_m_isEmpty", {'__this__': this});
    return __result__ == null ? null : (__result__);
  }
  
  //endregion

  //region setters
  Future<void> set_c_totalSize(int c_totalSize) async {
    await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod('com.tencent.rtmp.sharp.jni.RingBuffer::set_c_totalSize', <String, dynamic>{'__this__': this, "c_totalSize": c_totalSize});
  
  
  }
  
  Future<void> set_m_pBuf(Uint8List m_pBuf) async {
    await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod('com.tencent.rtmp.sharp.jni.RingBuffer::set_m_pBuf', <String, dynamic>{'__this__': this, "m_pBuf": m_pBuf});
  
  
  }
  
  Future<void> set_m_read(int m_read) async {
    await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod('com.tencent.rtmp.sharp.jni.RingBuffer::set_m_read', <String, dynamic>{'__this__': this, "m_read": m_read});
  
  
  }
  
  Future<void> set_m_write(int m_write) async {
    await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod('com.tencent.rtmp.sharp.jni.RingBuffer::set_m_write', <String, dynamic>{'__this__': this, "m_write": m_write});
  
  
  }
  
  Future<void> set_m_isEmpty(bool m_isEmpty) async {
    await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod('com.tencent.rtmp.sharp.jni.RingBuffer::set_m_isEmpty', <String, dynamic>{'__this__': this, "m_isEmpty": m_isEmpty});
  
  
  }
  
  //endregion

  //region methods
  
  Future<void> Push(Uint8List var1, int var2) async {
    // print log
    if (fluttifyLogEnabled) {
      debugPrint('fluttify-dart: com.tencent.rtmp.sharp.jni.RingBuffer@$refId::Push([\'var1\':$var1, \'var2\':$var2])');
    }
  
    // invoke native method
    final __result__ = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod('com.tencent.rtmp.sharp.jni.RingBuffer::Push', {"var1": var1, "var2": var2, "__this__": this});
  
  
    // handle native call
  
  
    // convert native result to dart side object
    if (__result__ == null) {
      return null;
    } else {
      final __return__ = __result__;
      return __return__;
    }
  }
  
  
  Future<int> RemainRead() async {
    // print log
    if (fluttifyLogEnabled) {
      debugPrint('fluttify-dart: com.tencent.rtmp.sharp.jni.RingBuffer@$refId::RemainRead([])');
    }
  
    // invoke native method
    final __result__ = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod('com.tencent.rtmp.sharp.jni.RingBuffer::RemainRead', {"__this__": this});
  
  
    // handle native call
  
  
    // convert native result to dart side object
    if (__result__ == null) {
      return null;
    } else {
      final __return__ = __result__;
      return __return__;
    }
  }
  
  
  Future<int> RemainWrite() async {
    // print log
    if (fluttifyLogEnabled) {
      debugPrint('fluttify-dart: com.tencent.rtmp.sharp.jni.RingBuffer@$refId::RemainWrite([])');
    }
  
    // invoke native method
    final __result__ = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod('com.tencent.rtmp.sharp.jni.RingBuffer::RemainWrite', {"__this__": this});
  
  
    // handle native call
  
  
    // convert native result to dart side object
    if (__result__ == null) {
      return null;
    } else {
      final __return__ = __result__;
      return __return__;
    }
  }
  
  
  Future<void> Clear() async {
    // print log
    if (fluttifyLogEnabled) {
      debugPrint('fluttify-dart: com.tencent.rtmp.sharp.jni.RingBuffer@$refId::Clear([])');
    }
  
    // invoke native method
    final __result__ = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod('com.tencent.rtmp.sharp.jni.RingBuffer::Clear', {"__this__": this});
  
  
    // handle native call
  
  
    // convert native result to dart side object
    if (__result__ == null) {
      return null;
    } else {
      final __return__ = __result__;
      return __return__;
    }
  }
  
  
  Future<bool> Pop(Uint8List var1, int var2) async {
    // print log
    if (fluttifyLogEnabled) {
      debugPrint('fluttify-dart: com.tencent.rtmp.sharp.jni.RingBuffer@$refId::Pop([\'var1\':$var1, \'var2\':$var2])');
    }
  
    // invoke native method
    final __result__ = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod('com.tencent.rtmp.sharp.jni.RingBuffer::Pop', {"var1": var1, "var2": var2, "__this__": this});
  
  
    // handle native call
  
  
    // convert native result to dart side object
    if (__result__ == null) {
      return null;
    } else {
      final __return__ = __result__;
      return __return__;
    }
  }
  
  //endregion
}

extension com_tencent_rtmp_sharp_jni_RingBuffer_Batch on List<com_tencent_rtmp_sharp_jni_RingBuffer> {
  //region getters
  Future<List<int>> get_c_totalSize_batch() async {
    final resultBatch = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod("com.tencent.rtmp.sharp.jni.RingBuffer::get_c_totalSize_batch", [for (final __item__ in this) {'__this__': __item__}]);
  
    final typedResult = (resultBatch as List).cast<int>().map((__result__) => __result__).toList();
    return typedResult;
  }
  
  Future<List<Uint8List>> get_m_pBuf_batch() async {
    final resultBatch = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod("com.tencent.rtmp.sharp.jni.RingBuffer::get_m_pBuf_batch", [for (final __item__ in this) {'__this__': __item__}]);
  
    final typedResult = (resultBatch as List).cast<Uint8List>().map((__result__) => __result__ as Uint8List).toList();
    return typedResult;
  }
  
  Future<List<int>> get_m_read_batch() async {
    final resultBatch = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod("com.tencent.rtmp.sharp.jni.RingBuffer::get_m_read_batch", [for (final __item__ in this) {'__this__': __item__}]);
  
    final typedResult = (resultBatch as List).cast<int>().map((__result__) => __result__).toList();
    return typedResult;
  }
  
  Future<List<int>> get_m_write_batch() async {
    final resultBatch = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod("com.tencent.rtmp.sharp.jni.RingBuffer::get_m_write_batch", [for (final __item__ in this) {'__this__': __item__}]);
  
    final typedResult = (resultBatch as List).cast<int>().map((__result__) => __result__).toList();
    return typedResult;
  }
  
  Future<List<bool>> get_m_isEmpty_batch() async {
    final resultBatch = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod("com.tencent.rtmp.sharp.jni.RingBuffer::get_m_isEmpty_batch", [for (final __item__ in this) {'__this__': __item__}]);
  
    final typedResult = (resultBatch as List).cast<bool>().map((__result__) => __result__).toList();
    return typedResult;
  }
  
  //endregion

  //region setters
  Future<void> set_c_totalSize_batch(List<int> c_totalSize) async {
    await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec())).invokeMethod('com.tencent.rtmp.sharp.jni.RingBuffer::set_c_totalSize_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {'__this__': this[__i__], "c_totalSize": c_totalSize[__i__]}]);
  
  
  }
  
  Future<void> set_m_pBuf_batch(List<Uint8List> m_pBuf) async {
    await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec())).invokeMethod('com.tencent.rtmp.sharp.jni.RingBuffer::set_m_pBuf_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {'__this__': this[__i__], "m_pBuf": m_pBuf[__i__]}]);
  
  
  }
  
  Future<void> set_m_read_batch(List<int> m_read) async {
    await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec())).invokeMethod('com.tencent.rtmp.sharp.jni.RingBuffer::set_m_read_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {'__this__': this[__i__], "m_read": m_read[__i__]}]);
  
  
  }
  
  Future<void> set_m_write_batch(List<int> m_write) async {
    await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec())).invokeMethod('com.tencent.rtmp.sharp.jni.RingBuffer::set_m_write_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {'__this__': this[__i__], "m_write": m_write[__i__]}]);
  
  
  }
  
  Future<void> set_m_isEmpty_batch(List<bool> m_isEmpty) async {
    await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec())).invokeMethod('com.tencent.rtmp.sharp.jni.RingBuffer::set_m_isEmpty_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {'__this__': this[__i__], "m_isEmpty": m_isEmpty[__i__]}]);
  
  
  }
  
  //endregion

  //region methods
  
  Future<List<void>> Push_batch(List<Uint8List> var1, List<int> var2) async {
    if (var1.length != var2.length) {
      return Future.error('all args must have same length!');
    }
  
    // invoke native method
    final resultBatch = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod('com.tencent.rtmp.sharp.jni.RingBuffer::Push_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"var1": var1[__i__], "var2": var2[__i__], "__this__": this[__i__]}]);
  
  
    // convert native result to dart side object
    if (resultBatch == null) {
      return null;
    } else {
      final typedResult = (resultBatch as List).cast<String>().map((__result__) => __result__).toList();
      return typedResult;
    }
  }
  
  
  Future<List<int>> RemainRead_batch() async {
    if (false) {
      return Future.error('all args must have same length!');
    }
  
    // invoke native method
    final resultBatch = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod('com.tencent.rtmp.sharp.jni.RingBuffer::RemainRead_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"__this__": this[__i__]}]);
  
  
    // convert native result to dart side object
    if (resultBatch == null) {
      return null;
    } else {
      final typedResult = (resultBatch as List).cast<int>().map((__result__) => __result__).toList();
      return typedResult;
    }
  }
  
  
  Future<List<int>> RemainWrite_batch() async {
    if (false) {
      return Future.error('all args must have same length!');
    }
  
    // invoke native method
    final resultBatch = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod('com.tencent.rtmp.sharp.jni.RingBuffer::RemainWrite_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"__this__": this[__i__]}]);
  
  
    // convert native result to dart side object
    if (resultBatch == null) {
      return null;
    } else {
      final typedResult = (resultBatch as List).cast<int>().map((__result__) => __result__).toList();
      return typedResult;
    }
  }
  
  
  Future<List<void>> Clear_batch() async {
    if (false) {
      return Future.error('all args must have same length!');
    }
  
    // invoke native method
    final resultBatch = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod('com.tencent.rtmp.sharp.jni.RingBuffer::Clear_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"__this__": this[__i__]}]);
  
  
    // convert native result to dart side object
    if (resultBatch == null) {
      return null;
    } else {
      final typedResult = (resultBatch as List).cast<String>().map((__result__) => __result__).toList();
      return typedResult;
    }
  }
  
  
  Future<List<bool>> Pop_batch(List<Uint8List> var1, List<int> var2) async {
    if (var1.length != var2.length) {
      return Future.error('all args must have same length!');
    }
  
    // invoke native method
    final resultBatch = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod('com.tencent.rtmp.sharp.jni.RingBuffer::Pop_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"var1": var1[__i__], "var2": var2[__i__], "__this__": this[__i__]}]);
  
  
    // convert native result to dart side object
    if (resultBatch == null) {
      return null;
    } else {
      final typedResult = (resultBatch as List).cast<bool>().map((__result__) => __result__).toList();
      return typedResult;
    }
  }
  
  //endregion
}