diff --git a/lib/data/sources/ble/ble_provisioner.dart b/lib/data/sources/ble/ble_provisioner.dart index e77b241..f388657 100644 --- a/lib/data/sources/ble/ble_provisioner.dart +++ b/lib/data/sources/ble/ble_provisioner.dart @@ -1,7 +1,13 @@ -// Uses flutter_blue_plus to drive the ESP-IDF Unified Provisioning GATT protocol. -// No BLE pairing or password required. -// -// Android: minSdkVersion must be ≥ 21 in android/app/build.gradle. +import 'dart:async'; +import 'dart:convert'; + +import 'package:flutter_blue_plus/flutter_blue_plus.dart'; +import 'package:permission_handler/permission_handler.dart'; + +import '../../../generated/constants.pbenum.dart'; +import '../../../generated/network_config.pb.dart'; +import '../../../generated/sec0.pb.dart'; +import '../../../generated/session.pb.dart'; class BleScanResult { const BleScanResult({ @@ -16,22 +22,223 @@ class BleScanResult { } class BleProvisioner { - // TODO: implement using flutter_blue_plus. - // Filter scan by the ESP-IDF provisioning service UUID advertised by your firmware. + // Default service UUID from ESP-IDF scheme_ble.c (bytes reversed from LSB-first array). + // Verify this matches by scanning and logging serviceUuids on first test. + static const _serviceUuid = '1775244d-6b43-439b-877c-060f2d9bed07'; - /// Starts a BLE scan and emits discovered ESP32 provisioning devices. - Stream scan() => throw UnimplementedError(); + // UUID 0x2901 — User Description GATT descriptor; maps endpoint names to chars. + static const _userDescUuid = '2901'; - Future stopScan() async => throw UnimplementedError(); + BluetoothDevice? _connectedDevice; + + Stream scan() async* { + await _requestScanPermissions(); + + await FlutterBluePlus.startScan( + withServices: [Guid(_serviceUuid)], + timeout: const Duration(seconds: 30), + ); + + await for (final results in FlutterBluePlus.scanResults) { + for (final r in results) { + final name = r.device.platformName; + if (name.startsWith('anchor_')) { + yield BleScanResult( + deviceId: r.device.remoteId.str, + name: name, + rssi: r.rssi, + ); + } + } + } + } + + Future stopScan() => FlutterBluePlus.stopScan(); - /// Connects to [deviceId] and sends WiFi credentials via the ESP-IDF - /// Unified Provisioning GATT profile (protobuf over BLE characteristic). Future provision( String deviceId, { required String ssid, required String wifiPassword, - }) async => - throw UnimplementedError(); + String? mqttHost, + int? mqttPort, + }) async { + await _requestConnectPermissions(); - void dispose() {} + final device = BluetoothDevice.fromId(deviceId); + _connectedDevice = device; + + await device.connect(timeout: const Duration(seconds: 15)); + + try { + await device.requestMtu(512); + final services = await device.discoverServices(); + + final service = services.firstWhere( + (s) => s.uuid == Guid(_serviceUuid), + orElse: () => throw Exception('Provisioning service not found'), + ); + + final charMap = await _buildCharMap(service); + + await _probeVersion(charMap); + await _initSession(charMap); + await _setWifiConfig(charMap, ssid: ssid, password: wifiPassword); + await _applyWifiConfig(charMap); + + if (mqttHost != null) { + await _sendMqttConfig(charMap, host: mqttHost, port: mqttPort ?? 1883); + } + } finally { + await device.disconnect(); + _connectedDevice = null; + } + } + + void dispose() { + FlutterBluePlus.stopScan(); + _connectedDevice?.disconnect(); + _connectedDevice = null; + } + + // --------------------------------------------------------------------------- + // Protocol steps + // --------------------------------------------------------------------------- + + // Reads the User Description (0x2901) descriptor on each characteristic to + // build a map of endpoint name -> characteristic + Future> _buildCharMap( + BluetoothService service) async { + final map = {}; + for (final char in service.characteristics) { + for (final desc in char.descriptors) { + if (desc.uuid == Guid(_userDescUuid)) { + try { + final value = await desc.read(); + final name = utf8.decode(value, allowMalformed: true).trim(); + if (name.isNotEmpty) map[name] = char; + } catch (_) {} + break; + } + } + } + return map; + } + + Future _probeVersion( + Map charMap) async { + final char = _require(charMap, 'proto-ver'); + final resp = await _writeRead(char, utf8.encode('ESP')); + try { + final json = jsonDecode(utf8.decode(resp)) as Map; + final prov = json['prov'] as Map?; + if (prov != null) { + // ignore: avoid_print + print('[BleProvisioner] device ver=${prov['ver']} cap=${prov['cap']}'); + } + } catch (_) {} + } + + Future _initSession( + Map charMap) async { + final char = _require(charMap, 'prov-session'); + final request = SessionData( + secVer: SecSchemeVersion.SecScheme0, + sec0: Sec0Payload( + msg: Sec0MsgType.S0_Session_Command, + sc: S0SessionCmd(), + ), + ); + final respBytes = await _writeRead(char, request.writeToBuffer()); + final resp = SessionData.fromBuffer(respBytes); + final status = resp.sec0.sr.status; + if (status != Status.Success) { + throw Exception('Session init failed: $status'); + } + } + + Future _setWifiConfig( + Map charMap, { + required String ssid, + required String password, + }) async { + final char = _require(charMap, 'prov-config'); + final payload = NetworkConfigPayload( + msg: NetworkConfigMsgType.TypeCmdSetWifiConfig, + cmdSetWifiConfig: CmdSetWifiConfig( + ssid: utf8.encode(ssid), + passphrase: utf8.encode(password), + ), + ); + final respBytes = await _writeRead(char, payload.writeToBuffer()); + final resp = NetworkConfigPayload.fromBuffer(respBytes); + if (resp.respSetWifiConfig.status != Status.Success) { + throw Exception( + 'Set WiFi config failed: ${resp.respSetWifiConfig.status}'); + } + } + + Future _applyWifiConfig( + Map charMap) async { + final char = _require(charMap, 'prov-config'); + final payload = NetworkConfigPayload( + msg: NetworkConfigMsgType.TypeCmdApplyWifiConfig, + cmdApplyWifiConfig: CmdApplyWifiConfig(), + ); + final respBytes = await _writeRead(char, payload.writeToBuffer()); + final resp = NetworkConfigPayload.fromBuffer(respBytes); + if (resp.respApplyWifiConfig.status != Status.Success) { + throw Exception( + 'Apply WiFi config failed: ${resp.respApplyWifiConfig.status}'); + } + } + + Future _sendMqttConfig( + Map charMap, { + required String host, + required int port, + }) async { + final char = _require(charMap, 'custom-mqtt-config'); + final json = '{"host":"$host","port":$port}'; + await _writeRead(char, utf8.encode(json)); + } + + // --------------------------------------------------------------------------- + // Utilities + // --------------------------------------------------------------------------- + + Future> _writeRead( + BluetoothCharacteristic char, List data) async { + await char.write(data, withoutResponse: false); + return char.read(); + } + + BluetoothCharacteristic _require( + Map charMap, String name) { + final char = charMap[name]; + if (char == null) throw Exception('BLE endpoint "$name" not found'); + return char; + } + + Future _requestScanPermissions() async { + final statuses = await [ + Permission.bluetoothScan, + Permission.bluetoothConnect, + Permission.locationWhenInUse, + ].request(); + + // Only BLE-specific permissions are required on API 31+ where BLUETOOTH_SCAN + // is declared neverForLocation. On API 31+, ACCESS_FINE_LOCATION is absent from + // the manifest and auto-denied without prompting, so location denial is not fatal. + if ([Permission.bluetoothScan, Permission.bluetoothConnect] + .any((p) => statuses[p]?.isDenied == true || statuses[p]?.isPermanentlyDenied == true)) { + throw Exception('BLE permissions denied'); + } + } + + Future _requestConnectPermissions() async { + final status = await Permission.bluetoothConnect.request(); + if (status.isDenied || status.isPermanentlyDenied) { + throw Exception('Bluetooth connect permission denied'); + } + } } diff --git a/lib/features/ble_provision/ble_provision_sheet.dart b/lib/features/ble_provision/ble_provision_sheet.dart index cf40282..50500b3 100644 --- a/lib/features/ble_provision/ble_provision_sheet.dart +++ b/lib/features/ble_provision/ble_provision_sheet.dart @@ -1,8 +1,10 @@ import 'package:flutter/material.dart'; +import 'package:flutter_blue_plus/flutter_blue_plus.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:go_router/go_router.dart'; import '../../data/sources/ble/ble_provisioner.dart'; +import '../../providers.dart'; enum _Step { provision, done } @@ -20,11 +22,19 @@ class _BleProvisionSheetState extends ConsumerState { final _ssidController = TextEditingController(); final _wifiPasswordController = TextEditingController(); + late final Stream _scanStream; + _Step _step = _Step.provision; BleScanResult? _selected; bool _provisioning = false; String? _error; + @override + void initState() { + super.initState(); + _scanStream = _provisioner.scan(); + } + @override void dispose() { _provisioner.dispose(); @@ -40,10 +50,13 @@ class _BleProvisionSheetState extends ConsumerState { _error = null; }); try { + final mqttBroker = await ref.read(mqttBrokerProvider.future); await _provisioner.provision( _selected!.deviceId, ssid: _ssidController.text.trim(), wifiPassword: _wifiPasswordController.text, + mqttHost: mqttBroker?.host, + mqttPort: mqttBroker?.port, ); if (mounted) setState(() => _step = _Step.done); } catch (e) { @@ -88,7 +101,7 @@ class _BleProvisionSheetState extends ConsumerState { ) : _ProvisionStep( scrollController: scrollController, - provisioner: _provisioner, + scanStream: _scanStream, selected: _selected, onSelected: (r) => setState(() => _selected = r), ssidController: _ssidController, @@ -102,10 +115,10 @@ class _BleProvisionSheetState extends ConsumerState { } } -class _ProvisionStep extends StatelessWidget { +class _ProvisionStep extends StatefulWidget { const _ProvisionStep({ required this.scrollController, - required this.provisioner, + required this.scanStream, required this.selected, required this.onSelected, required this.ssidController, @@ -116,7 +129,7 @@ class _ProvisionStep extends StatelessWidget { }); final ScrollController scrollController; - final BleProvisioner provisioner; + final Stream scanStream; final BleScanResult? selected; final ValueChanged onSelected; final TextEditingController ssidController; @@ -125,27 +138,73 @@ class _ProvisionStep extends StatelessWidget { final String? error; final VoidCallback onProvision; + @override + State<_ProvisionStep> createState() => _ProvisionStepState(); +} + +class _ProvisionStepState extends State<_ProvisionStep> { + final _discovered = {}; + @override Widget build(BuildContext context) { return ListView( - controller: scrollController, + controller: widget.scrollController, children: [ Text('Add sensor', style: Theme.of(context).textTheme.titleLarge), const SizedBox(height: 16), - // Scan results - // TODO: StreamBuilder on provisioner.scan() — show a list of - // BleScanResult tiles; tapping one calls onSelected. - const Text('Nearby ESP32 devices'), + Text('Nearby ESP32 devices', + style: Theme.of(context).textTheme.labelLarge), const SizedBox(height: 8), - const Placeholder(fallbackHeight: 120), + + StreamBuilder( + stream: widget.scanStream, + builder: (context, snapshot) { + if (snapshot.hasData) { + final r = snapshot.data!; + _discovered[r.deviceId] = r; + } + if (_discovered.isEmpty) { + return const Padding( + padding: EdgeInsets.symmetric(vertical: 16), + child: Row( + children: [ + SizedBox.square( + dimension: 16, + child: CircularProgressIndicator(strokeWidth: 2)), + SizedBox(width: 12), + Text('Scanning…'), + ], + ), + ); + } + return Column( + children: _discovered.values.map((r) { + final selected = widget.selected?.deviceId == r.deviceId; + return ListTile( + contentPadding: EdgeInsets.zero, + leading: const Icon(Icons.sensors), + title: Text(r.name), + subtitle: Text('${r.rssi} dBm'), + trailing: selected + ? const Icon(Icons.check_circle, + color: Colors.green) + : null, + selected: selected, + onTap: () => widget.onSelected(r), + ); + }).toList(), + ); + }, + ), + const SizedBox(height: 24), - if (selected != null) ...[ - Text('Selected: ${selected!.name}'), + if (widget.selected != null) ...[ + Text('Selected: ${widget.selected!.name}'), const SizedBox(height: 16), TextField( - controller: ssidController, + controller: widget.ssidController, decoration: const InputDecoration( labelText: 'WiFi SSID', border: OutlineInputBorder(), @@ -153,7 +212,7 @@ class _ProvisionStep extends StatelessWidget { ), const SizedBox(height: 12), TextField( - controller: wifiPasswordController, + controller: widget.wifiPasswordController, decoration: const InputDecoration( labelText: 'WiFi password', border: OutlineInputBorder(), @@ -163,17 +222,18 @@ class _ProvisionStep extends StatelessWidget { const SizedBox(height: 16), ], - if (error != null) + if (widget.error != null) Padding( padding: const EdgeInsets.only(bottom: 12), - child: Text(error!, + child: Text(widget.error!, style: TextStyle(color: Theme.of(context).colorScheme.error)), ), FilledButton( - onPressed: (selected == null || provisioning) ? null : onProvision, - child: provisioning + onPressed: + (widget.selected == null || widget.provisioning) ? null : widget.onProvision, + child: widget.provisioning ? const SizedBox.square( dimension: 20, child: CircularProgressIndicator(strokeWidth: 2)) diff --git a/lib/generated/constants.pb.dart b/lib/generated/constants.pb.dart new file mode 100644 index 0000000..5442d36 --- /dev/null +++ b/lib/generated/constants.pb.dart @@ -0,0 +1,17 @@ +// This is a generated file - do not edit. +// +// Generated from constants.proto. + +// @dart = 3.3 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names +// ignore_for_file: curly_braces_in_flow_control_structures +// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_relative_imports + +import 'dart:core' as $core; + +export 'package:protobuf/protobuf.dart' show GeneratedMessageGenericExtensions; + +export 'constants.pbenum.dart'; diff --git a/lib/generated/constants.pbenum.dart b/lib/generated/constants.pbenum.dart new file mode 100644 index 0000000..3bf2f0d --- /dev/null +++ b/lib/generated/constants.pbenum.dart @@ -0,0 +1,54 @@ +// This is a generated file - do not edit. +// +// Generated from constants.proto. + +// @dart = 3.3 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names +// ignore_for_file: curly_braces_in_flow_control_structures +// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_relative_imports + +import 'dart:core' as $core; + +import 'package:protobuf/protobuf.dart' as $pb; + +class Status extends $pb.ProtobufEnum { + static const Status Success = Status._(0, _omitEnumNames ? '' : 'Success'); + static const Status InvalidSecScheme = + Status._(1, _omitEnumNames ? '' : 'InvalidSecScheme'); + static const Status InvalidProto = + Status._(2, _omitEnumNames ? '' : 'InvalidProto'); + static const Status TooManySessions = + Status._(3, _omitEnumNames ? '' : 'TooManySessions'); + static const Status InvalidArgument = + Status._(4, _omitEnumNames ? '' : 'InvalidArgument'); + static const Status InternalError = + Status._(5, _omitEnumNames ? '' : 'InternalError'); + static const Status CryptoError = + Status._(6, _omitEnumNames ? '' : 'CryptoError'); + static const Status InvalidSession = + Status._(7, _omitEnumNames ? '' : 'InvalidSession'); + + static const $core.List values = [ + Success, + InvalidSecScheme, + InvalidProto, + TooManySessions, + InvalidArgument, + InternalError, + CryptoError, + InvalidSession, + ]; + + static final $core.List _byValue = + $pb.ProtobufEnum.$_initByValueList(values, 7); + static Status? valueOf($core.int value) => + value < 0 || value >= _byValue.length ? null : _byValue[value]; + + const Status._(super.value, super.name); +} + +const $core.bool _omitEnumNames = + $core.bool.fromEnvironment('protobuf.omit_enum_names'); diff --git a/lib/generated/constants.pbjson.dart b/lib/generated/constants.pbjson.dart new file mode 100644 index 0000000..9323a79 --- /dev/null +++ b/lib/generated/constants.pbjson.dart @@ -0,0 +1,37 @@ +// This is a generated file - do not edit. +// +// Generated from constants.proto. + +// @dart = 3.3 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names +// ignore_for_file: curly_braces_in_flow_control_structures +// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_relative_imports +// ignore_for_file: unused_import + +import 'dart:convert' as $convert; +import 'dart:core' as $core; +import 'dart:typed_data' as $typed_data; + +@$core.Deprecated('Use statusDescriptor instead') +const Status$json = { + '1': 'Status', + '2': [ + {'1': 'Success', '2': 0}, + {'1': 'InvalidSecScheme', '2': 1}, + {'1': 'InvalidProto', '2': 2}, + {'1': 'TooManySessions', '2': 3}, + {'1': 'InvalidArgument', '2': 4}, + {'1': 'InternalError', '2': 5}, + {'1': 'CryptoError', '2': 6}, + {'1': 'InvalidSession', '2': 7}, + ], +}; + +/// Descriptor for `Status`. Decode as a `google.protobuf.EnumDescriptorProto`. +final $typed_data.Uint8List statusDescriptor = $convert.base64Decode( + 'CgZTdGF0dXMSCwoHU3VjY2VzcxAAEhQKEEludmFsaWRTZWNTY2hlbWUQARIQCgxJbnZhbGlkUH' + 'JvdG8QAhITCg9Ub29NYW55U2Vzc2lvbnMQAxITCg9JbnZhbGlkQXJndW1lbnQQBBIRCg1JbnRl' + 'cm5hbEVycm9yEAUSDwoLQ3J5cHRvRXJyb3IQBhISCg5JbnZhbGlkU2Vzc2lvbhAH'); diff --git a/lib/generated/network_config.pb.dart b/lib/generated/network_config.pb.dart new file mode 100644 index 0000000..a84f83f --- /dev/null +++ b/lib/generated/network_config.pb.dart @@ -0,0 +1,1095 @@ +// This is a generated file - do not edit. +// +// Generated from network_config.proto. + +// @dart = 3.3 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names +// ignore_for_file: curly_braces_in_flow_control_structures +// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_relative_imports + +import 'dart:core' as $core; + +import 'package:protobuf/protobuf.dart' as $pb; + +import 'constants.pbenum.dart' as $1; +import 'network_config.pbenum.dart'; +import 'network_constants.pb.dart' as $0; + +export 'package:protobuf/protobuf.dart' show GeneratedMessageGenericExtensions; + +export 'network_config.pbenum.dart'; + +class CmdGetWifiStatus extends $pb.GeneratedMessage { + factory CmdGetWifiStatus() => create(); + + CmdGetWifiStatus._(); + + factory CmdGetWifiStatus.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory CmdGetWifiStatus.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'CmdGetWifiStatus', + createEmptyInstance: create) + ..hasRequiredFields = false; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + CmdGetWifiStatus clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + CmdGetWifiStatus copyWith(void Function(CmdGetWifiStatus) updates) => + super.copyWith((message) => updates(message as CmdGetWifiStatus)) + as CmdGetWifiStatus; + + @$core.override + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static CmdGetWifiStatus create() => CmdGetWifiStatus._(); + @$core.override + CmdGetWifiStatus createEmptyInstance() => create(); + @$core.pragma('dart2js:noInline') + static CmdGetWifiStatus getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(create); + static CmdGetWifiStatus? _defaultInstance; +} + +enum RespGetWifiStatus_State { + wifiFailReason, + wifiConnected, + attemptFailed, + notSet +} + +class RespGetWifiStatus extends $pb.GeneratedMessage { + factory RespGetWifiStatus({ + $1.Status? status, + $0.WifiStationState? wifiStaState, + $0.WifiConnectFailedReason? wifiFailReason, + $0.WifiConnectedState? wifiConnected, + $0.WifiAttemptFailed? attemptFailed, + }) { + final result = create(); + if (status != null) result.status = status; + if (wifiStaState != null) result.wifiStaState = wifiStaState; + if (wifiFailReason != null) result.wifiFailReason = wifiFailReason; + if (wifiConnected != null) result.wifiConnected = wifiConnected; + if (attemptFailed != null) result.attemptFailed = attemptFailed; + return result; + } + + RespGetWifiStatus._(); + + factory RespGetWifiStatus.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory RespGetWifiStatus.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); + + static const $core.Map<$core.int, RespGetWifiStatus_State> + _RespGetWifiStatus_StateByTag = { + 10: RespGetWifiStatus_State.wifiFailReason, + 11: RespGetWifiStatus_State.wifiConnected, + 12: RespGetWifiStatus_State.attemptFailed, + 0: RespGetWifiStatus_State.notSet + }; + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'RespGetWifiStatus', + createEmptyInstance: create) + ..oo(0, [10, 11, 12]) + ..aE<$1.Status>(1, _omitFieldNames ? '' : 'status', + enumValues: $1.Status.values) + ..aE<$0.WifiStationState>(2, _omitFieldNames ? '' : 'wifiStaState', + enumValues: $0.WifiStationState.values) + ..aE<$0.WifiConnectFailedReason>( + 10, _omitFieldNames ? '' : 'wifiFailReason', + enumValues: $0.WifiConnectFailedReason.values) + ..aOM<$0.WifiConnectedState>(11, _omitFieldNames ? '' : 'wifiConnected', + subBuilder: $0.WifiConnectedState.create) + ..aOM<$0.WifiAttemptFailed>(12, _omitFieldNames ? '' : 'attemptFailed', + subBuilder: $0.WifiAttemptFailed.create) + ..hasRequiredFields = false; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + RespGetWifiStatus clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + RespGetWifiStatus copyWith(void Function(RespGetWifiStatus) updates) => + super.copyWith((message) => updates(message as RespGetWifiStatus)) + as RespGetWifiStatus; + + @$core.override + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static RespGetWifiStatus create() => RespGetWifiStatus._(); + @$core.override + RespGetWifiStatus createEmptyInstance() => create(); + @$core.pragma('dart2js:noInline') + static RespGetWifiStatus getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(create); + static RespGetWifiStatus? _defaultInstance; + + @$pb.TagNumber(10) + @$pb.TagNumber(11) + @$pb.TagNumber(12) + RespGetWifiStatus_State whichState() => + _RespGetWifiStatus_StateByTag[$_whichOneof(0)]!; + @$pb.TagNumber(10) + @$pb.TagNumber(11) + @$pb.TagNumber(12) + void clearState() => $_clearField($_whichOneof(0)); + + @$pb.TagNumber(1) + $1.Status get status => $_getN(0); + @$pb.TagNumber(1) + set status($1.Status value) => $_setField(1, value); + @$pb.TagNumber(1) + $core.bool hasStatus() => $_has(0); + @$pb.TagNumber(1) + void clearStatus() => $_clearField(1); + + @$pb.TagNumber(2) + $0.WifiStationState get wifiStaState => $_getN(1); + @$pb.TagNumber(2) + set wifiStaState($0.WifiStationState value) => $_setField(2, value); + @$pb.TagNumber(2) + $core.bool hasWifiStaState() => $_has(1); + @$pb.TagNumber(2) + void clearWifiStaState() => $_clearField(2); + + @$pb.TagNumber(10) + $0.WifiConnectFailedReason get wifiFailReason => $_getN(2); + @$pb.TagNumber(10) + set wifiFailReason($0.WifiConnectFailedReason value) => $_setField(10, value); + @$pb.TagNumber(10) + $core.bool hasWifiFailReason() => $_has(2); + @$pb.TagNumber(10) + void clearWifiFailReason() => $_clearField(10); + + @$pb.TagNumber(11) + $0.WifiConnectedState get wifiConnected => $_getN(3); + @$pb.TagNumber(11) + set wifiConnected($0.WifiConnectedState value) => $_setField(11, value); + @$pb.TagNumber(11) + $core.bool hasWifiConnected() => $_has(3); + @$pb.TagNumber(11) + void clearWifiConnected() => $_clearField(11); + @$pb.TagNumber(11) + $0.WifiConnectedState ensureWifiConnected() => $_ensure(3); + + @$pb.TagNumber(12) + $0.WifiAttemptFailed get attemptFailed => $_getN(4); + @$pb.TagNumber(12) + set attemptFailed($0.WifiAttemptFailed value) => $_setField(12, value); + @$pb.TagNumber(12) + $core.bool hasAttemptFailed() => $_has(4); + @$pb.TagNumber(12) + void clearAttemptFailed() => $_clearField(12); + @$pb.TagNumber(12) + $0.WifiAttemptFailed ensureAttemptFailed() => $_ensure(4); +} + +class CmdGetThreadStatus extends $pb.GeneratedMessage { + factory CmdGetThreadStatus() => create(); + + CmdGetThreadStatus._(); + + factory CmdGetThreadStatus.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory CmdGetThreadStatus.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'CmdGetThreadStatus', + createEmptyInstance: create) + ..hasRequiredFields = false; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + CmdGetThreadStatus clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + CmdGetThreadStatus copyWith(void Function(CmdGetThreadStatus) updates) => + super.copyWith((message) => updates(message as CmdGetThreadStatus)) + as CmdGetThreadStatus; + + @$core.override + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static CmdGetThreadStatus create() => CmdGetThreadStatus._(); + @$core.override + CmdGetThreadStatus createEmptyInstance() => create(); + @$core.pragma('dart2js:noInline') + static CmdGetThreadStatus getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(create); + static CmdGetThreadStatus? _defaultInstance; +} + +enum RespGetThreadStatus_State { threadFailReason, threadAttached, notSet } + +class RespGetThreadStatus extends $pb.GeneratedMessage { + factory RespGetThreadStatus({ + $1.Status? status, + $0.ThreadNetworkState? threadState, + $0.ThreadAttachFailedReason? threadFailReason, + $0.ThreadAttachState? threadAttached, + }) { + final result = create(); + if (status != null) result.status = status; + if (threadState != null) result.threadState = threadState; + if (threadFailReason != null) result.threadFailReason = threadFailReason; + if (threadAttached != null) result.threadAttached = threadAttached; + return result; + } + + RespGetThreadStatus._(); + + factory RespGetThreadStatus.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory RespGetThreadStatus.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); + + static const $core.Map<$core.int, RespGetThreadStatus_State> + _RespGetThreadStatus_StateByTag = { + 10: RespGetThreadStatus_State.threadFailReason, + 11: RespGetThreadStatus_State.threadAttached, + 0: RespGetThreadStatus_State.notSet + }; + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'RespGetThreadStatus', + createEmptyInstance: create) + ..oo(0, [10, 11]) + ..aE<$1.Status>(1, _omitFieldNames ? '' : 'status', + enumValues: $1.Status.values) + ..aE<$0.ThreadNetworkState>(2, _omitFieldNames ? '' : 'threadState', + enumValues: $0.ThreadNetworkState.values) + ..aE<$0.ThreadAttachFailedReason>( + 10, _omitFieldNames ? '' : 'threadFailReason', + enumValues: $0.ThreadAttachFailedReason.values) + ..aOM<$0.ThreadAttachState>(11, _omitFieldNames ? '' : 'threadAttached', + subBuilder: $0.ThreadAttachState.create) + ..hasRequiredFields = false; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + RespGetThreadStatus clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + RespGetThreadStatus copyWith(void Function(RespGetThreadStatus) updates) => + super.copyWith((message) => updates(message as RespGetThreadStatus)) + as RespGetThreadStatus; + + @$core.override + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static RespGetThreadStatus create() => RespGetThreadStatus._(); + @$core.override + RespGetThreadStatus createEmptyInstance() => create(); + @$core.pragma('dart2js:noInline') + static RespGetThreadStatus getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(create); + static RespGetThreadStatus? _defaultInstance; + + @$pb.TagNumber(10) + @$pb.TagNumber(11) + RespGetThreadStatus_State whichState() => + _RespGetThreadStatus_StateByTag[$_whichOneof(0)]!; + @$pb.TagNumber(10) + @$pb.TagNumber(11) + void clearState() => $_clearField($_whichOneof(0)); + + @$pb.TagNumber(1) + $1.Status get status => $_getN(0); + @$pb.TagNumber(1) + set status($1.Status value) => $_setField(1, value); + @$pb.TagNumber(1) + $core.bool hasStatus() => $_has(0); + @$pb.TagNumber(1) + void clearStatus() => $_clearField(1); + + @$pb.TagNumber(2) + $0.ThreadNetworkState get threadState => $_getN(1); + @$pb.TagNumber(2) + set threadState($0.ThreadNetworkState value) => $_setField(2, value); + @$pb.TagNumber(2) + $core.bool hasThreadState() => $_has(1); + @$pb.TagNumber(2) + void clearThreadState() => $_clearField(2); + + @$pb.TagNumber(10) + $0.ThreadAttachFailedReason get threadFailReason => $_getN(2); + @$pb.TagNumber(10) + set threadFailReason($0.ThreadAttachFailedReason value) => + $_setField(10, value); + @$pb.TagNumber(10) + $core.bool hasThreadFailReason() => $_has(2); + @$pb.TagNumber(10) + void clearThreadFailReason() => $_clearField(10); + + @$pb.TagNumber(11) + $0.ThreadAttachState get threadAttached => $_getN(3); + @$pb.TagNumber(11) + set threadAttached($0.ThreadAttachState value) => $_setField(11, value); + @$pb.TagNumber(11) + $core.bool hasThreadAttached() => $_has(3); + @$pb.TagNumber(11) + void clearThreadAttached() => $_clearField(11); + @$pb.TagNumber(11) + $0.ThreadAttachState ensureThreadAttached() => $_ensure(3); +} + +class CmdSetWifiConfig extends $pb.GeneratedMessage { + factory CmdSetWifiConfig({ + $core.List<$core.int>? ssid, + $core.List<$core.int>? passphrase, + $core.List<$core.int>? bssid, + $core.int? channel, + }) { + final result = create(); + if (ssid != null) result.ssid = ssid; + if (passphrase != null) result.passphrase = passphrase; + if (bssid != null) result.bssid = bssid; + if (channel != null) result.channel = channel; + return result; + } + + CmdSetWifiConfig._(); + + factory CmdSetWifiConfig.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory CmdSetWifiConfig.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'CmdSetWifiConfig', + createEmptyInstance: create) + ..a<$core.List<$core.int>>( + 1, _omitFieldNames ? '' : 'ssid', $pb.PbFieldType.OY) + ..a<$core.List<$core.int>>( + 2, _omitFieldNames ? '' : 'passphrase', $pb.PbFieldType.OY) + ..a<$core.List<$core.int>>( + 3, _omitFieldNames ? '' : 'bssid', $pb.PbFieldType.OY) + ..aI(4, _omitFieldNames ? '' : 'channel') + ..hasRequiredFields = false; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + CmdSetWifiConfig clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + CmdSetWifiConfig copyWith(void Function(CmdSetWifiConfig) updates) => + super.copyWith((message) => updates(message as CmdSetWifiConfig)) + as CmdSetWifiConfig; + + @$core.override + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static CmdSetWifiConfig create() => CmdSetWifiConfig._(); + @$core.override + CmdSetWifiConfig createEmptyInstance() => create(); + @$core.pragma('dart2js:noInline') + static CmdSetWifiConfig getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(create); + static CmdSetWifiConfig? _defaultInstance; + + @$pb.TagNumber(1) + $core.List<$core.int> get ssid => $_getN(0); + @$pb.TagNumber(1) + set ssid($core.List<$core.int> value) => $_setBytes(0, value); + @$pb.TagNumber(1) + $core.bool hasSsid() => $_has(0); + @$pb.TagNumber(1) + void clearSsid() => $_clearField(1); + + @$pb.TagNumber(2) + $core.List<$core.int> get passphrase => $_getN(1); + @$pb.TagNumber(2) + set passphrase($core.List<$core.int> value) => $_setBytes(1, value); + @$pb.TagNumber(2) + $core.bool hasPassphrase() => $_has(1); + @$pb.TagNumber(2) + void clearPassphrase() => $_clearField(2); + + @$pb.TagNumber(3) + $core.List<$core.int> get bssid => $_getN(2); + @$pb.TagNumber(3) + set bssid($core.List<$core.int> value) => $_setBytes(2, value); + @$pb.TagNumber(3) + $core.bool hasBssid() => $_has(2); + @$pb.TagNumber(3) + void clearBssid() => $_clearField(3); + + @$pb.TagNumber(4) + $core.int get channel => $_getIZ(3); + @$pb.TagNumber(4) + set channel($core.int value) => $_setSignedInt32(3, value); + @$pb.TagNumber(4) + $core.bool hasChannel() => $_has(3); + @$pb.TagNumber(4) + void clearChannel() => $_clearField(4); +} + +class CmdSetThreadConfig extends $pb.GeneratedMessage { + factory CmdSetThreadConfig({ + $core.List<$core.int>? dataset, + }) { + final result = create(); + if (dataset != null) result.dataset = dataset; + return result; + } + + CmdSetThreadConfig._(); + + factory CmdSetThreadConfig.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory CmdSetThreadConfig.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'CmdSetThreadConfig', + createEmptyInstance: create) + ..a<$core.List<$core.int>>( + 1, _omitFieldNames ? '' : 'dataset', $pb.PbFieldType.OY) + ..hasRequiredFields = false; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + CmdSetThreadConfig clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + CmdSetThreadConfig copyWith(void Function(CmdSetThreadConfig) updates) => + super.copyWith((message) => updates(message as CmdSetThreadConfig)) + as CmdSetThreadConfig; + + @$core.override + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static CmdSetThreadConfig create() => CmdSetThreadConfig._(); + @$core.override + CmdSetThreadConfig createEmptyInstance() => create(); + @$core.pragma('dart2js:noInline') + static CmdSetThreadConfig getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(create); + static CmdSetThreadConfig? _defaultInstance; + + @$pb.TagNumber(1) + $core.List<$core.int> get dataset => $_getN(0); + @$pb.TagNumber(1) + set dataset($core.List<$core.int> value) => $_setBytes(0, value); + @$pb.TagNumber(1) + $core.bool hasDataset() => $_has(0); + @$pb.TagNumber(1) + void clearDataset() => $_clearField(1); +} + +class RespSetWifiConfig extends $pb.GeneratedMessage { + factory RespSetWifiConfig({ + $1.Status? status, + }) { + final result = create(); + if (status != null) result.status = status; + return result; + } + + RespSetWifiConfig._(); + + factory RespSetWifiConfig.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory RespSetWifiConfig.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'RespSetWifiConfig', + createEmptyInstance: create) + ..aE<$1.Status>(1, _omitFieldNames ? '' : 'status', + enumValues: $1.Status.values) + ..hasRequiredFields = false; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + RespSetWifiConfig clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + RespSetWifiConfig copyWith(void Function(RespSetWifiConfig) updates) => + super.copyWith((message) => updates(message as RespSetWifiConfig)) + as RespSetWifiConfig; + + @$core.override + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static RespSetWifiConfig create() => RespSetWifiConfig._(); + @$core.override + RespSetWifiConfig createEmptyInstance() => create(); + @$core.pragma('dart2js:noInline') + static RespSetWifiConfig getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(create); + static RespSetWifiConfig? _defaultInstance; + + @$pb.TagNumber(1) + $1.Status get status => $_getN(0); + @$pb.TagNumber(1) + set status($1.Status value) => $_setField(1, value); + @$pb.TagNumber(1) + $core.bool hasStatus() => $_has(0); + @$pb.TagNumber(1) + void clearStatus() => $_clearField(1); +} + +class RespSetThreadConfig extends $pb.GeneratedMessage { + factory RespSetThreadConfig({ + $1.Status? status, + }) { + final result = create(); + if (status != null) result.status = status; + return result; + } + + RespSetThreadConfig._(); + + factory RespSetThreadConfig.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory RespSetThreadConfig.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'RespSetThreadConfig', + createEmptyInstance: create) + ..aE<$1.Status>(1, _omitFieldNames ? '' : 'status', + enumValues: $1.Status.values) + ..hasRequiredFields = false; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + RespSetThreadConfig clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + RespSetThreadConfig copyWith(void Function(RespSetThreadConfig) updates) => + super.copyWith((message) => updates(message as RespSetThreadConfig)) + as RespSetThreadConfig; + + @$core.override + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static RespSetThreadConfig create() => RespSetThreadConfig._(); + @$core.override + RespSetThreadConfig createEmptyInstance() => create(); + @$core.pragma('dart2js:noInline') + static RespSetThreadConfig getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(create); + static RespSetThreadConfig? _defaultInstance; + + @$pb.TagNumber(1) + $1.Status get status => $_getN(0); + @$pb.TagNumber(1) + set status($1.Status value) => $_setField(1, value); + @$pb.TagNumber(1) + $core.bool hasStatus() => $_has(0); + @$pb.TagNumber(1) + void clearStatus() => $_clearField(1); +} + +class CmdApplyWifiConfig extends $pb.GeneratedMessage { + factory CmdApplyWifiConfig() => create(); + + CmdApplyWifiConfig._(); + + factory CmdApplyWifiConfig.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory CmdApplyWifiConfig.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'CmdApplyWifiConfig', + createEmptyInstance: create) + ..hasRequiredFields = false; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + CmdApplyWifiConfig clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + CmdApplyWifiConfig copyWith(void Function(CmdApplyWifiConfig) updates) => + super.copyWith((message) => updates(message as CmdApplyWifiConfig)) + as CmdApplyWifiConfig; + + @$core.override + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static CmdApplyWifiConfig create() => CmdApplyWifiConfig._(); + @$core.override + CmdApplyWifiConfig createEmptyInstance() => create(); + @$core.pragma('dart2js:noInline') + static CmdApplyWifiConfig getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(create); + static CmdApplyWifiConfig? _defaultInstance; +} + +class CmdApplyThreadConfig extends $pb.GeneratedMessage { + factory CmdApplyThreadConfig() => create(); + + CmdApplyThreadConfig._(); + + factory CmdApplyThreadConfig.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory CmdApplyThreadConfig.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'CmdApplyThreadConfig', + createEmptyInstance: create) + ..hasRequiredFields = false; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + CmdApplyThreadConfig clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + CmdApplyThreadConfig copyWith(void Function(CmdApplyThreadConfig) updates) => + super.copyWith((message) => updates(message as CmdApplyThreadConfig)) + as CmdApplyThreadConfig; + + @$core.override + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static CmdApplyThreadConfig create() => CmdApplyThreadConfig._(); + @$core.override + CmdApplyThreadConfig createEmptyInstance() => create(); + @$core.pragma('dart2js:noInline') + static CmdApplyThreadConfig getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(create); + static CmdApplyThreadConfig? _defaultInstance; +} + +class RespApplyWifiConfig extends $pb.GeneratedMessage { + factory RespApplyWifiConfig({ + $1.Status? status, + }) { + final result = create(); + if (status != null) result.status = status; + return result; + } + + RespApplyWifiConfig._(); + + factory RespApplyWifiConfig.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory RespApplyWifiConfig.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'RespApplyWifiConfig', + createEmptyInstance: create) + ..aE<$1.Status>(1, _omitFieldNames ? '' : 'status', + enumValues: $1.Status.values) + ..hasRequiredFields = false; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + RespApplyWifiConfig clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + RespApplyWifiConfig copyWith(void Function(RespApplyWifiConfig) updates) => + super.copyWith((message) => updates(message as RespApplyWifiConfig)) + as RespApplyWifiConfig; + + @$core.override + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static RespApplyWifiConfig create() => RespApplyWifiConfig._(); + @$core.override + RespApplyWifiConfig createEmptyInstance() => create(); + @$core.pragma('dart2js:noInline') + static RespApplyWifiConfig getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(create); + static RespApplyWifiConfig? _defaultInstance; + + @$pb.TagNumber(1) + $1.Status get status => $_getN(0); + @$pb.TagNumber(1) + set status($1.Status value) => $_setField(1, value); + @$pb.TagNumber(1) + $core.bool hasStatus() => $_has(0); + @$pb.TagNumber(1) + void clearStatus() => $_clearField(1); +} + +class RespApplyThreadConfig extends $pb.GeneratedMessage { + factory RespApplyThreadConfig({ + $1.Status? status, + }) { + final result = create(); + if (status != null) result.status = status; + return result; + } + + RespApplyThreadConfig._(); + + factory RespApplyThreadConfig.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory RespApplyThreadConfig.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'RespApplyThreadConfig', + createEmptyInstance: create) + ..aE<$1.Status>(1, _omitFieldNames ? '' : 'status', + enumValues: $1.Status.values) + ..hasRequiredFields = false; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + RespApplyThreadConfig clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + RespApplyThreadConfig copyWith( + void Function(RespApplyThreadConfig) updates) => + super.copyWith((message) => updates(message as RespApplyThreadConfig)) + as RespApplyThreadConfig; + + @$core.override + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static RespApplyThreadConfig create() => RespApplyThreadConfig._(); + @$core.override + RespApplyThreadConfig createEmptyInstance() => create(); + @$core.pragma('dart2js:noInline') + static RespApplyThreadConfig getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(create); + static RespApplyThreadConfig? _defaultInstance; + + @$pb.TagNumber(1) + $1.Status get status => $_getN(0); + @$pb.TagNumber(1) + set status($1.Status value) => $_setField(1, value); + @$pb.TagNumber(1) + $core.bool hasStatus() => $_has(0); + @$pb.TagNumber(1) + void clearStatus() => $_clearField(1); +} + +enum NetworkConfigPayload_Payload { + cmdGetWifiStatus, + respGetWifiStatus, + cmdSetWifiConfig, + respSetWifiConfig, + cmdApplyWifiConfig, + respApplyWifiConfig, + cmdGetThreadStatus, + respGetThreadStatus, + cmdSetThreadConfig, + respSetThreadConfig, + cmdApplyThreadConfig, + respApplyThreadConfig, + notSet +} + +class NetworkConfigPayload extends $pb.GeneratedMessage { + factory NetworkConfigPayload({ + NetworkConfigMsgType? msg, + CmdGetWifiStatus? cmdGetWifiStatus, + RespGetWifiStatus? respGetWifiStatus, + CmdSetWifiConfig? cmdSetWifiConfig, + RespSetWifiConfig? respSetWifiConfig, + CmdApplyWifiConfig? cmdApplyWifiConfig, + RespApplyWifiConfig? respApplyWifiConfig, + CmdGetThreadStatus? cmdGetThreadStatus, + RespGetThreadStatus? respGetThreadStatus, + CmdSetThreadConfig? cmdSetThreadConfig, + RespSetThreadConfig? respSetThreadConfig, + CmdApplyThreadConfig? cmdApplyThreadConfig, + RespApplyThreadConfig? respApplyThreadConfig, + }) { + final result = create(); + if (msg != null) result.msg = msg; + if (cmdGetWifiStatus != null) result.cmdGetWifiStatus = cmdGetWifiStatus; + if (respGetWifiStatus != null) result.respGetWifiStatus = respGetWifiStatus; + if (cmdSetWifiConfig != null) result.cmdSetWifiConfig = cmdSetWifiConfig; + if (respSetWifiConfig != null) result.respSetWifiConfig = respSetWifiConfig; + if (cmdApplyWifiConfig != null) + result.cmdApplyWifiConfig = cmdApplyWifiConfig; + if (respApplyWifiConfig != null) + result.respApplyWifiConfig = respApplyWifiConfig; + if (cmdGetThreadStatus != null) + result.cmdGetThreadStatus = cmdGetThreadStatus; + if (respGetThreadStatus != null) + result.respGetThreadStatus = respGetThreadStatus; + if (cmdSetThreadConfig != null) + result.cmdSetThreadConfig = cmdSetThreadConfig; + if (respSetThreadConfig != null) + result.respSetThreadConfig = respSetThreadConfig; + if (cmdApplyThreadConfig != null) + result.cmdApplyThreadConfig = cmdApplyThreadConfig; + if (respApplyThreadConfig != null) + result.respApplyThreadConfig = respApplyThreadConfig; + return result; + } + + NetworkConfigPayload._(); + + factory NetworkConfigPayload.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory NetworkConfigPayload.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); + + static const $core.Map<$core.int, NetworkConfigPayload_Payload> + _NetworkConfigPayload_PayloadByTag = { + 10: NetworkConfigPayload_Payload.cmdGetWifiStatus, + 11: NetworkConfigPayload_Payload.respGetWifiStatus, + 12: NetworkConfigPayload_Payload.cmdSetWifiConfig, + 13: NetworkConfigPayload_Payload.respSetWifiConfig, + 14: NetworkConfigPayload_Payload.cmdApplyWifiConfig, + 15: NetworkConfigPayload_Payload.respApplyWifiConfig, + 16: NetworkConfigPayload_Payload.cmdGetThreadStatus, + 17: NetworkConfigPayload_Payload.respGetThreadStatus, + 18: NetworkConfigPayload_Payload.cmdSetThreadConfig, + 19: NetworkConfigPayload_Payload.respSetThreadConfig, + 20: NetworkConfigPayload_Payload.cmdApplyThreadConfig, + 21: NetworkConfigPayload_Payload.respApplyThreadConfig, + 0: NetworkConfigPayload_Payload.notSet + }; + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'NetworkConfigPayload', + createEmptyInstance: create) + ..oo(0, [10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21]) + ..aE(1, _omitFieldNames ? '' : 'msg', + enumValues: NetworkConfigMsgType.values) + ..aOM(10, _omitFieldNames ? '' : 'cmdGetWifiStatus', + subBuilder: CmdGetWifiStatus.create) + ..aOM(11, _omitFieldNames ? '' : 'respGetWifiStatus', + subBuilder: RespGetWifiStatus.create) + ..aOM(12, _omitFieldNames ? '' : 'cmdSetWifiConfig', + subBuilder: CmdSetWifiConfig.create) + ..aOM(13, _omitFieldNames ? '' : 'respSetWifiConfig', + subBuilder: RespSetWifiConfig.create) + ..aOM(14, _omitFieldNames ? '' : 'cmdApplyWifiConfig', + subBuilder: CmdApplyWifiConfig.create) + ..aOM(15, _omitFieldNames ? '' : 'respApplyWifiConfig', + subBuilder: RespApplyWifiConfig.create) + ..aOM(16, _omitFieldNames ? '' : 'cmdGetThreadStatus', + subBuilder: CmdGetThreadStatus.create) + ..aOM(17, _omitFieldNames ? '' : 'respGetThreadStatus', + subBuilder: RespGetThreadStatus.create) + ..aOM(18, _omitFieldNames ? '' : 'cmdSetThreadConfig', + subBuilder: CmdSetThreadConfig.create) + ..aOM(19, _omitFieldNames ? '' : 'respSetThreadConfig', + subBuilder: RespSetThreadConfig.create) + ..aOM( + 20, _omitFieldNames ? '' : 'cmdApplyThreadConfig', + subBuilder: CmdApplyThreadConfig.create) + ..aOM( + 21, _omitFieldNames ? '' : 'respApplyThreadConfig', + subBuilder: RespApplyThreadConfig.create) + ..hasRequiredFields = false; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + NetworkConfigPayload clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + NetworkConfigPayload copyWith(void Function(NetworkConfigPayload) updates) => + super.copyWith((message) => updates(message as NetworkConfigPayload)) + as NetworkConfigPayload; + + @$core.override + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static NetworkConfigPayload create() => NetworkConfigPayload._(); + @$core.override + NetworkConfigPayload createEmptyInstance() => create(); + @$core.pragma('dart2js:noInline') + static NetworkConfigPayload getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(create); + static NetworkConfigPayload? _defaultInstance; + + @$pb.TagNumber(10) + @$pb.TagNumber(11) + @$pb.TagNumber(12) + @$pb.TagNumber(13) + @$pb.TagNumber(14) + @$pb.TagNumber(15) + @$pb.TagNumber(16) + @$pb.TagNumber(17) + @$pb.TagNumber(18) + @$pb.TagNumber(19) + @$pb.TagNumber(20) + @$pb.TagNumber(21) + NetworkConfigPayload_Payload whichPayload() => + _NetworkConfigPayload_PayloadByTag[$_whichOneof(0)]!; + @$pb.TagNumber(10) + @$pb.TagNumber(11) + @$pb.TagNumber(12) + @$pb.TagNumber(13) + @$pb.TagNumber(14) + @$pb.TagNumber(15) + @$pb.TagNumber(16) + @$pb.TagNumber(17) + @$pb.TagNumber(18) + @$pb.TagNumber(19) + @$pb.TagNumber(20) + @$pb.TagNumber(21) + void clearPayload() => $_clearField($_whichOneof(0)); + + @$pb.TagNumber(1) + NetworkConfigMsgType get msg => $_getN(0); + @$pb.TagNumber(1) + set msg(NetworkConfigMsgType value) => $_setField(1, value); + @$pb.TagNumber(1) + $core.bool hasMsg() => $_has(0); + @$pb.TagNumber(1) + void clearMsg() => $_clearField(1); + + @$pb.TagNumber(10) + CmdGetWifiStatus get cmdGetWifiStatus => $_getN(1); + @$pb.TagNumber(10) + set cmdGetWifiStatus(CmdGetWifiStatus value) => $_setField(10, value); + @$pb.TagNumber(10) + $core.bool hasCmdGetWifiStatus() => $_has(1); + @$pb.TagNumber(10) + void clearCmdGetWifiStatus() => $_clearField(10); + @$pb.TagNumber(10) + CmdGetWifiStatus ensureCmdGetWifiStatus() => $_ensure(1); + + @$pb.TagNumber(11) + RespGetWifiStatus get respGetWifiStatus => $_getN(2); + @$pb.TagNumber(11) + set respGetWifiStatus(RespGetWifiStatus value) => $_setField(11, value); + @$pb.TagNumber(11) + $core.bool hasRespGetWifiStatus() => $_has(2); + @$pb.TagNumber(11) + void clearRespGetWifiStatus() => $_clearField(11); + @$pb.TagNumber(11) + RespGetWifiStatus ensureRespGetWifiStatus() => $_ensure(2); + + @$pb.TagNumber(12) + CmdSetWifiConfig get cmdSetWifiConfig => $_getN(3); + @$pb.TagNumber(12) + set cmdSetWifiConfig(CmdSetWifiConfig value) => $_setField(12, value); + @$pb.TagNumber(12) + $core.bool hasCmdSetWifiConfig() => $_has(3); + @$pb.TagNumber(12) + void clearCmdSetWifiConfig() => $_clearField(12); + @$pb.TagNumber(12) + CmdSetWifiConfig ensureCmdSetWifiConfig() => $_ensure(3); + + @$pb.TagNumber(13) + RespSetWifiConfig get respSetWifiConfig => $_getN(4); + @$pb.TagNumber(13) + set respSetWifiConfig(RespSetWifiConfig value) => $_setField(13, value); + @$pb.TagNumber(13) + $core.bool hasRespSetWifiConfig() => $_has(4); + @$pb.TagNumber(13) + void clearRespSetWifiConfig() => $_clearField(13); + @$pb.TagNumber(13) + RespSetWifiConfig ensureRespSetWifiConfig() => $_ensure(4); + + @$pb.TagNumber(14) + CmdApplyWifiConfig get cmdApplyWifiConfig => $_getN(5); + @$pb.TagNumber(14) + set cmdApplyWifiConfig(CmdApplyWifiConfig value) => $_setField(14, value); + @$pb.TagNumber(14) + $core.bool hasCmdApplyWifiConfig() => $_has(5); + @$pb.TagNumber(14) + void clearCmdApplyWifiConfig() => $_clearField(14); + @$pb.TagNumber(14) + CmdApplyWifiConfig ensureCmdApplyWifiConfig() => $_ensure(5); + + @$pb.TagNumber(15) + RespApplyWifiConfig get respApplyWifiConfig => $_getN(6); + @$pb.TagNumber(15) + set respApplyWifiConfig(RespApplyWifiConfig value) => $_setField(15, value); + @$pb.TagNumber(15) + $core.bool hasRespApplyWifiConfig() => $_has(6); + @$pb.TagNumber(15) + void clearRespApplyWifiConfig() => $_clearField(15); + @$pb.TagNumber(15) + RespApplyWifiConfig ensureRespApplyWifiConfig() => $_ensure(6); + + @$pb.TagNumber(16) + CmdGetThreadStatus get cmdGetThreadStatus => $_getN(7); + @$pb.TagNumber(16) + set cmdGetThreadStatus(CmdGetThreadStatus value) => $_setField(16, value); + @$pb.TagNumber(16) + $core.bool hasCmdGetThreadStatus() => $_has(7); + @$pb.TagNumber(16) + void clearCmdGetThreadStatus() => $_clearField(16); + @$pb.TagNumber(16) + CmdGetThreadStatus ensureCmdGetThreadStatus() => $_ensure(7); + + @$pb.TagNumber(17) + RespGetThreadStatus get respGetThreadStatus => $_getN(8); + @$pb.TagNumber(17) + set respGetThreadStatus(RespGetThreadStatus value) => $_setField(17, value); + @$pb.TagNumber(17) + $core.bool hasRespGetThreadStatus() => $_has(8); + @$pb.TagNumber(17) + void clearRespGetThreadStatus() => $_clearField(17); + @$pb.TagNumber(17) + RespGetThreadStatus ensureRespGetThreadStatus() => $_ensure(8); + + @$pb.TagNumber(18) + CmdSetThreadConfig get cmdSetThreadConfig => $_getN(9); + @$pb.TagNumber(18) + set cmdSetThreadConfig(CmdSetThreadConfig value) => $_setField(18, value); + @$pb.TagNumber(18) + $core.bool hasCmdSetThreadConfig() => $_has(9); + @$pb.TagNumber(18) + void clearCmdSetThreadConfig() => $_clearField(18); + @$pb.TagNumber(18) + CmdSetThreadConfig ensureCmdSetThreadConfig() => $_ensure(9); + + @$pb.TagNumber(19) + RespSetThreadConfig get respSetThreadConfig => $_getN(10); + @$pb.TagNumber(19) + set respSetThreadConfig(RespSetThreadConfig value) => $_setField(19, value); + @$pb.TagNumber(19) + $core.bool hasRespSetThreadConfig() => $_has(10); + @$pb.TagNumber(19) + void clearRespSetThreadConfig() => $_clearField(19); + @$pb.TagNumber(19) + RespSetThreadConfig ensureRespSetThreadConfig() => $_ensure(10); + + @$pb.TagNumber(20) + CmdApplyThreadConfig get cmdApplyThreadConfig => $_getN(11); + @$pb.TagNumber(20) + set cmdApplyThreadConfig(CmdApplyThreadConfig value) => $_setField(20, value); + @$pb.TagNumber(20) + $core.bool hasCmdApplyThreadConfig() => $_has(11); + @$pb.TagNumber(20) + void clearCmdApplyThreadConfig() => $_clearField(20); + @$pb.TagNumber(20) + CmdApplyThreadConfig ensureCmdApplyThreadConfig() => $_ensure(11); + + @$pb.TagNumber(21) + RespApplyThreadConfig get respApplyThreadConfig => $_getN(12); + @$pb.TagNumber(21) + set respApplyThreadConfig(RespApplyThreadConfig value) => + $_setField(21, value); + @$pb.TagNumber(21) + $core.bool hasRespApplyThreadConfig() => $_has(12); + @$pb.TagNumber(21) + void clearRespApplyThreadConfig() => $_clearField(21); + @$pb.TagNumber(21) + RespApplyThreadConfig ensureRespApplyThreadConfig() => $_ensure(12); +} + +const $core.bool _omitFieldNames = + $core.bool.fromEnvironment('protobuf.omit_field_names'); +const $core.bool _omitMessageNames = + $core.bool.fromEnvironment('protobuf.omit_message_names'); diff --git a/lib/generated/network_config.pbenum.dart b/lib/generated/network_config.pbenum.dart new file mode 100644 index 0000000..ee52a85 --- /dev/null +++ b/lib/generated/network_config.pbenum.dart @@ -0,0 +1,72 @@ +// This is a generated file - do not edit. +// +// Generated from network_config.proto. + +// @dart = 3.3 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names +// ignore_for_file: curly_braces_in_flow_control_structures +// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_relative_imports + +import 'dart:core' as $core; + +import 'package:protobuf/protobuf.dart' as $pb; + +class NetworkConfigMsgType extends $pb.ProtobufEnum { + static const NetworkConfigMsgType TypeCmdGetWifiStatus = + NetworkConfigMsgType._(0, _omitEnumNames ? '' : 'TypeCmdGetWifiStatus'); + static const NetworkConfigMsgType TypeRespGetWifiStatus = + NetworkConfigMsgType._(1, _omitEnumNames ? '' : 'TypeRespGetWifiStatus'); + static const NetworkConfigMsgType TypeCmdSetWifiConfig = + NetworkConfigMsgType._(2, _omitEnumNames ? '' : 'TypeCmdSetWifiConfig'); + static const NetworkConfigMsgType TypeRespSetWifiConfig = + NetworkConfigMsgType._(3, _omitEnumNames ? '' : 'TypeRespSetWifiConfig'); + static const NetworkConfigMsgType TypeCmdApplyWifiConfig = + NetworkConfigMsgType._(4, _omitEnumNames ? '' : 'TypeCmdApplyWifiConfig'); + static const NetworkConfigMsgType TypeRespApplyWifiConfig = + NetworkConfigMsgType._( + 5, _omitEnumNames ? '' : 'TypeRespApplyWifiConfig'); + static const NetworkConfigMsgType TypeCmdGetThreadStatus = + NetworkConfigMsgType._(6, _omitEnumNames ? '' : 'TypeCmdGetThreadStatus'); + static const NetworkConfigMsgType TypeRespGetThreadStatus = + NetworkConfigMsgType._( + 7, _omitEnumNames ? '' : 'TypeRespGetThreadStatus'); + static const NetworkConfigMsgType TypeCmdSetThreadConfig = + NetworkConfigMsgType._(8, _omitEnumNames ? '' : 'TypeCmdSetThreadConfig'); + static const NetworkConfigMsgType TypeRespSetThreadConfig = + NetworkConfigMsgType._( + 9, _omitEnumNames ? '' : 'TypeRespSetThreadConfig'); + static const NetworkConfigMsgType TypeCmdApplyThreadConfig = + NetworkConfigMsgType._( + 10, _omitEnumNames ? '' : 'TypeCmdApplyThreadConfig'); + static const NetworkConfigMsgType TypeRespApplyThreadConfig = + NetworkConfigMsgType._( + 11, _omitEnumNames ? '' : 'TypeRespApplyThreadConfig'); + + static const $core.List values = [ + TypeCmdGetWifiStatus, + TypeRespGetWifiStatus, + TypeCmdSetWifiConfig, + TypeRespSetWifiConfig, + TypeCmdApplyWifiConfig, + TypeRespApplyWifiConfig, + TypeCmdGetThreadStatus, + TypeRespGetThreadStatus, + TypeCmdSetThreadConfig, + TypeRespSetThreadConfig, + TypeCmdApplyThreadConfig, + TypeRespApplyThreadConfig, + ]; + + static final $core.List _byValue = + $pb.ProtobufEnum.$_initByValueList(values, 11); + static NetworkConfigMsgType? valueOf($core.int value) => + value < 0 || value >= _byValue.length ? null : _byValue[value]; + + const NetworkConfigMsgType._(super.value, super.name); +} + +const $core.bool _omitEnumNames = + $core.bool.fromEnvironment('protobuf.omit_enum_names'); diff --git a/lib/generated/network_config.pbjson.dart b/lib/generated/network_config.pbjson.dart new file mode 100644 index 0000000..36221f2 --- /dev/null +++ b/lib/generated/network_config.pbjson.dart @@ -0,0 +1,407 @@ +// This is a generated file - do not edit. +// +// Generated from network_config.proto. + +// @dart = 3.3 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names +// ignore_for_file: curly_braces_in_flow_control_structures +// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_relative_imports +// ignore_for_file: unused_import + +import 'dart:convert' as $convert; +import 'dart:core' as $core; +import 'dart:typed_data' as $typed_data; + +@$core.Deprecated('Use networkConfigMsgTypeDescriptor instead') +const NetworkConfigMsgType$json = { + '1': 'NetworkConfigMsgType', + '2': [ + {'1': 'TypeCmdGetWifiStatus', '2': 0}, + {'1': 'TypeRespGetWifiStatus', '2': 1}, + {'1': 'TypeCmdSetWifiConfig', '2': 2}, + {'1': 'TypeRespSetWifiConfig', '2': 3}, + {'1': 'TypeCmdApplyWifiConfig', '2': 4}, + {'1': 'TypeRespApplyWifiConfig', '2': 5}, + {'1': 'TypeCmdGetThreadStatus', '2': 6}, + {'1': 'TypeRespGetThreadStatus', '2': 7}, + {'1': 'TypeCmdSetThreadConfig', '2': 8}, + {'1': 'TypeRespSetThreadConfig', '2': 9}, + {'1': 'TypeCmdApplyThreadConfig', '2': 10}, + {'1': 'TypeRespApplyThreadConfig', '2': 11}, + ], +}; + +/// Descriptor for `NetworkConfigMsgType`. Decode as a `google.protobuf.EnumDescriptorProto`. +final $typed_data.Uint8List networkConfigMsgTypeDescriptor = $convert.base64Decode( + 'ChROZXR3b3JrQ29uZmlnTXNnVHlwZRIYChRUeXBlQ21kR2V0V2lmaVN0YXR1cxAAEhkKFVR5cG' + 'VSZXNwR2V0V2lmaVN0YXR1cxABEhgKFFR5cGVDbWRTZXRXaWZpQ29uZmlnEAISGQoVVHlwZVJl' + 'c3BTZXRXaWZpQ29uZmlnEAMSGgoWVHlwZUNtZEFwcGx5V2lmaUNvbmZpZxAEEhsKF1R5cGVSZX' + 'NwQXBwbHlXaWZpQ29uZmlnEAUSGgoWVHlwZUNtZEdldFRocmVhZFN0YXR1cxAGEhsKF1R5cGVS' + 'ZXNwR2V0VGhyZWFkU3RhdHVzEAcSGgoWVHlwZUNtZFNldFRocmVhZENvbmZpZxAIEhsKF1R5cG' + 'VSZXNwU2V0VGhyZWFkQ29uZmlnEAkSHAoYVHlwZUNtZEFwcGx5VGhyZWFkQ29uZmlnEAoSHQoZ' + 'VHlwZVJlc3BBcHBseVRocmVhZENvbmZpZxAL'); + +@$core.Deprecated('Use cmdGetWifiStatusDescriptor instead') +const CmdGetWifiStatus$json = { + '1': 'CmdGetWifiStatus', +}; + +/// Descriptor for `CmdGetWifiStatus`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List cmdGetWifiStatusDescriptor = + $convert.base64Decode('ChBDbWRHZXRXaWZpU3RhdHVz'); + +@$core.Deprecated('Use respGetWifiStatusDescriptor instead') +const RespGetWifiStatus$json = { + '1': 'RespGetWifiStatus', + '2': [ + {'1': 'status', '3': 1, '4': 1, '5': 14, '6': '.Status', '10': 'status'}, + { + '1': 'wifi_sta_state', + '3': 2, + '4': 1, + '5': 14, + '6': '.WifiStationState', + '10': 'wifiStaState' + }, + { + '1': 'wifi_fail_reason', + '3': 10, + '4': 1, + '5': 14, + '6': '.WifiConnectFailedReason', + '9': 0, + '10': 'wifiFailReason' + }, + { + '1': 'wifi_connected', + '3': 11, + '4': 1, + '5': 11, + '6': '.WifiConnectedState', + '9': 0, + '10': 'wifiConnected' + }, + { + '1': 'attempt_failed', + '3': 12, + '4': 1, + '5': 11, + '6': '.WifiAttemptFailed', + '9': 0, + '10': 'attemptFailed' + }, + ], + '8': [ + {'1': 'state'}, + ], +}; + +/// Descriptor for `RespGetWifiStatus`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List respGetWifiStatusDescriptor = $convert.base64Decode( + 'ChFSZXNwR2V0V2lmaVN0YXR1cxIfCgZzdGF0dXMYASABKA4yBy5TdGF0dXNSBnN0YXR1cxI3Cg' + '53aWZpX3N0YV9zdGF0ZRgCIAEoDjIRLldpZmlTdGF0aW9uU3RhdGVSDHdpZmlTdGFTdGF0ZRJE' + 'ChB3aWZpX2ZhaWxfcmVhc29uGAogASgOMhguV2lmaUNvbm5lY3RGYWlsZWRSZWFzb25IAFIOd2' + 'lmaUZhaWxSZWFzb24SPAoOd2lmaV9jb25uZWN0ZWQYCyABKAsyEy5XaWZpQ29ubmVjdGVkU3Rh' + 'dGVIAFINd2lmaUNvbm5lY3RlZBI7Cg5hdHRlbXB0X2ZhaWxlZBgMIAEoCzISLldpZmlBdHRlbX' + 'B0RmFpbGVkSABSDWF0dGVtcHRGYWlsZWRCBwoFc3RhdGU='); + +@$core.Deprecated('Use cmdGetThreadStatusDescriptor instead') +const CmdGetThreadStatus$json = { + '1': 'CmdGetThreadStatus', +}; + +/// Descriptor for `CmdGetThreadStatus`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List cmdGetThreadStatusDescriptor = + $convert.base64Decode('ChJDbWRHZXRUaHJlYWRTdGF0dXM='); + +@$core.Deprecated('Use respGetThreadStatusDescriptor instead') +const RespGetThreadStatus$json = { + '1': 'RespGetThreadStatus', + '2': [ + {'1': 'status', '3': 1, '4': 1, '5': 14, '6': '.Status', '10': 'status'}, + { + '1': 'thread_state', + '3': 2, + '4': 1, + '5': 14, + '6': '.ThreadNetworkState', + '10': 'threadState' + }, + { + '1': 'thread_fail_reason', + '3': 10, + '4': 1, + '5': 14, + '6': '.ThreadAttachFailedReason', + '9': 0, + '10': 'threadFailReason' + }, + { + '1': 'thread_attached', + '3': 11, + '4': 1, + '5': 11, + '6': '.ThreadAttachState', + '9': 0, + '10': 'threadAttached' + }, + ], + '8': [ + {'1': 'state'}, + ], +}; + +/// Descriptor for `RespGetThreadStatus`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List respGetThreadStatusDescriptor = $convert.base64Decode( + 'ChNSZXNwR2V0VGhyZWFkU3RhdHVzEh8KBnN0YXR1cxgBIAEoDjIHLlN0YXR1c1IGc3RhdHVzEj' + 'YKDHRocmVhZF9zdGF0ZRgCIAEoDjITLlRocmVhZE5ldHdvcmtTdGF0ZVILdGhyZWFkU3RhdGUS' + 'SQoSdGhyZWFkX2ZhaWxfcmVhc29uGAogASgOMhkuVGhyZWFkQXR0YWNoRmFpbGVkUmVhc29uSA' + 'BSEHRocmVhZEZhaWxSZWFzb24SPQoPdGhyZWFkX2F0dGFjaGVkGAsgASgLMhIuVGhyZWFkQXR0' + 'YWNoU3RhdGVIAFIOdGhyZWFkQXR0YWNoZWRCBwoFc3RhdGU='); + +@$core.Deprecated('Use cmdSetWifiConfigDescriptor instead') +const CmdSetWifiConfig$json = { + '1': 'CmdSetWifiConfig', + '2': [ + {'1': 'ssid', '3': 1, '4': 1, '5': 12, '10': 'ssid'}, + {'1': 'passphrase', '3': 2, '4': 1, '5': 12, '10': 'passphrase'}, + {'1': 'bssid', '3': 3, '4': 1, '5': 12, '10': 'bssid'}, + {'1': 'channel', '3': 4, '4': 1, '5': 5, '10': 'channel'}, + ], +}; + +/// Descriptor for `CmdSetWifiConfig`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List cmdSetWifiConfigDescriptor = $convert.base64Decode( + 'ChBDbWRTZXRXaWZpQ29uZmlnEhIKBHNzaWQYASABKAxSBHNzaWQSHgoKcGFzc3BocmFzZRgCIA' + 'EoDFIKcGFzc3BocmFzZRIUCgVic3NpZBgDIAEoDFIFYnNzaWQSGAoHY2hhbm5lbBgEIAEoBVIH' + 'Y2hhbm5lbA=='); + +@$core.Deprecated('Use cmdSetThreadConfigDescriptor instead') +const CmdSetThreadConfig$json = { + '1': 'CmdSetThreadConfig', + '2': [ + {'1': 'dataset', '3': 1, '4': 1, '5': 12, '10': 'dataset'}, + ], +}; + +/// Descriptor for `CmdSetThreadConfig`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List cmdSetThreadConfigDescriptor = + $convert.base64Decode( + 'ChJDbWRTZXRUaHJlYWRDb25maWcSGAoHZGF0YXNldBgBIAEoDFIHZGF0YXNldA=='); + +@$core.Deprecated('Use respSetWifiConfigDescriptor instead') +const RespSetWifiConfig$json = { + '1': 'RespSetWifiConfig', + '2': [ + {'1': 'status', '3': 1, '4': 1, '5': 14, '6': '.Status', '10': 'status'}, + ], +}; + +/// Descriptor for `RespSetWifiConfig`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List respSetWifiConfigDescriptor = $convert.base64Decode( + 'ChFSZXNwU2V0V2lmaUNvbmZpZxIfCgZzdGF0dXMYASABKA4yBy5TdGF0dXNSBnN0YXR1cw=='); + +@$core.Deprecated('Use respSetThreadConfigDescriptor instead') +const RespSetThreadConfig$json = { + '1': 'RespSetThreadConfig', + '2': [ + {'1': 'status', '3': 1, '4': 1, '5': 14, '6': '.Status', '10': 'status'}, + ], +}; + +/// Descriptor for `RespSetThreadConfig`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List respSetThreadConfigDescriptor = $convert.base64Decode( + 'ChNSZXNwU2V0VGhyZWFkQ29uZmlnEh8KBnN0YXR1cxgBIAEoDjIHLlN0YXR1c1IGc3RhdHVz'); + +@$core.Deprecated('Use cmdApplyWifiConfigDescriptor instead') +const CmdApplyWifiConfig$json = { + '1': 'CmdApplyWifiConfig', +}; + +/// Descriptor for `CmdApplyWifiConfig`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List cmdApplyWifiConfigDescriptor = + $convert.base64Decode('ChJDbWRBcHBseVdpZmlDb25maWc='); + +@$core.Deprecated('Use cmdApplyThreadConfigDescriptor instead') +const CmdApplyThreadConfig$json = { + '1': 'CmdApplyThreadConfig', +}; + +/// Descriptor for `CmdApplyThreadConfig`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List cmdApplyThreadConfigDescriptor = + $convert.base64Decode('ChRDbWRBcHBseVRocmVhZENvbmZpZw=='); + +@$core.Deprecated('Use respApplyWifiConfigDescriptor instead') +const RespApplyWifiConfig$json = { + '1': 'RespApplyWifiConfig', + '2': [ + {'1': 'status', '3': 1, '4': 1, '5': 14, '6': '.Status', '10': 'status'}, + ], +}; + +/// Descriptor for `RespApplyWifiConfig`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List respApplyWifiConfigDescriptor = $convert.base64Decode( + 'ChNSZXNwQXBwbHlXaWZpQ29uZmlnEh8KBnN0YXR1cxgBIAEoDjIHLlN0YXR1c1IGc3RhdHVz'); + +@$core.Deprecated('Use respApplyThreadConfigDescriptor instead') +const RespApplyThreadConfig$json = { + '1': 'RespApplyThreadConfig', + '2': [ + {'1': 'status', '3': 1, '4': 1, '5': 14, '6': '.Status', '10': 'status'}, + ], +}; + +/// Descriptor for `RespApplyThreadConfig`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List respApplyThreadConfigDescriptor = $convert.base64Decode( + 'ChVSZXNwQXBwbHlUaHJlYWRDb25maWcSHwoGc3RhdHVzGAEgASgOMgcuU3RhdHVzUgZzdGF0dX' + 'M='); + +@$core.Deprecated('Use networkConfigPayloadDescriptor instead') +const NetworkConfigPayload$json = { + '1': 'NetworkConfigPayload', + '2': [ + { + '1': 'msg', + '3': 1, + '4': 1, + '5': 14, + '6': '.NetworkConfigMsgType', + '10': 'msg' + }, + { + '1': 'cmd_get_wifi_status', + '3': 10, + '4': 1, + '5': 11, + '6': '.CmdGetWifiStatus', + '9': 0, + '10': 'cmdGetWifiStatus' + }, + { + '1': 'resp_get_wifi_status', + '3': 11, + '4': 1, + '5': 11, + '6': '.RespGetWifiStatus', + '9': 0, + '10': 'respGetWifiStatus' + }, + { + '1': 'cmd_set_wifi_config', + '3': 12, + '4': 1, + '5': 11, + '6': '.CmdSetWifiConfig', + '9': 0, + '10': 'cmdSetWifiConfig' + }, + { + '1': 'resp_set_wifi_config', + '3': 13, + '4': 1, + '5': 11, + '6': '.RespSetWifiConfig', + '9': 0, + '10': 'respSetWifiConfig' + }, + { + '1': 'cmd_apply_wifi_config', + '3': 14, + '4': 1, + '5': 11, + '6': '.CmdApplyWifiConfig', + '9': 0, + '10': 'cmdApplyWifiConfig' + }, + { + '1': 'resp_apply_wifi_config', + '3': 15, + '4': 1, + '5': 11, + '6': '.RespApplyWifiConfig', + '9': 0, + '10': 'respApplyWifiConfig' + }, + { + '1': 'cmd_get_thread_status', + '3': 16, + '4': 1, + '5': 11, + '6': '.CmdGetThreadStatus', + '9': 0, + '10': 'cmdGetThreadStatus' + }, + { + '1': 'resp_get_thread_status', + '3': 17, + '4': 1, + '5': 11, + '6': '.RespGetThreadStatus', + '9': 0, + '10': 'respGetThreadStatus' + }, + { + '1': 'cmd_set_thread_config', + '3': 18, + '4': 1, + '5': 11, + '6': '.CmdSetThreadConfig', + '9': 0, + '10': 'cmdSetThreadConfig' + }, + { + '1': 'resp_set_thread_config', + '3': 19, + '4': 1, + '5': 11, + '6': '.RespSetThreadConfig', + '9': 0, + '10': 'respSetThreadConfig' + }, + { + '1': 'cmd_apply_thread_config', + '3': 20, + '4': 1, + '5': 11, + '6': '.CmdApplyThreadConfig', + '9': 0, + '10': 'cmdApplyThreadConfig' + }, + { + '1': 'resp_apply_thread_config', + '3': 21, + '4': 1, + '5': 11, + '6': '.RespApplyThreadConfig', + '9': 0, + '10': 'respApplyThreadConfig' + }, + ], + '8': [ + {'1': 'payload'}, + ], +}; + +/// Descriptor for `NetworkConfigPayload`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List networkConfigPayloadDescriptor = $convert.base64Decode( + 'ChROZXR3b3JrQ29uZmlnUGF5bG9hZBInCgNtc2cYASABKA4yFS5OZXR3b3JrQ29uZmlnTXNnVH' + 'lwZVIDbXNnEkIKE2NtZF9nZXRfd2lmaV9zdGF0dXMYCiABKAsyES5DbWRHZXRXaWZpU3RhdHVz' + 'SABSEGNtZEdldFdpZmlTdGF0dXMSRQoUcmVzcF9nZXRfd2lmaV9zdGF0dXMYCyABKAsyEi5SZX' + 'NwR2V0V2lmaVN0YXR1c0gAUhFyZXNwR2V0V2lmaVN0YXR1cxJCChNjbWRfc2V0X3dpZmlfY29u' + 'ZmlnGAwgASgLMhEuQ21kU2V0V2lmaUNvbmZpZ0gAUhBjbWRTZXRXaWZpQ29uZmlnEkUKFHJlc3' + 'Bfc2V0X3dpZmlfY29uZmlnGA0gASgLMhIuUmVzcFNldFdpZmlDb25maWdIAFIRcmVzcFNldFdp' + 'ZmlDb25maWcSSAoVY21kX2FwcGx5X3dpZmlfY29uZmlnGA4gASgLMhMuQ21kQXBwbHlXaWZpQ2' + '9uZmlnSABSEmNtZEFwcGx5V2lmaUNvbmZpZxJLChZyZXNwX2FwcGx5X3dpZmlfY29uZmlnGA8g' + 'ASgLMhQuUmVzcEFwcGx5V2lmaUNvbmZpZ0gAUhNyZXNwQXBwbHlXaWZpQ29uZmlnEkgKFWNtZF' + '9nZXRfdGhyZWFkX3N0YXR1cxgQIAEoCzITLkNtZEdldFRocmVhZFN0YXR1c0gAUhJjbWRHZXRU' + 'aHJlYWRTdGF0dXMSSwoWcmVzcF9nZXRfdGhyZWFkX3N0YXR1cxgRIAEoCzIULlJlc3BHZXRUaH' + 'JlYWRTdGF0dXNIAFITcmVzcEdldFRocmVhZFN0YXR1cxJIChVjbWRfc2V0X3RocmVhZF9jb25m' + 'aWcYEiABKAsyEy5DbWRTZXRUaHJlYWRDb25maWdIAFISY21kU2V0VGhyZWFkQ29uZmlnEksKFn' + 'Jlc3Bfc2V0X3RocmVhZF9jb25maWcYEyABKAsyFC5SZXNwU2V0VGhyZWFkQ29uZmlnSABSE3Jl' + 'c3BTZXRUaHJlYWRDb25maWcSTgoXY21kX2FwcGx5X3RocmVhZF9jb25maWcYFCABKAsyFS5DbW' + 'RBcHBseVRocmVhZENvbmZpZ0gAUhRjbWRBcHBseVRocmVhZENvbmZpZxJRChhyZXNwX2FwcGx5' + 'X3RocmVhZF9jb25maWcYFSABKAsyFi5SZXNwQXBwbHlUaHJlYWRDb25maWdIAFIVcmVzcEFwcG' + 'x5VGhyZWFkQ29uZmlnQgkKB3BheWxvYWQ='); diff --git a/lib/generated/network_constants.pb.dart b/lib/generated/network_constants.pb.dart new file mode 100644 index 0000000..70d734b --- /dev/null +++ b/lib/generated/network_constants.pb.dart @@ -0,0 +1,274 @@ +// This is a generated file - do not edit. +// +// Generated from network_constants.proto. + +// @dart = 3.3 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names +// ignore_for_file: curly_braces_in_flow_control_structures +// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_relative_imports + +import 'dart:core' as $core; + +import 'package:protobuf/protobuf.dart' as $pb; + +import 'network_constants.pbenum.dart'; + +export 'package:protobuf/protobuf.dart' show GeneratedMessageGenericExtensions; + +export 'network_constants.pbenum.dart'; + +class WifiConnectedState extends $pb.GeneratedMessage { + factory WifiConnectedState({ + $core.String? ip4Addr, + WifiAuthMode? authMode, + $core.List<$core.int>? ssid, + $core.List<$core.int>? bssid, + $core.int? channel, + }) { + final result = create(); + if (ip4Addr != null) result.ip4Addr = ip4Addr; + if (authMode != null) result.authMode = authMode; + if (ssid != null) result.ssid = ssid; + if (bssid != null) result.bssid = bssid; + if (channel != null) result.channel = channel; + return result; + } + + WifiConnectedState._(); + + factory WifiConnectedState.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory WifiConnectedState.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'WifiConnectedState', + createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'ip4Addr') + ..aE(2, _omitFieldNames ? '' : 'authMode', + enumValues: WifiAuthMode.values) + ..a<$core.List<$core.int>>( + 3, _omitFieldNames ? '' : 'ssid', $pb.PbFieldType.OY) + ..a<$core.List<$core.int>>( + 4, _omitFieldNames ? '' : 'bssid', $pb.PbFieldType.OY) + ..aI(5, _omitFieldNames ? '' : 'channel') + ..hasRequiredFields = false; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + WifiConnectedState clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + WifiConnectedState copyWith(void Function(WifiConnectedState) updates) => + super.copyWith((message) => updates(message as WifiConnectedState)) + as WifiConnectedState; + + @$core.override + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static WifiConnectedState create() => WifiConnectedState._(); + @$core.override + WifiConnectedState createEmptyInstance() => create(); + @$core.pragma('dart2js:noInline') + static WifiConnectedState getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(create); + static WifiConnectedState? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get ip4Addr => $_getSZ(0); + @$pb.TagNumber(1) + set ip4Addr($core.String value) => $_setString(0, value); + @$pb.TagNumber(1) + $core.bool hasIp4Addr() => $_has(0); + @$pb.TagNumber(1) + void clearIp4Addr() => $_clearField(1); + + @$pb.TagNumber(2) + WifiAuthMode get authMode => $_getN(1); + @$pb.TagNumber(2) + set authMode(WifiAuthMode value) => $_setField(2, value); + @$pb.TagNumber(2) + $core.bool hasAuthMode() => $_has(1); + @$pb.TagNumber(2) + void clearAuthMode() => $_clearField(2); + + @$pb.TagNumber(3) + $core.List<$core.int> get ssid => $_getN(2); + @$pb.TagNumber(3) + set ssid($core.List<$core.int> value) => $_setBytes(2, value); + @$pb.TagNumber(3) + $core.bool hasSsid() => $_has(2); + @$pb.TagNumber(3) + void clearSsid() => $_clearField(3); + + @$pb.TagNumber(4) + $core.List<$core.int> get bssid => $_getN(3); + @$pb.TagNumber(4) + set bssid($core.List<$core.int> value) => $_setBytes(3, value); + @$pb.TagNumber(4) + $core.bool hasBssid() => $_has(3); + @$pb.TagNumber(4) + void clearBssid() => $_clearField(4); + + @$pb.TagNumber(5) + $core.int get channel => $_getIZ(4); + @$pb.TagNumber(5) + set channel($core.int value) => $_setSignedInt32(4, value); + @$pb.TagNumber(5) + $core.bool hasChannel() => $_has(4); + @$pb.TagNumber(5) + void clearChannel() => $_clearField(5); +} + +class WifiAttemptFailed extends $pb.GeneratedMessage { + factory WifiAttemptFailed({ + $core.int? attemptsRemaining, + }) { + final result = create(); + if (attemptsRemaining != null) result.attemptsRemaining = attemptsRemaining; + return result; + } + + WifiAttemptFailed._(); + + factory WifiAttemptFailed.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory WifiAttemptFailed.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'WifiAttemptFailed', + createEmptyInstance: create) + ..aI(1, _omitFieldNames ? '' : 'attemptsRemaining', + fieldType: $pb.PbFieldType.OU3) + ..hasRequiredFields = false; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + WifiAttemptFailed clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + WifiAttemptFailed copyWith(void Function(WifiAttemptFailed) updates) => + super.copyWith((message) => updates(message as WifiAttemptFailed)) + as WifiAttemptFailed; + + @$core.override + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static WifiAttemptFailed create() => WifiAttemptFailed._(); + @$core.override + WifiAttemptFailed createEmptyInstance() => create(); + @$core.pragma('dart2js:noInline') + static WifiAttemptFailed getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(create); + static WifiAttemptFailed? _defaultInstance; + + @$pb.TagNumber(1) + $core.int get attemptsRemaining => $_getIZ(0); + @$pb.TagNumber(1) + set attemptsRemaining($core.int value) => $_setUnsignedInt32(0, value); + @$pb.TagNumber(1) + $core.bool hasAttemptsRemaining() => $_has(0); + @$pb.TagNumber(1) + void clearAttemptsRemaining() => $_clearField(1); +} + +class ThreadAttachState extends $pb.GeneratedMessage { + factory ThreadAttachState({ + $core.int? panId, + $core.List<$core.int>? extPanId, + $core.int? channel, + $core.String? name, + }) { + final result = create(); + if (panId != null) result.panId = panId; + if (extPanId != null) result.extPanId = extPanId; + if (channel != null) result.channel = channel; + if (name != null) result.name = name; + return result; + } + + ThreadAttachState._(); + + factory ThreadAttachState.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory ThreadAttachState.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'ThreadAttachState', + createEmptyInstance: create) + ..aI(1, _omitFieldNames ? '' : 'panId', fieldType: $pb.PbFieldType.OU3) + ..a<$core.List<$core.int>>( + 2, _omitFieldNames ? '' : 'extPanId', $pb.PbFieldType.OY) + ..aI(3, _omitFieldNames ? '' : 'channel', fieldType: $pb.PbFieldType.OU3) + ..aOS(4, _omitFieldNames ? '' : 'name') + ..hasRequiredFields = false; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + ThreadAttachState clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + ThreadAttachState copyWith(void Function(ThreadAttachState) updates) => + super.copyWith((message) => updates(message as ThreadAttachState)) + as ThreadAttachState; + + @$core.override + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static ThreadAttachState create() => ThreadAttachState._(); + @$core.override + ThreadAttachState createEmptyInstance() => create(); + @$core.pragma('dart2js:noInline') + static ThreadAttachState getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(create); + static ThreadAttachState? _defaultInstance; + + @$pb.TagNumber(1) + $core.int get panId => $_getIZ(0); + @$pb.TagNumber(1) + set panId($core.int value) => $_setUnsignedInt32(0, value); + @$pb.TagNumber(1) + $core.bool hasPanId() => $_has(0); + @$pb.TagNumber(1) + void clearPanId() => $_clearField(1); + + @$pb.TagNumber(2) + $core.List<$core.int> get extPanId => $_getN(1); + @$pb.TagNumber(2) + set extPanId($core.List<$core.int> value) => $_setBytes(1, value); + @$pb.TagNumber(2) + $core.bool hasExtPanId() => $_has(1); + @$pb.TagNumber(2) + void clearExtPanId() => $_clearField(2); + + @$pb.TagNumber(3) + $core.int get channel => $_getIZ(2); + @$pb.TagNumber(3) + set channel($core.int value) => $_setUnsignedInt32(2, value); + @$pb.TagNumber(3) + $core.bool hasChannel() => $_has(2); + @$pb.TagNumber(3) + void clearChannel() => $_clearField(3); + + @$pb.TagNumber(4) + $core.String get name => $_getSZ(3); + @$pb.TagNumber(4) + set name($core.String value) => $_setString(3, value); + @$pb.TagNumber(4) + $core.bool hasName() => $_has(3); + @$pb.TagNumber(4) + void clearName() => $_clearField(4); +} + +const $core.bool _omitFieldNames = + $core.bool.fromEnvironment('protobuf.omit_field_names'); +const $core.bool _omitMessageNames = + $core.bool.fromEnvironment('protobuf.omit_message_names'); diff --git a/lib/generated/network_constants.pbenum.dart b/lib/generated/network_constants.pbenum.dart new file mode 100644 index 0000000..11dac25 --- /dev/null +++ b/lib/generated/network_constants.pbenum.dart @@ -0,0 +1,146 @@ +// This is a generated file - do not edit. +// +// Generated from network_constants.proto. + +// @dart = 3.3 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names +// ignore_for_file: curly_braces_in_flow_control_structures +// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_relative_imports + +import 'dart:core' as $core; + +import 'package:protobuf/protobuf.dart' as $pb; + +class WifiStationState extends $pb.ProtobufEnum { + static const WifiStationState Connected = + WifiStationState._(0, _omitEnumNames ? '' : 'Connected'); + static const WifiStationState Connecting = + WifiStationState._(1, _omitEnumNames ? '' : 'Connecting'); + static const WifiStationState Disconnected = + WifiStationState._(2, _omitEnumNames ? '' : 'Disconnected'); + static const WifiStationState ConnectionFailed = + WifiStationState._(3, _omitEnumNames ? '' : 'ConnectionFailed'); + + static const $core.List values = [ + Connected, + Connecting, + Disconnected, + ConnectionFailed, + ]; + + static final $core.List _byValue = + $pb.ProtobufEnum.$_initByValueList(values, 3); + static WifiStationState? valueOf($core.int value) => + value < 0 || value >= _byValue.length ? null : _byValue[value]; + + const WifiStationState._(super.value, super.name); +} + +class WifiConnectFailedReason extends $pb.ProtobufEnum { + static const WifiConnectFailedReason AuthError = + WifiConnectFailedReason._(0, _omitEnumNames ? '' : 'AuthError'); + static const WifiConnectFailedReason WifiNetworkNotFound = + WifiConnectFailedReason._(1, _omitEnumNames ? '' : 'WifiNetworkNotFound'); + + static const $core.List values = + [ + AuthError, + WifiNetworkNotFound, + ]; + + static final $core.List _byValue = + $pb.ProtobufEnum.$_initByValueList(values, 1); + static WifiConnectFailedReason? valueOf($core.int value) => + value < 0 || value >= _byValue.length ? null : _byValue[value]; + + const WifiConnectFailedReason._(super.value, super.name); +} + +class WifiAuthMode extends $pb.ProtobufEnum { + static const WifiAuthMode Open = + WifiAuthMode._(0, _omitEnumNames ? '' : 'Open'); + static const WifiAuthMode WEP = + WifiAuthMode._(1, _omitEnumNames ? '' : 'WEP'); + static const WifiAuthMode WPA_PSK = + WifiAuthMode._(2, _omitEnumNames ? '' : 'WPA_PSK'); + static const WifiAuthMode WPA2_PSK = + WifiAuthMode._(3, _omitEnumNames ? '' : 'WPA2_PSK'); + static const WifiAuthMode WPA_WPA2_PSK = + WifiAuthMode._(4, _omitEnumNames ? '' : 'WPA_WPA2_PSK'); + static const WifiAuthMode WPA2_ENTERPRISE = + WifiAuthMode._(5, _omitEnumNames ? '' : 'WPA2_ENTERPRISE'); + static const WifiAuthMode WPA3_PSK = + WifiAuthMode._(6, _omitEnumNames ? '' : 'WPA3_PSK'); + static const WifiAuthMode WPA2_WPA3_PSK = + WifiAuthMode._(7, _omitEnumNames ? '' : 'WPA2_WPA3_PSK'); + + static const $core.List values = [ + Open, + WEP, + WPA_PSK, + WPA2_PSK, + WPA_WPA2_PSK, + WPA2_ENTERPRISE, + WPA3_PSK, + WPA2_WPA3_PSK, + ]; + + static final $core.List _byValue = + $pb.ProtobufEnum.$_initByValueList(values, 7); + static WifiAuthMode? valueOf($core.int value) => + value < 0 || value >= _byValue.length ? null : _byValue[value]; + + const WifiAuthMode._(super.value, super.name); +} + +class ThreadNetworkState extends $pb.ProtobufEnum { + static const ThreadNetworkState Attached = + ThreadNetworkState._(0, _omitEnumNames ? '' : 'Attached'); + static const ThreadNetworkState Attaching = + ThreadNetworkState._(1, _omitEnumNames ? '' : 'Attaching'); + static const ThreadNetworkState Dettached = + ThreadNetworkState._(2, _omitEnumNames ? '' : 'Dettached'); + static const ThreadNetworkState AttachingFailed = + ThreadNetworkState._(3, _omitEnumNames ? '' : 'AttachingFailed'); + + static const $core.List values = [ + Attached, + Attaching, + Dettached, + AttachingFailed, + ]; + + static final $core.List _byValue = + $pb.ProtobufEnum.$_initByValueList(values, 3); + static ThreadNetworkState? valueOf($core.int value) => + value < 0 || value >= _byValue.length ? null : _byValue[value]; + + const ThreadNetworkState._(super.value, super.name); +} + +class ThreadAttachFailedReason extends $pb.ProtobufEnum { + static const ThreadAttachFailedReason DatasetInvalid = + ThreadAttachFailedReason._(0, _omitEnumNames ? '' : 'DatasetInvalid'); + static const ThreadAttachFailedReason ThreadNetworkNotFound = + ThreadAttachFailedReason._( + 1, _omitEnumNames ? '' : 'ThreadNetworkNotFound'); + + static const $core.List values = + [ + DatasetInvalid, + ThreadNetworkNotFound, + ]; + + static final $core.List _byValue = + $pb.ProtobufEnum.$_initByValueList(values, 1); + static ThreadAttachFailedReason? valueOf($core.int value) => + value < 0 || value >= _byValue.length ? null : _byValue[value]; + + const ThreadAttachFailedReason._(super.value, super.name); +} + +const $core.bool _omitEnumNames = + $core.bool.fromEnvironment('protobuf.omit_enum_names'); diff --git a/lib/generated/network_constants.pbjson.dart b/lib/generated/network_constants.pbjson.dart new file mode 100644 index 0000000..de0d566 --- /dev/null +++ b/lib/generated/network_constants.pbjson.dart @@ -0,0 +1,160 @@ +// This is a generated file - do not edit. +// +// Generated from network_constants.proto. + +// @dart = 3.3 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names +// ignore_for_file: curly_braces_in_flow_control_structures +// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_relative_imports +// ignore_for_file: unused_import + +import 'dart:convert' as $convert; +import 'dart:core' as $core; +import 'dart:typed_data' as $typed_data; + +@$core.Deprecated('Use wifiStationStateDescriptor instead') +const WifiStationState$json = { + '1': 'WifiStationState', + '2': [ + {'1': 'Connected', '2': 0}, + {'1': 'Connecting', '2': 1}, + {'1': 'Disconnected', '2': 2}, + {'1': 'ConnectionFailed', '2': 3}, + ], +}; + +/// Descriptor for `WifiStationState`. Decode as a `google.protobuf.EnumDescriptorProto`. +final $typed_data.Uint8List wifiStationStateDescriptor = $convert.base64Decode( + 'ChBXaWZpU3RhdGlvblN0YXRlEg0KCUNvbm5lY3RlZBAAEg4KCkNvbm5lY3RpbmcQARIQCgxEaX' + 'Njb25uZWN0ZWQQAhIUChBDb25uZWN0aW9uRmFpbGVkEAM='); + +@$core.Deprecated('Use wifiConnectFailedReasonDescriptor instead') +const WifiConnectFailedReason$json = { + '1': 'WifiConnectFailedReason', + '2': [ + {'1': 'AuthError', '2': 0}, + {'1': 'WifiNetworkNotFound', '2': 1}, + ], +}; + +/// Descriptor for `WifiConnectFailedReason`. Decode as a `google.protobuf.EnumDescriptorProto`. +final $typed_data.Uint8List wifiConnectFailedReasonDescriptor = + $convert.base64Decode( + 'ChdXaWZpQ29ubmVjdEZhaWxlZFJlYXNvbhINCglBdXRoRXJyb3IQABIXChNXaWZpTmV0d29ya0' + '5vdEZvdW5kEAE='); + +@$core.Deprecated('Use wifiAuthModeDescriptor instead') +const WifiAuthMode$json = { + '1': 'WifiAuthMode', + '2': [ + {'1': 'Open', '2': 0}, + {'1': 'WEP', '2': 1}, + {'1': 'WPA_PSK', '2': 2}, + {'1': 'WPA2_PSK', '2': 3}, + {'1': 'WPA_WPA2_PSK', '2': 4}, + {'1': 'WPA2_ENTERPRISE', '2': 5}, + {'1': 'WPA3_PSK', '2': 6}, + {'1': 'WPA2_WPA3_PSK', '2': 7}, + ], +}; + +/// Descriptor for `WifiAuthMode`. Decode as a `google.protobuf.EnumDescriptorProto`. +final $typed_data.Uint8List wifiAuthModeDescriptor = $convert.base64Decode( + 'CgxXaWZpQXV0aE1vZGUSCAoET3BlbhAAEgcKA1dFUBABEgsKB1dQQV9QU0sQAhIMCghXUEEyX1' + 'BTSxADEhAKDFdQQV9XUEEyX1BTSxAEEhMKD1dQQTJfRU5URVJQUklTRRAFEgwKCFdQQTNfUFNL' + 'EAYSEQoNV1BBMl9XUEEzX1BTSxAH'); + +@$core.Deprecated('Use threadNetworkStateDescriptor instead') +const ThreadNetworkState$json = { + '1': 'ThreadNetworkState', + '2': [ + {'1': 'Attached', '2': 0}, + {'1': 'Attaching', '2': 1}, + {'1': 'Dettached', '2': 2}, + {'1': 'AttachingFailed', '2': 3}, + ], +}; + +/// Descriptor for `ThreadNetworkState`. Decode as a `google.protobuf.EnumDescriptorProto`. +final $typed_data.Uint8List threadNetworkStateDescriptor = $convert.base64Decode( + 'ChJUaHJlYWROZXR3b3JrU3RhdGUSDAoIQXR0YWNoZWQQABINCglBdHRhY2hpbmcQARINCglEZX' + 'R0YWNoZWQQAhITCg9BdHRhY2hpbmdGYWlsZWQQAw=='); + +@$core.Deprecated('Use threadAttachFailedReasonDescriptor instead') +const ThreadAttachFailedReason$json = { + '1': 'ThreadAttachFailedReason', + '2': [ + {'1': 'DatasetInvalid', '2': 0}, + {'1': 'ThreadNetworkNotFound', '2': 1}, + ], +}; + +/// Descriptor for `ThreadAttachFailedReason`. Decode as a `google.protobuf.EnumDescriptorProto`. +final $typed_data.Uint8List threadAttachFailedReasonDescriptor = + $convert.base64Decode( + 'ChhUaHJlYWRBdHRhY2hGYWlsZWRSZWFzb24SEgoORGF0YXNldEludmFsaWQQABIZChVUaHJlYW' + 'ROZXR3b3JrTm90Rm91bmQQAQ=='); + +@$core.Deprecated('Use wifiConnectedStateDescriptor instead') +const WifiConnectedState$json = { + '1': 'WifiConnectedState', + '2': [ + {'1': 'ip4_addr', '3': 1, '4': 1, '5': 9, '10': 'ip4Addr'}, + { + '1': 'auth_mode', + '3': 2, + '4': 1, + '5': 14, + '6': '.WifiAuthMode', + '10': 'authMode' + }, + {'1': 'ssid', '3': 3, '4': 1, '5': 12, '10': 'ssid'}, + {'1': 'bssid', '3': 4, '4': 1, '5': 12, '10': 'bssid'}, + {'1': 'channel', '3': 5, '4': 1, '5': 5, '10': 'channel'}, + ], +}; + +/// Descriptor for `WifiConnectedState`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List wifiConnectedStateDescriptor = $convert.base64Decode( + 'ChJXaWZpQ29ubmVjdGVkU3RhdGUSGQoIaXA0X2FkZHIYASABKAlSB2lwNEFkZHISKgoJYXV0aF' + '9tb2RlGAIgASgOMg0uV2lmaUF1dGhNb2RlUghhdXRoTW9kZRISCgRzc2lkGAMgASgMUgRzc2lk' + 'EhQKBWJzc2lkGAQgASgMUgVic3NpZBIYCgdjaGFubmVsGAUgASgFUgdjaGFubmVs'); + +@$core.Deprecated('Use wifiAttemptFailedDescriptor instead') +const WifiAttemptFailed$json = { + '1': 'WifiAttemptFailed', + '2': [ + { + '1': 'attempts_remaining', + '3': 1, + '4': 1, + '5': 13, + '10': 'attemptsRemaining' + }, + ], +}; + +/// Descriptor for `WifiAttemptFailed`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List wifiAttemptFailedDescriptor = $convert.base64Decode( + 'ChFXaWZpQXR0ZW1wdEZhaWxlZBItChJhdHRlbXB0c19yZW1haW5pbmcYASABKA1SEWF0dGVtcH' + 'RzUmVtYWluaW5n'); + +@$core.Deprecated('Use threadAttachStateDescriptor instead') +const ThreadAttachState$json = { + '1': 'ThreadAttachState', + '2': [ + {'1': 'pan_id', '3': 1, '4': 1, '5': 13, '10': 'panId'}, + {'1': 'ext_pan_id', '3': 2, '4': 1, '5': 12, '10': 'extPanId'}, + {'1': 'channel', '3': 3, '4': 1, '5': 13, '10': 'channel'}, + {'1': 'name', '3': 4, '4': 1, '5': 9, '10': 'name'}, + ], +}; + +/// Descriptor for `ThreadAttachState`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List threadAttachStateDescriptor = $convert.base64Decode( + 'ChFUaHJlYWRBdHRhY2hTdGF0ZRIVCgZwYW5faWQYASABKA1SBXBhbklkEhwKCmV4dF9wYW5faW' + 'QYAiABKAxSCGV4dFBhbklkEhgKB2NoYW5uZWwYAyABKA1SB2NoYW5uZWwSEgoEbmFtZRgEIAEo' + 'CVIEbmFtZQ=='); diff --git a/lib/generated/sec0.pb.dart b/lib/generated/sec0.pb.dart new file mode 100644 index 0000000..91630db --- /dev/null +++ b/lib/generated/sec0.pb.dart @@ -0,0 +1,219 @@ +// This is a generated file - do not edit. +// +// Generated from sec0.proto. + +// @dart = 3.3 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names +// ignore_for_file: curly_braces_in_flow_control_structures +// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_relative_imports + +import 'dart:core' as $core; + +import 'package:protobuf/protobuf.dart' as $pb; + +import 'constants.pbenum.dart' as $0; +import 'sec0.pbenum.dart'; + +export 'package:protobuf/protobuf.dart' show GeneratedMessageGenericExtensions; + +export 'sec0.pbenum.dart'; + +class S0SessionCmd extends $pb.GeneratedMessage { + factory S0SessionCmd() => create(); + + S0SessionCmd._(); + + factory S0SessionCmd.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory S0SessionCmd.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'S0SessionCmd', + createEmptyInstance: create) + ..hasRequiredFields = false; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + S0SessionCmd clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + S0SessionCmd copyWith(void Function(S0SessionCmd) updates) => + super.copyWith((message) => updates(message as S0SessionCmd)) + as S0SessionCmd; + + @$core.override + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static S0SessionCmd create() => S0SessionCmd._(); + @$core.override + S0SessionCmd createEmptyInstance() => create(); + @$core.pragma('dart2js:noInline') + static S0SessionCmd getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(create); + static S0SessionCmd? _defaultInstance; +} + +class S0SessionResp extends $pb.GeneratedMessage { + factory S0SessionResp({ + $0.Status? status, + }) { + final result = create(); + if (status != null) result.status = status; + return result; + } + + S0SessionResp._(); + + factory S0SessionResp.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory S0SessionResp.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'S0SessionResp', + createEmptyInstance: create) + ..aE<$0.Status>(1, _omitFieldNames ? '' : 'status', + enumValues: $0.Status.values) + ..hasRequiredFields = false; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + S0SessionResp clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + S0SessionResp copyWith(void Function(S0SessionResp) updates) => + super.copyWith((message) => updates(message as S0SessionResp)) + as S0SessionResp; + + @$core.override + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static S0SessionResp create() => S0SessionResp._(); + @$core.override + S0SessionResp createEmptyInstance() => create(); + @$core.pragma('dart2js:noInline') + static S0SessionResp getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(create); + static S0SessionResp? _defaultInstance; + + @$pb.TagNumber(1) + $0.Status get status => $_getN(0); + @$pb.TagNumber(1) + set status($0.Status value) => $_setField(1, value); + @$pb.TagNumber(1) + $core.bool hasStatus() => $_has(0); + @$pb.TagNumber(1) + void clearStatus() => $_clearField(1); +} + +enum Sec0Payload_Payload { sc, sr, notSet } + +class Sec0Payload extends $pb.GeneratedMessage { + factory Sec0Payload({ + Sec0MsgType? msg, + S0SessionCmd? sc, + S0SessionResp? sr, + }) { + final result = create(); + if (msg != null) result.msg = msg; + if (sc != null) result.sc = sc; + if (sr != null) result.sr = sr; + return result; + } + + Sec0Payload._(); + + factory Sec0Payload.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory Sec0Payload.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); + + static const $core.Map<$core.int, Sec0Payload_Payload> + _Sec0Payload_PayloadByTag = { + 20: Sec0Payload_Payload.sc, + 21: Sec0Payload_Payload.sr, + 0: Sec0Payload_Payload.notSet + }; + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'Sec0Payload', + createEmptyInstance: create) + ..oo(0, [20, 21]) + ..aE(1, _omitFieldNames ? '' : 'msg', + enumValues: Sec0MsgType.values) + ..aOM(20, _omitFieldNames ? '' : 'sc', + subBuilder: S0SessionCmd.create) + ..aOM(21, _omitFieldNames ? '' : 'sr', + subBuilder: S0SessionResp.create) + ..hasRequiredFields = false; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + Sec0Payload clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + Sec0Payload copyWith(void Function(Sec0Payload) updates) => + super.copyWith((message) => updates(message as Sec0Payload)) + as Sec0Payload; + + @$core.override + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static Sec0Payload create() => Sec0Payload._(); + @$core.override + Sec0Payload createEmptyInstance() => create(); + @$core.pragma('dart2js:noInline') + static Sec0Payload getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(create); + static Sec0Payload? _defaultInstance; + + @$pb.TagNumber(20) + @$pb.TagNumber(21) + Sec0Payload_Payload whichPayload() => + _Sec0Payload_PayloadByTag[$_whichOneof(0)]!; + @$pb.TagNumber(20) + @$pb.TagNumber(21) + void clearPayload() => $_clearField($_whichOneof(0)); + + @$pb.TagNumber(1) + Sec0MsgType get msg => $_getN(0); + @$pb.TagNumber(1) + set msg(Sec0MsgType value) => $_setField(1, value); + @$pb.TagNumber(1) + $core.bool hasMsg() => $_has(0); + @$pb.TagNumber(1) + void clearMsg() => $_clearField(1); + + @$pb.TagNumber(20) + S0SessionCmd get sc => $_getN(1); + @$pb.TagNumber(20) + set sc(S0SessionCmd value) => $_setField(20, value); + @$pb.TagNumber(20) + $core.bool hasSc() => $_has(1); + @$pb.TagNumber(20) + void clearSc() => $_clearField(20); + @$pb.TagNumber(20) + S0SessionCmd ensureSc() => $_ensure(1); + + @$pb.TagNumber(21) + S0SessionResp get sr => $_getN(2); + @$pb.TagNumber(21) + set sr(S0SessionResp value) => $_setField(21, value); + @$pb.TagNumber(21) + $core.bool hasSr() => $_has(2); + @$pb.TagNumber(21) + void clearSr() => $_clearField(21); + @$pb.TagNumber(21) + S0SessionResp ensureSr() => $_ensure(2); +} + +const $core.bool _omitFieldNames = + $core.bool.fromEnvironment('protobuf.omit_field_names'); +const $core.bool _omitMessageNames = + $core.bool.fromEnvironment('protobuf.omit_message_names'); diff --git a/lib/generated/sec0.pbenum.dart b/lib/generated/sec0.pbenum.dart new file mode 100644 index 0000000..dfd21e1 --- /dev/null +++ b/lib/generated/sec0.pbenum.dart @@ -0,0 +1,37 @@ +// This is a generated file - do not edit. +// +// Generated from sec0.proto. + +// @dart = 3.3 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names +// ignore_for_file: curly_braces_in_flow_control_structures +// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_relative_imports + +import 'dart:core' as $core; + +import 'package:protobuf/protobuf.dart' as $pb; + +class Sec0MsgType extends $pb.ProtobufEnum { + static const Sec0MsgType S0_Session_Command = + Sec0MsgType._(0, _omitEnumNames ? '' : 'S0_Session_Command'); + static const Sec0MsgType S0_Session_Response = + Sec0MsgType._(1, _omitEnumNames ? '' : 'S0_Session_Response'); + + static const $core.List values = [ + S0_Session_Command, + S0_Session_Response, + ]; + + static final $core.List _byValue = + $pb.ProtobufEnum.$_initByValueList(values, 1); + static Sec0MsgType? valueOf($core.int value) => + value < 0 || value >= _byValue.length ? null : _byValue[value]; + + const Sec0MsgType._(super.value, super.name); +} + +const $core.bool _omitEnumNames = + $core.bool.fromEnvironment('protobuf.omit_enum_names'); diff --git a/lib/generated/sec0.pbjson.dart b/lib/generated/sec0.pbjson.dart new file mode 100644 index 0000000..ac2cd4c --- /dev/null +++ b/lib/generated/sec0.pbjson.dart @@ -0,0 +1,86 @@ +// This is a generated file - do not edit. +// +// Generated from sec0.proto. + +// @dart = 3.3 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names +// ignore_for_file: curly_braces_in_flow_control_structures +// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_relative_imports +// ignore_for_file: unused_import + +import 'dart:convert' as $convert; +import 'dart:core' as $core; +import 'dart:typed_data' as $typed_data; + +@$core.Deprecated('Use sec0MsgTypeDescriptor instead') +const Sec0MsgType$json = { + '1': 'Sec0MsgType', + '2': [ + {'1': 'S0_Session_Command', '2': 0}, + {'1': 'S0_Session_Response', '2': 1}, + ], +}; + +/// Descriptor for `Sec0MsgType`. Decode as a `google.protobuf.EnumDescriptorProto`. +final $typed_data.Uint8List sec0MsgTypeDescriptor = $convert.base64Decode( + 'CgtTZWMwTXNnVHlwZRIWChJTMF9TZXNzaW9uX0NvbW1hbmQQABIXChNTMF9TZXNzaW9uX1Jlc3' + 'BvbnNlEAE='); + +@$core.Deprecated('Use s0SessionCmdDescriptor instead') +const S0SessionCmd$json = { + '1': 'S0SessionCmd', +}; + +/// Descriptor for `S0SessionCmd`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List s0SessionCmdDescriptor = + $convert.base64Decode('CgxTMFNlc3Npb25DbWQ='); + +@$core.Deprecated('Use s0SessionRespDescriptor instead') +const S0SessionResp$json = { + '1': 'S0SessionResp', + '2': [ + {'1': 'status', '3': 1, '4': 1, '5': 14, '6': '.Status', '10': 'status'}, + ], +}; + +/// Descriptor for `S0SessionResp`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List s0SessionRespDescriptor = $convert.base64Decode( + 'Cg1TMFNlc3Npb25SZXNwEh8KBnN0YXR1cxgBIAEoDjIHLlN0YXR1c1IGc3RhdHVz'); + +@$core.Deprecated('Use sec0PayloadDescriptor instead') +const Sec0Payload$json = { + '1': 'Sec0Payload', + '2': [ + {'1': 'msg', '3': 1, '4': 1, '5': 14, '6': '.Sec0MsgType', '10': 'msg'}, + { + '1': 'sc', + '3': 20, + '4': 1, + '5': 11, + '6': '.S0SessionCmd', + '9': 0, + '10': 'sc' + }, + { + '1': 'sr', + '3': 21, + '4': 1, + '5': 11, + '6': '.S0SessionResp', + '9': 0, + '10': 'sr' + }, + ], + '8': [ + {'1': 'payload'}, + ], +}; + +/// Descriptor for `Sec0Payload`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List sec0PayloadDescriptor = $convert.base64Decode( + 'CgtTZWMwUGF5bG9hZBIeCgNtc2cYASABKA4yDC5TZWMwTXNnVHlwZVIDbXNnEh8KAnNjGBQgAS' + 'gLMg0uUzBTZXNzaW9uQ21kSABSAnNjEiAKAnNyGBUgASgLMg4uUzBTZXNzaW9uUmVzcEgAUgJz' + 'ckIJCgdwYXlsb2Fk'); diff --git a/lib/generated/session.pb.dart b/lib/generated/session.pb.dart new file mode 100644 index 0000000..c9c0a4b --- /dev/null +++ b/lib/generated/session.pb.dart @@ -0,0 +1,106 @@ +// This is a generated file - do not edit. +// +// Generated from session.proto. + +// @dart = 3.3 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names +// ignore_for_file: curly_braces_in_flow_control_structures +// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_relative_imports + +import 'dart:core' as $core; + +import 'package:protobuf/protobuf.dart' as $pb; + +import 'sec0.pb.dart' as $0; +import 'session.pbenum.dart'; + +export 'package:protobuf/protobuf.dart' show GeneratedMessageGenericExtensions; + +export 'session.pbenum.dart'; + +enum SessionData_Proto { sec0, notSet } + +class SessionData extends $pb.GeneratedMessage { + factory SessionData({ + SecSchemeVersion? secVer, + $0.Sec0Payload? sec0, + }) { + final result = create(); + if (secVer != null) result.secVer = secVer; + if (sec0 != null) result.sec0 = sec0; + return result; + } + + SessionData._(); + + factory SessionData.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory SessionData.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); + + static const $core.Map<$core.int, SessionData_Proto> _SessionData_ProtoByTag = + {10: SessionData_Proto.sec0, 0: SessionData_Proto.notSet}; + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'SessionData', + createEmptyInstance: create) + ..oo(0, [10]) + ..aE(2, _omitFieldNames ? '' : 'secVer', + enumValues: SecSchemeVersion.values) + ..aOM<$0.Sec0Payload>(10, _omitFieldNames ? '' : 'sec0', + subBuilder: $0.Sec0Payload.create) + ..hasRequiredFields = false; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + SessionData clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + SessionData copyWith(void Function(SessionData) updates) => + super.copyWith((message) => updates(message as SessionData)) + as SessionData; + + @$core.override + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static SessionData create() => SessionData._(); + @$core.override + SessionData createEmptyInstance() => create(); + @$core.pragma('dart2js:noInline') + static SessionData getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(create); + static SessionData? _defaultInstance; + + @$pb.TagNumber(10) + SessionData_Proto whichProto() => _SessionData_ProtoByTag[$_whichOneof(0)]!; + @$pb.TagNumber(10) + void clearProto() => $_clearField($_whichOneof(0)); + + @$pb.TagNumber(2) + SecSchemeVersion get secVer => $_getN(0); + @$pb.TagNumber(2) + set secVer(SecSchemeVersion value) => $_setField(2, value); + @$pb.TagNumber(2) + $core.bool hasSecVer() => $_has(0); + @$pb.TagNumber(2) + void clearSecVer() => $_clearField(2); + + @$pb.TagNumber(10) + $0.Sec0Payload get sec0 => $_getN(1); + @$pb.TagNumber(10) + set sec0($0.Sec0Payload value) => $_setField(10, value); + @$pb.TagNumber(10) + $core.bool hasSec0() => $_has(1); + @$pb.TagNumber(10) + void clearSec0() => $_clearField(10); + @$pb.TagNumber(10) + $0.Sec0Payload ensureSec0() => $_ensure(1); +} + +const $core.bool _omitFieldNames = + $core.bool.fromEnvironment('protobuf.omit_field_names'); +const $core.bool _omitMessageNames = + $core.bool.fromEnvironment('protobuf.omit_message_names'); diff --git a/lib/generated/session.pbenum.dart b/lib/generated/session.pbenum.dart new file mode 100644 index 0000000..824dbf0 --- /dev/null +++ b/lib/generated/session.pbenum.dart @@ -0,0 +1,40 @@ +// This is a generated file - do not edit. +// +// Generated from session.proto. + +// @dart = 3.3 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names +// ignore_for_file: curly_braces_in_flow_control_structures +// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_relative_imports + +import 'dart:core' as $core; + +import 'package:protobuf/protobuf.dart' as $pb; + +class SecSchemeVersion extends $pb.ProtobufEnum { + static const SecSchemeVersion SecScheme0 = + SecSchemeVersion._(0, _omitEnumNames ? '' : 'SecScheme0'); + static const SecSchemeVersion SecScheme1 = + SecSchemeVersion._(1, _omitEnumNames ? '' : 'SecScheme1'); + static const SecSchemeVersion SecScheme2 = + SecSchemeVersion._(2, _omitEnumNames ? '' : 'SecScheme2'); + + static const $core.List values = [ + SecScheme0, + SecScheme1, + SecScheme2, + ]; + + static final $core.List _byValue = + $pb.ProtobufEnum.$_initByValueList(values, 2); + static SecSchemeVersion? valueOf($core.int value) => + value < 0 || value >= _byValue.length ? null : _byValue[value]; + + const SecSchemeVersion._(super.value, super.name); +} + +const $core.bool _omitEnumNames = + $core.bool.fromEnvironment('protobuf.omit_enum_names'); diff --git a/lib/generated/session.pbjson.dart b/lib/generated/session.pbjson.dart new file mode 100644 index 0000000..586e018 --- /dev/null +++ b/lib/generated/session.pbjson.dart @@ -0,0 +1,63 @@ +// This is a generated file - do not edit. +// +// Generated from session.proto. + +// @dart = 3.3 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names +// ignore_for_file: curly_braces_in_flow_control_structures +// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_relative_imports +// ignore_for_file: unused_import + +import 'dart:convert' as $convert; +import 'dart:core' as $core; +import 'dart:typed_data' as $typed_data; + +@$core.Deprecated('Use secSchemeVersionDescriptor instead') +const SecSchemeVersion$json = { + '1': 'SecSchemeVersion', + '2': [ + {'1': 'SecScheme0', '2': 0}, + {'1': 'SecScheme1', '2': 1}, + {'1': 'SecScheme2', '2': 2}, + ], +}; + +/// Descriptor for `SecSchemeVersion`. Decode as a `google.protobuf.EnumDescriptorProto`. +final $typed_data.Uint8List secSchemeVersionDescriptor = $convert.base64Decode( + 'ChBTZWNTY2hlbWVWZXJzaW9uEg4KClNlY1NjaGVtZTAQABIOCgpTZWNTY2hlbWUxEAESDgoKU2' + 'VjU2NoZW1lMhAC'); + +@$core.Deprecated('Use sessionDataDescriptor instead') +const SessionData$json = { + '1': 'SessionData', + '2': [ + { + '1': 'sec_ver', + '3': 2, + '4': 1, + '5': 14, + '6': '.SecSchemeVersion', + '10': 'secVer' + }, + { + '1': 'sec0', + '3': 10, + '4': 1, + '5': 11, + '6': '.Sec0Payload', + '9': 0, + '10': 'sec0' + }, + ], + '8': [ + {'1': 'proto'}, + ], +}; + +/// Descriptor for `SessionData`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List sessionDataDescriptor = $convert.base64Decode( + 'CgtTZXNzaW9uRGF0YRIqCgdzZWNfdmVyGAIgASgOMhEuU2VjU2NoZW1lVmVyc2lvblIGc2VjVm' + 'VyEiIKBHNlYzAYCiABKAsyDC5TZWMwUGF5bG9hZEgAUgRzZWMwQgcKBXByb3Rv'); diff --git a/lib/proto/constants.proto b/lib/proto/constants.proto new file mode 100644 index 0000000..1d9375f --- /dev/null +++ b/lib/proto/constants.proto @@ -0,0 +1,12 @@ +syntax = "proto3"; + +enum Status { + Success = 0; + InvalidSecScheme = 1; + InvalidProto = 2; + TooManySessions = 3; + InvalidArgument = 4; + InternalError = 5; + CryptoError = 6; + InvalidSession = 7; +} diff --git a/lib/proto/network_config.proto b/lib/proto/network_config.proto new file mode 100644 index 0000000..6dd8df2 --- /dev/null +++ b/lib/proto/network_config.proto @@ -0,0 +1,96 @@ +syntax = "proto3"; + +import "constants.proto"; +import "network_constants.proto"; + +message CmdGetWifiStatus { +} + +message RespGetWifiStatus { + Status status = 1; + WifiStationState wifi_sta_state = 2; + oneof state { + WifiConnectFailedReason wifi_fail_reason = 10; + WifiConnectedState wifi_connected = 11; + WifiAttemptFailed attempt_failed = 12; + } +} + +message CmdGetThreadStatus { +} + +message RespGetThreadStatus { + Status status = 1; + ThreadNetworkState thread_state = 2; + oneof state { + ThreadAttachFailedReason thread_fail_reason = 10; + ThreadAttachState thread_attached = 11; + } +} + +message CmdSetWifiConfig { + bytes ssid = 1; + bytes passphrase = 2; + bytes bssid = 3; + int32 channel = 4; +} + +message CmdSetThreadConfig { + bytes dataset = 1; +} + +message RespSetWifiConfig { + Status status = 1; +} + +message RespSetThreadConfig { + Status status = 1; +} + +message CmdApplyWifiConfig { +} + +message CmdApplyThreadConfig { +} + +message RespApplyWifiConfig { + Status status = 1; +} + +message RespApplyThreadConfig { + Status status = 1; +} + +enum NetworkConfigMsgType { + TypeCmdGetWifiStatus = 0; + TypeRespGetWifiStatus = 1; + TypeCmdSetWifiConfig = 2; + TypeRespSetWifiConfig = 3; + TypeCmdApplyWifiConfig = 4; + TypeRespApplyWifiConfig = 5; + TypeCmdGetThreadStatus = 6; + TypeRespGetThreadStatus = 7; + TypeCmdSetThreadConfig = 8; + TypeRespSetThreadConfig = 9; + TypeCmdApplyThreadConfig = 10; + TypeRespApplyThreadConfig = 11; + +} + +message NetworkConfigPayload { + NetworkConfigMsgType msg = 1; + oneof payload { + CmdGetWifiStatus cmd_get_wifi_status = 10; + RespGetWifiStatus resp_get_wifi_status = 11; + CmdSetWifiConfig cmd_set_wifi_config = 12; + RespSetWifiConfig resp_set_wifi_config = 13; + CmdApplyWifiConfig cmd_apply_wifi_config = 14; + RespApplyWifiConfig resp_apply_wifi_config = 15; + CmdGetThreadStatus cmd_get_thread_status = 16; + RespGetThreadStatus resp_get_thread_status = 17; + CmdSetThreadConfig cmd_set_thread_config = 18; + RespSetThreadConfig resp_set_thread_config = 19; + CmdApplyThreadConfig cmd_apply_thread_config = 20; + RespApplyThreadConfig resp_apply_thread_config = 21; + } +} diff --git a/lib/proto/network_constants.proto b/lib/proto/network_constants.proto new file mode 100644 index 0000000..b3e08d1 --- /dev/null +++ b/lib/proto/network_constants.proto @@ -0,0 +1,55 @@ +syntax = "proto3"; + +enum WifiStationState { + Connected = 0; + Connecting = 1; + Disconnected = 2; + ConnectionFailed = 3; +} + +enum WifiConnectFailedReason { + AuthError = 0; + WifiNetworkNotFound = 1; +} + +enum WifiAuthMode { + Open = 0; + WEP = 1; + WPA_PSK = 2; + WPA2_PSK = 3; + WPA_WPA2_PSK = 4; + WPA2_ENTERPRISE = 5; + WPA3_PSK = 6; + WPA2_WPA3_PSK = 7; +} + +message WifiConnectedState { + string ip4_addr = 1; + WifiAuthMode auth_mode = 2; + bytes ssid = 3; + bytes bssid = 4; + int32 channel = 5; +} + +message WifiAttemptFailed { + uint32 attempts_remaining = 1; +} + +enum ThreadNetworkState { + Attached = 0; + Attaching = 1; + Dettached = 2; + AttachingFailed = 3; +} + +enum ThreadAttachFailedReason { + DatasetInvalid = 0; + ThreadNetworkNotFound = 1; +} + +message ThreadAttachState { + uint32 pan_id = 1; + bytes ext_pan_id = 2; + uint32 channel = 3; + string name = 4; +} diff --git a/lib/proto/sec0.proto b/lib/proto/sec0.proto new file mode 100644 index 0000000..b43f522 --- /dev/null +++ b/lib/proto/sec0.proto @@ -0,0 +1,24 @@ +syntax = "proto3"; + +import "constants.proto"; + +message S0SessionCmd { + +} + +message S0SessionResp { + Status status = 1; +} + +enum Sec0MsgType { + S0_Session_Command = 0; + S0_Session_Response = 1; +} + +message Sec0Payload { + Sec0MsgType msg = 1; + oneof payload { + S0SessionCmd sc = 20; + S0SessionResp sr = 21; + } +} diff --git a/lib/proto/session.proto b/lib/proto/session.proto new file mode 100644 index 0000000..9cf4c1a --- /dev/null +++ b/lib/proto/session.proto @@ -0,0 +1,16 @@ +syntax = "proto3"; + +import "sec0.proto"; + +enum SecSchemeVersion { + SecScheme0 = 0; + SecScheme1 = 1; + SecScheme2 = 2; +} + +message SessionData { + SecSchemeVersion sec_ver = 2; + oneof proto { + Sec0Payload sec0 = 10; + } +} diff --git a/pubspec.lock b/pubspec.lock index d9f1313..4f67f41 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -1,6 +1,22 @@ # Generated by pub # See https://dart.dev/tools/pub/glossary#lockfile packages: + _fe_analyzer_shared: + dependency: transitive + description: + name: _fe_analyzer_shared + sha256: "8d7ff3948166b8ec5da0fbb5962000926b8e02f2ed9b3e51d1738905fbd4c98d" + url: "https://pub.dev" + source: hosted + version: "93.0.0" + analyzer: + dependency: transitive + description: + name: analyzer + sha256: de7148ed2fcec579b19f122c1800933dfa028f6d9fd38a152b04b1516cec120b + url: "https://pub.dev" + source: hosted + version: "10.0.1" args: dependency: transitive description: @@ -65,6 +81,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.19.1" + convert: + dependency: transitive + description: + name: convert + sha256: b30acd5944035672bc15c6b7a8b47d773e41e2f17de064350988c5d02adb1c68 + url: "https://pub.dev" + source: hosted + version: "3.1.2" crypto: dependency: transitive description: @@ -73,6 +97,14 @@ packages: url: "https://pub.dev" source: hosted version: "3.0.7" + dart_style: + dependency: transitive + description: + name: dart_style + sha256: "29f7ecc274a86d32920b1d9cfc7502fa87220da41ec60b55f329559d5732e2b2" + url: "https://pub.dev" + source: hosted + version: "3.1.7" dbus: dependency: transitive description: @@ -113,6 +145,14 @@ packages: url: "https://pub.dev" source: hosted version: "7.0.1" + fixnum: + dependency: transitive + description: + name: fixnum + sha256: b6dc7065e46c974bc7c5f143080a6764ec7a4be6da1285ececdc37be96de53be + url: "https://pub.dev" + source: hosted + version: "1.1.1" flutter: dependency: "direct main" description: flutter @@ -448,6 +488,54 @@ packages: url: "https://pub.dev" source: hosted version: "1.11.1" + permission_handler: + dependency: "direct main" + description: + name: permission_handler + sha256: "59adad729136f01ea9e35a48f5d1395e25cba6cea552249ddbe9cf950f5d7849" + url: "https://pub.dev" + source: hosted + version: "11.4.0" + permission_handler_android: + dependency: transitive + description: + name: permission_handler_android + sha256: d3971dcdd76182a0c198c096b5db2f0884b0d4196723d21a866fc4cdea057ebc + url: "https://pub.dev" + source: hosted + version: "12.1.0" + permission_handler_apple: + dependency: transitive + description: + name: permission_handler_apple + sha256: f000131e755c54cf4d84a5d8bd6e4149e262cc31c5a8b1d698de1ac85fa41023 + url: "https://pub.dev" + source: hosted + version: "9.4.7" + permission_handler_html: + dependency: transitive + description: + name: permission_handler_html + sha256: "38f000e83355abb3392140f6bc3030660cfaef189e1f87824facb76300b4ff24" + url: "https://pub.dev" + source: hosted + version: "0.1.3+5" + permission_handler_platform_interface: + dependency: transitive + description: + name: permission_handler_platform_interface + sha256: eb99b295153abce5d683cac8c02e22faab63e50679b937fa1bf67d58bb282878 + url: "https://pub.dev" + source: hosted + version: "4.3.0" + permission_handler_windows: + dependency: transitive + description: + name: permission_handler_windows + sha256: "1a790728016f79a41216d88672dbc5df30e686e811ad4e698bfc51f76ad91f1e" + url: "https://pub.dev" + source: hosted + version: "0.2.1" petitparser: dependency: transitive description: @@ -480,6 +568,22 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.8" + protobuf: + dependency: "direct main" + description: + name: protobuf + sha256: "75ec242d22e950bdcc79ee38dd520ce4ee0bc491d7fadc4ea47694604d22bf06" + url: "https://pub.dev" + source: hosted + version: "6.0.0" + protoc_plugin: + dependency: "direct dev" + description: + name: protoc_plugin + sha256: d1ea363e9118f954d9d482c2f7281c5ff5149b059e68672d1faa564d49091f05 + url: "https://pub.dev" + source: hosted + version: "25.0.0" pub_semver: dependency: transitive description: @@ -605,6 +709,14 @@ packages: url: "https://pub.dev" source: hosted version: "15.2.0" + watcher: + dependency: transitive + description: + name: watcher + sha256: "1398c9f081a753f9226febe8900fce8f7d0a67163334e1c94a2438339d79d635" + url: "https://pub.dev" + source: hosted + version: "1.2.1" web: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index d2a383d..53b8a4a 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -38,11 +38,14 @@ dependencies: multicast_dns: ^0.3.2 phoenix_socket: ^0.6.4 flutter_secure_storage: ^9.2.2 + protobuf: ^6.0.0 + permission_handler: ^11.0.0 dev_dependencies: flutter_test: sdk: flutter flutter_lints: ^6.0.0 + protoc_plugin: ^25.0.0 flutter: uses-material-design: true