import 'package:fis_common/event/event_type.dart';
import 'package:fis_jsonrpc/rpc.dart';
import 'package:flyinsono/notifications/handlers/execute_result_handler.dart';
import 'package:get/get.dart';

import 'interfaces/image_pool.dart';
import 'base_manager.dart';

class ImagePoolManager extends BaseManager implements IImagePoolManager {
  ///Server测量数据导出执行结果通知
  final FEventHandler<ExecuteResultNotification> onExecuteResultArrived =
      FEventHandler<ExecuteResultNotification>();

  ImagePoolManager() {
    var executeResultNotificationHandler =
        Get.find<ExecuteResultNotificationHandler>();
    executeResultNotificationHandler
        .subscribe(_onExecuteResultNotificationHandler);
  }

  void _onExecuteResultNotificationHandler(ExecuteResultNotification value) {
    onExecuteResultArrived.emit(this, value);
  }
}
