device.dart 808 B

123456789101112131415161718192021222324252627282930
  1. import 'package:fis_common/event/event_type.dart';
  2. import 'package:vitalapp/managers/interfaces/base.dart';
  3. import 'models/device.dart';
  4. abstract class IDeviceManager extends IManager {
  5. /// 获取授权的设备类型集合
  6. Future<List<String>> getAccessTypes();
  7. /// 获取授权的设备类型集合(本地缓存)
  8. Future<List<String>> getCacheAccessTypes();
  9. /// 获取设备列表
  10. Future<List<DeviceModel>> getDeviceList();
  11. /// 保存设备列表
  12. Future<void> saveDeviceList(List<DeviceModel> deviceList);
  13. /// 添加
  14. Future<void> addDevice(DeviceModel model);
  15. /// 删除设备
  16. Future<void> removeDeviceByType(String type);
  17. /// 上报设备(平板)
  18. Future<void> reportTablet();
  19. /// 扫码事件
  20. final FEventHandler<String> onScanCode = FEventHandler<String>();
  21. }