2022-03-04 15:42:10 +03:00
|
|
|
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
|
|
|
import 'package:yubico_authenticator/management/models.dart';
|
|
|
|
|
|
|
|
import '../app/models.dart';
|
2022-03-09 19:47:50 +03:00
|
|
|
import '../core/state.dart';
|
2022-03-04 15:42:10 +03:00
|
|
|
|
2022-03-24 00:55:18 +03:00
|
|
|
final managementStateProvider = StateNotifierProvider.autoDispose
|
|
|
|
.family<ManagementStateNotifier, AsyncValue<DeviceInfo>, DevicePath>(
|
2022-03-04 15:42:10 +03:00
|
|
|
(ref, devicePath) => throw UnimplementedError(),
|
|
|
|
);
|
|
|
|
|
2022-03-09 19:47:50 +03:00
|
|
|
abstract class ManagementStateNotifier
|
|
|
|
extends ApplicationStateNotifier<DeviceInfo> {
|
2022-03-04 15:42:10 +03:00
|
|
|
Future<void> writeConfig(DeviceConfig config,
|
|
|
|
{String currentLockCode = '',
|
|
|
|
String newLockCode = '',
|
|
|
|
bool reboot = false});
|
|
|
|
|
2022-05-05 13:40:56 +03:00
|
|
|
Future<void> setMode({
|
|
|
|
required int interfaces,
|
|
|
|
int challengeResponseTimeout = 0,
|
|
|
|
int? autoEjectTimeout,
|
|
|
|
});
|
2022-03-04 15:42:10 +03:00
|
|
|
}
|