import '../tmg_room.dart';
import '../tmg_type.dart';
import 'dart:typed_data';
import '../bindings/tmg_room_bindings.dart' as TMGRoomBindings;

class TMGRoomImpl extends ITMGRoom {
  late final _instance;
  TMGRoomImpl() {
    _instance = new TMGRoomBindings.TMGRoomBindings();
  }

  @override
  String GetRoomID() {
    return _instance.GetRoomID();
  }

  @override
  int ChangeRoomType(ITMGRoomType roomType) {
    return _instance.ChangeRoomType(roomType);
  }

  @override
  int GetRoomType() {
    return _instance.GetRoomType();
  }

  @override
  int StartRoomSharing(String targetRoomID, String targetUserID) {
    return _instance.StartRoomSharing(targetRoomID, targetUserID);
  }

  @override
  int StopRoomSharing() {
    return _instance.StopRoomSharing();
  }

  @override
  int SwitchRoom(String targetRoomID, String userSig) {
    return _instance.SwitchRoom(targetRoomID, userSig);
  }

  @override
  int SendCustomData(Uint8List data, int repeatCount) {
    return _instance.SendCustomData(data, repeatCount);
  }

  @override
  int StopSendCustomData() {
    return _instance.StopSendCustomData();
  }

  @override
  int UpdateAudioRecvRange(double range) {
    return _instance.UpdateAudioRecvRange(range);
  }

  @override
  int UpdateSpatializerRecvRange(double range) {
    return _instance.UpdateSpatializerRecvRange(range);
  }

  @override
  int UpdateSelfPosition(
    Float32List position,
    Float32List axisForward,
    Float32List axisRight,
    Float32List axisUp,
  ) {
    return _instance.UpdateSelfPosition(
      position,
      axisForward,
      axisRight,
      axisUp,
    );
  }

  @override
  int UpdateOtherPosition(String userID, Float32List position) {
    return _instance.UpdateOtherPosition(userID, position);
  }

  @override
  int SendSEIMsg(String message, int repeatCount) {
    return _instance.SendSEIMsg(message, repeatCount);
  }
}
