import 'package:fis_common/event/event_type.dart';
import 'package:fis_jsonrpc/rpc.dart';

abstract class IRemoteControllerManager {
  /// 远程连接客户端
  final FEventHandler<ConnectStatusToClientNotification>
      onConnectStatusToClient =
      FEventHandler<ConnectStatusToClientNotification>();

  /// 推送包 设备返回
  final FEventHandler<DeviceDownloadPatchProgressToUserNotification>
      onDeviceDownloadPatchProgressToUser =
      FEventHandler<DeviceDownloadPatchProgressToUserNotification>();

  /// 日志下载通知
  final FEventHandler<GetRemoteLogToClientNotification> onGetRemoteLogToClient =
      FEventHandler<GetRemoteLogToClientNotification>();

  /// 打印机设置设备端发送的通知
  final FEventHandler<DevicePrinterResultNotification> onDevicePrinterResult =
      FEventHandler<DevicePrinterResultNotification>();

  /// 系统设置设备端发送的通知
  final FEventHandler<SendResultToClientNotification> onSendResultToClient =
      FEventHandler<SendResultToClientNotification>();

  /// 设备端断开的通知
  final FEventHandler<DeviceDisconnectRemoteControlNotification>
      onDeviceDisconnectRemote =
      FEventHandler<DeviceDisconnectRemoteControlNotification>();

  /// 设备端通知更新探头和应用
  final FEventHandler<ProbeApplicationSettingResponseNotification>
      onProbeApplicationSettingResponse =
      FEventHandler<ProbeApplicationSettingResponseNotification>();

  /// 设备端未开启远程控制
  final FEventHandler<DeviceRejectRemoteControlNotification>
      onDeviceRejectRemoteControl =
      FEventHandler<DeviceRejectRemoteControlNotification>();

  /// 申请连接/断开请求
  Future<bool> applyRemoteConnectionAsync({
    required String deviceCode,
    ControlDeviceParameterEnum? controlType,
    String? roomCode,
  });

  ///远程控制请求
  Future<bool> applyRemoteControlAsync({
    List<AdditionParameterDTO>? parameters,
    required String deviceCode,
    ControlDeviceParameterEnum? controllerType,
  });
}
