summaryrefslogtreecommitdiff
path: root/lib/control/scanner_controller.dart
blob: 8936e8639c1c9593e44fd1fd12b47eb773044e34 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import 'dart:async';

import 'package:uvok_epaper_badge/model/device/device.dart';

/// Represents the scan status.
enum ScanStatus { idle, scanning, finished, error }

/// Represents a scanner controller.
/// It emits devices which may be connected to later.
abstract class ScannerController {
  Stream<List<Device>> get scanResultsStream;
  Stream<ScanStatus> get statusStream;
  Future<void> startScan({Duration timeout});
  Future<void> stopScan();
  void dispose();
}