diff --git a/example/android/app/src/main/AndroidManifest.xml b/example/android/app/src/main/AndroidManifest.xml index 8c369ef..7cb1cdf 100644 --- a/example/android/app/src/main/AndroidManifest.xml +++ b/example/android/app/src/main/AndroidManifest.xml @@ -6,9 +6,10 @@ additional functionality it is fine to subclass or reimplement FlutterApplication and put your custom class here. --> + - - diff --git a/example/lib/ble_screen/ble_bloc.dart b/example/lib/ble_screen/ble_bloc.dart index 3caac71..76b424f 100644 --- a/example/lib/ble_screen/ble_bloc.dart +++ b/example/lib/ble_screen/ble_bloc.dart @@ -8,7 +8,7 @@ import 'ble.dart'; class BleBloc extends Bloc { var bleService = BleService.getInstance(); StreamSubscription _scanSubscription; - List> bleDevices = new List>(); + List> bleDevices = []; BleBloc(BleState initialState) : super(initialState); @@ -58,7 +58,8 @@ class BleBloc extends Bloc { } @override - Future close() { + Future close() async { + super.close(); _scanSubscription?.cancel(); bleService.stopScanBle(); } diff --git a/example/lib/ble_screen/ble_screen.dart b/example/lib/ble_screen/ble_screen.dart index 437ec96..8f1552e 100644 --- a/example/lib/ble_screen/ble_screen.dart +++ b/example/lib/ble_screen/ble_screen.dart @@ -66,7 +66,7 @@ class _BleScreenState extends State { } return Center( - child: SpinKitRipple(color: Theme.of(context).textSelectionColor), + child: SpinKitRipple(color: Theme.of(context).textSelectionTheme.selectionColor), ); }, ), diff --git a/example/lib/ble_service.dart b/example/lib/ble_service.dart index b2792d1..0710df5 100644 --- a/example/lib/ble_service.dart +++ b/example/lib/ble_service.dart @@ -1,11 +1,11 @@ import 'dart:async'; // import 'dart:html'; import 'dart:io'; +import 'package:esp_provisioning_example/transport_ble.dart'; import 'package:flutter_ble_lib/flutter_ble_lib.dart'; import 'package:esp_provisioning/esp_provisioning.dart'; import 'package:logger/logger.dart'; import 'package:permission_handler/permission_handler.dart'; -import 'package:rxdart/rxdart.dart'; import 'package:location/location.dart' as location; // import 'package:permission_handler/permission_handler.dart'; diff --git a/example/lib/scan_list.dart b/example/lib/scan_list.dart index 94f9dd5..b550488 100644 --- a/example/lib/scan_list.dart +++ b/example/lib/scan_list.dart @@ -49,7 +49,7 @@ class ScanList extends StatelessWidget { child: Align( alignment: Alignment.center, child: SpinKitRipple( - color: Theme.of(_context).textSelectionColor)))), + color: Theme.of(_context).textSelectionTheme.selectionColor)))), Expanded( child: ListView.separated( shrinkWrap: true, diff --git a/lib/src/transport_ble.dart b/example/lib/transport_ble.dart similarity index 97% rename from lib/src/transport_ble.dart rename to example/lib/transport_ble.dart index e4f0955..d87fcb9 100644 --- a/lib/src/transport_ble.dart +++ b/example/lib/transport_ble.dart @@ -1,9 +1,8 @@ import 'dart:async'; import 'dart:typed_data'; +import 'package:esp_provisioning/esp_provisioning.dart'; import 'package:flutter_ble_lib/flutter_ble_lib.dart'; -import 'transport.dart'; - class TransportBLE implements ProvTransport { final Peripheral peripheral; final String serviceUUID; diff --git a/example/lib/wifi_screen/password_form_field.dart b/example/lib/wifi_screen/password_form_field.dart index d18cc36..175ddfb 100644 --- a/example/lib/wifi_screen/password_form_field.dart +++ b/example/lib/wifi_screen/password_form_field.dart @@ -34,7 +34,7 @@ class _PasswordFormFieldState extends State { return null; }, decoration: InputDecoration( - suffixIcon: FlatButton( + suffixIcon: TextButton( onPressed: () { setState(() { isObscureText = !isObscureText; diff --git a/example/lib/wifi_screen/wifi_screen.dart b/example/lib/wifi_screen/wifi_screen.dart index 524ba2e..9203ea5 100644 --- a/example/lib/wifi_screen/wifi_screen.dart +++ b/example/lib/wifi_screen/wifi_screen.dart @@ -33,7 +33,7 @@ class _WiFiScreenState extends State { List _statusWidget = [ Column( children: [ - FlatButton.icon( + TextButton.icon( onPressed: () {}, icon: SpinKitThreeBounce( color: Colors.black, @@ -44,7 +44,7 @@ class _WiFiScreenState extends State { ), Column( children: [ - FlatButton.icon( + TextButton.icon( onPressed: () {}, icon: Icon( Icons.check, @@ -56,7 +56,7 @@ class _WiFiScreenState extends State { color: Colors.green, ), )), - FlatButton.icon( + TextButton.icon( onPressed: () {}, icon: SpinKitThreeBounce( color: Colors.black, @@ -81,7 +81,7 @@ class _WiFiScreenState extends State { statusWidget = Expanded(child: _statusWidget[step]); body = Expanded( child: - SpinKitDoubleBounce(color: Theme.of(context).textSelectionColor)); + SpinKitDoubleBounce(color: Theme.of(context).textSelectionTheme.selectionColor)); } else { body = wifiList; } @@ -132,7 +132,7 @@ class _WiFiScreenState extends State { mainAxisAlignment: MainAxisAlignment.center, children: [ SpinKitThreeBounce( - color: Theme.of(context).textSelectionColor, + color: Theme.of(context).textSelectionTheme.selectionColor, size: 20, ), Text('Provisioning', @@ -153,7 +153,7 @@ class _WiFiScreenState extends State { return Container( child: Center( child: SpinKitThreeBounce( - color: Theme.of(context).textSelectionColor, + color: Theme.of(context).textSelectionTheme.selectionColor, size: 20, ), ), diff --git a/example/pubspec.lock b/example/pubspec.lock index 9f14e39..d35e8f4 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -7,7 +7,7 @@ packages: name: async url: "https://pub.dartlang.org" source: hosted - version: "2.6.1" + version: "2.9.0" bloc: dependency: transitive description: @@ -28,7 +28,7 @@ packages: name: characters url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" + version: "1.2.1" charcode: dependency: transitive description: @@ -42,14 +42,14 @@ packages: name: clock url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" + version: "1.1.1" collection: dependency: transitive description: name: collection url: "https://pub.dartlang.org" source: hosted - version: "1.15.0" + version: "1.16.0" crypto: dependency: transitive description: @@ -91,7 +91,7 @@ packages: name: fake_async url: "https://pub.dartlang.org" source: hosted - version: "1.2.0" + version: "1.3.1" fixnum: dependency: transitive description: @@ -105,7 +105,7 @@ packages: source: sdk version: "0.0.0" flutter_ble_lib: - dependency: transitive + dependency: "direct main" description: name: flutter_ble_lib url: "https://pub.dartlang.org" @@ -148,7 +148,7 @@ packages: name: js url: "https://pub.dartlang.org" source: hosted - version: "0.6.3" + version: "0.6.4" location: dependency: "direct main" description: @@ -183,14 +183,21 @@ packages: name: matcher url: "https://pub.dartlang.org" source: hosted - version: "0.12.10" + version: "0.12.12" + material_color_utilities: + dependency: transitive + description: + name: material_color_utilities + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.5" meta: dependency: transitive description: name: meta url: "https://pub.dartlang.org" source: hosted - version: "1.3.0" + version: "1.8.0" nested: dependency: transitive description: @@ -204,7 +211,7 @@ packages: name: path url: "https://pub.dartlang.org" source: hosted - version: "1.8.0" + version: "1.8.2" permission_handler: dependency: "direct main" description: @@ -258,7 +265,7 @@ packages: name: source_span url: "https://pub.dartlang.org" source: hosted - version: "1.8.1" + version: "1.9.0" stack_trace: dependency: transitive description: @@ -279,21 +286,21 @@ packages: name: string_scanner url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" + version: "1.1.1" term_glyph: dependency: transitive description: name: term_glyph url: "https://pub.dartlang.org" source: hosted - version: "1.2.0" + version: "1.2.1" test_api: dependency: transitive description: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.3.0" + version: "0.4.12" typed_data: dependency: transitive description: @@ -307,7 +314,7 @@ packages: name: vector_math url: "https://pub.dartlang.org" source: hosted - version: "2.1.0" + version: "2.1.2" sdks: - dart: ">=2.12.0 <3.0.0" + dart: ">=2.18.4 <3.0.0" flutter: ">=2.0.0" diff --git a/example/pubspec.yaml b/example/pubspec.yaml index ee7944d..a81e5af 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -19,6 +19,7 @@ dependencies: rxdart: ^0.26.0 flutter_spinkit: ^5.0.0 location: ^4.1.1 + flutter_ble_lib: ^2.3.2 cupertino_icons: ^1.0.2 diff --git a/lib/esp_provisioning.dart b/lib/esp_provisioning.dart index 719a1b4..769bda9 100644 --- a/lib/esp_provisioning.dart +++ b/lib/esp_provisioning.dart @@ -2,5 +2,4 @@ export 'src/esp_prov.dart'; export 'src/security.dart'; export 'src/security1.dart'; export 'src/transport.dart'; -export 'src/transport_ble.dart'; export 'src/connection_models.dart'; \ No newline at end of file diff --git a/lib/src/connection_models.dart b/lib/src/connection_models.dart index 70e17a1..a33f7e8 100644 --- a/lib/src/connection_models.dart +++ b/lib/src/connection_models.dart @@ -12,20 +12,20 @@ enum WifiConnectFailedReason { class ConnectionStatus { ConnectionStatus({ - this.state, + required this.state, this.ip, this.failedReason, }); final WifiConnectionState state; - final String ip; - final WifiConnectFailedReason failedReason; + final String? ip; + final WifiConnectFailedReason? failedReason; } class WifiAP { const WifiAP({ - this.ssid, - this.rssi, + required this.ssid, + required this.rssi, this.active = false, this.private = true, }); diff --git a/lib/src/crypt.dart b/lib/src/crypt.dart index 3d3351f..60141a1 100644 --- a/lib/src/crypt.dart +++ b/lib/src/crypt.dart @@ -14,8 +14,8 @@ class Crypt { }); } Future crypt (Uint8List data) async { - return _channel.invokeMethod('crypt', { + return await _channel.invokeMethod('crypt', { 'data': data, - }); + }) as Uint8List; } } diff --git a/lib/src/esp_prov.dart b/lib/src/esp_prov.dart index 14cfffc..0ba0db0 100644 --- a/lib/src/esp_prov.dart +++ b/lib/src/esp_prov.dart @@ -14,10 +14,10 @@ class EspProv { ProvTransport transport; ProvSecurity security; - EspProv({this.transport, this.security}); + EspProv({required this.transport, required this.security}); Future establishSession() async { - SessionData responseData; + SessionData responseData = SessionData(); await transport.disconnect(); @@ -146,13 +146,13 @@ class EspProv { return ret; } - Future sendWifiConfig({String ssid, String password}) async { + Future sendWifiConfig({required String ssid, required String password}) async { var payload = WiFiConfigPayload(); payload.msg = WiFiConfigMsgType.TypeCmdSetConfig; var cmdSetConfig = CmdSetConfig(); - cmdSetConfig.ssid = utf8.encode(ssid ?? ''); - cmdSetConfig.passphrase = utf8.encode(password ?? ''); + cmdSetConfig.ssid = utf8.encode(ssid); + cmdSetConfig.passphrase = utf8.encode(password); payload.cmdSetConfig = cmdSetConfig; var reqData = await security.encrypt(payload.writeToBuffer()); var respData = await transport.sendReceive('prov-config', reqData); @@ -171,7 +171,7 @@ class EspProv { return (respPayload.respApplyConfig.status == Status.Success); } - Future getStatus() async { + Future getStatus() async { var payload = WiFiConfigPayload(); payload.msg = WiFiConfigMsgType.TypeCmdGetStatus; @@ -213,7 +213,7 @@ class EspProv { {int packageSize = 256}) async { var i = data.length; var offset = 0; - List ret = new List(0); + List ret = []; while (i > 0) { var needToSend = data.sublist(offset, i < packageSize ? i : packageSize); var encrypted = await security.encrypt(needToSend); diff --git a/lib/src/proto/dart/constants.pb.dart b/lib/src/proto/dart/constants.pb.dart index 2f36736..a00e352 100644 --- a/lib/src/proto/dart/constants.pb.dart +++ b/lib/src/proto/dart/constants.pb.dart @@ -2,8 +2,8 @@ // Generated code. Do not modify. // source: constants.proto // -// @dart = 2.3 -// ignore_for_file: camel_case_types,non_constant_identifier_names,library_prefixes,unused_import,unused_shown_name,return_of_invalid_type +// @dart = 2.12 +// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name import 'dart:core' as $core; diff --git a/lib/src/proto/dart/constants.pbenum.dart b/lib/src/proto/dart/constants.pbenum.dart index ddeeff7..c6520a2 100644 --- a/lib/src/proto/dart/constants.pbenum.dart +++ b/lib/src/proto/dart/constants.pbenum.dart @@ -2,22 +2,22 @@ // Generated code. Do not modify. // source: constants.proto // -// @dart = 2.3 -// ignore_for_file: camel_case_types,non_constant_identifier_names,library_prefixes,unused_import,unused_shown_name,return_of_invalid_type +// @dart = 2.12 +// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name -// ignore_for_file: UNDEFINED_SHOWN_NAME,UNUSED_SHOWN_NAME +// ignore_for_file: UNDEFINED_SHOWN_NAME import 'dart:core' as $core; import 'package:protobuf/protobuf.dart' as $pb; class Status extends $pb.ProtobufEnum { - static const Status Success = Status._(0, 'Success'); - static const Status InvalidSecScheme = Status._(1, 'InvalidSecScheme'); - static const Status InvalidProto = Status._(2, 'InvalidProto'); - static const Status TooManySessions = Status._(3, 'TooManySessions'); - static const Status InvalidArgument = Status._(4, 'InvalidArgument'); - static const Status InternalError = Status._(5, 'InternalError'); - static const Status CryptoError = Status._(6, 'CryptoError'); - static const Status InvalidSession = Status._(7, 'InvalidSession'); + static const Status Success = Status._(0, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'Success'); + static const Status InvalidSecScheme = Status._(1, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'InvalidSecScheme'); + static const Status InvalidProto = Status._(2, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'InvalidProto'); + static const Status TooManySessions = Status._(3, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'TooManySessions'); + static const Status InvalidArgument = Status._(4, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'InvalidArgument'); + static const Status InternalError = Status._(5, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'InternalError'); + static const Status CryptoError = Status._(6, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'CryptoError'); + static const Status InvalidSession = Status._(7, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'InvalidSession'); static const $core.List values = [ Success, @@ -31,7 +31,7 @@ class Status extends $pb.ProtobufEnum { ]; static final $core.Map<$core.int, Status> _byValue = $pb.ProtobufEnum.initByValue(values); - static Status valueOf($core.int value) => _byValue[value]; + static Status? valueOf($core.int value) => _byValue[value]; const Status._($core.int v, $core.String n) : super(v, n); } diff --git a/lib/src/proto/dart/constants.pbjson.dart b/lib/src/proto/dart/constants.pbjson.dart index 6621b60..72473a4 100644 --- a/lib/src/proto/dart/constants.pbjson.dart +++ b/lib/src/proto/dart/constants.pbjson.dart @@ -2,9 +2,13 @@ // Generated code. Do not modify. // source: constants.proto // -// @dart = 2.3 -// ignore_for_file: camel_case_types,non_constant_identifier_names,library_prefixes,unused_import,unused_shown_name,return_of_invalid_type +// @dart = 2.12 +// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,deprecated_member_use_from_same_package,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name +import 'dart:core' as $core; +import 'dart:convert' as $convert; +import 'dart:typed_data' as $typed_data; +@$core.Deprecated('Use statusDescriptor instead') const Status$json = const { '1': 'Status', '2': const [ @@ -19,3 +23,5 @@ const Status$json = const { ], }; +/// Descriptor for `Status`. Decode as a `google.protobuf.EnumDescriptorProto`. +final $typed_data.Uint8List statusDescriptor = $convert.base64Decode('CgZTdGF0dXMSCwoHU3VjY2VzcxAAEhQKEEludmFsaWRTZWNTY2hlbWUQARIQCgxJbnZhbGlkUHJvdG8QAhITCg9Ub29NYW55U2Vzc2lvbnMQAxITCg9JbnZhbGlkQXJndW1lbnQQBBIRCg1JbnRlcm5hbEVycm9yEAUSDwoLQ3J5cHRvRXJyb3IQBhISCg5JbnZhbGlkU2Vzc2lvbhAH'); diff --git a/lib/src/proto/dart/constants.pbserver.dart b/lib/src/proto/dart/constants.pbserver.dart index 6e23e20..aed9f9b 100644 --- a/lib/src/proto/dart/constants.pbserver.dart +++ b/lib/src/proto/dart/constants.pbserver.dart @@ -2,8 +2,8 @@ // Generated code. Do not modify. // source: constants.proto // -// @dart = 2.3 -// ignore_for_file: camel_case_types,non_constant_identifier_names,library_prefixes,unused_import,unused_shown_name,return_of_invalid_type +// @dart = 2.12 +// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,deprecated_member_use_from_same_package,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name export 'constants.pb.dart'; diff --git a/lib/src/proto/dart/sec0.pb.dart b/lib/src/proto/dart/sec0.pb.dart index ae4fe04..d5dc368 100644 --- a/lib/src/proto/dart/sec0.pb.dart +++ b/lib/src/proto/dart/sec0.pb.dart @@ -2,8 +2,8 @@ // Generated code. Do not modify. // source: sec0.proto // -// @dart = 2.3 -// ignore_for_file: camel_case_types,non_constant_identifier_names,library_prefixes,unused_import,unused_shown_name,return_of_invalid_type +// @dart = 2.12 +// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name import 'dart:core' as $core; @@ -15,7 +15,7 @@ import 'sec0.pbenum.dart'; export 'sec0.pbenum.dart'; class S0SessionCmd extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo('S0SessionCmd', createEmptyInstance: create) + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'S0SessionCmd', createEmptyInstance: create) ..hasRequiredFields = false ; @@ -23,8 +23,16 @@ class S0SessionCmd extends $pb.GeneratedMessage { factory S0SessionCmd() => create(); factory S0SessionCmd.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); factory S0SessionCmd.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') S0SessionCmd clone() => S0SessionCmd()..mergeFromMessage(this); - S0SessionCmd copyWith(void Function(S0SessionCmd) updates) => super.copyWith((message) => updates(message as S0SessionCmd)); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + S0SessionCmd copyWith(void Function(S0SessionCmd) updates) => super.copyWith((message) => updates(message as S0SessionCmd)) as S0SessionCmd; // ignore: deprecated_member_use $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') static S0SessionCmd create() => S0SessionCmd._(); @@ -32,21 +40,37 @@ class S0SessionCmd extends $pb.GeneratedMessage { static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') static S0SessionCmd getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static S0SessionCmd _defaultInstance; + static S0SessionCmd? _defaultInstance; } class S0SessionResp extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo('S0SessionResp', createEmptyInstance: create) - ..e<$0.Status>(1, 'status', $pb.PbFieldType.OE, defaultOrMaker: $0.Status.Success, valueOf: $0.Status.valueOf, enumValues: $0.Status.values) + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'S0SessionResp', createEmptyInstance: create) + ..e<$0.Status>(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'status', $pb.PbFieldType.OE, defaultOrMaker: $0.Status.Success, valueOf: $0.Status.valueOf, enumValues: $0.Status.values) ..hasRequiredFields = false ; S0SessionResp._() : super(); - factory S0SessionResp() => create(); + factory S0SessionResp({ + $0.Status? status, + }) { + final _result = create(); + if (status != null) { + _result.status = status; + } + return _result; + } factory S0SessionResp.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); factory S0SessionResp.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') S0SessionResp clone() => S0SessionResp()..mergeFromMessage(this); - S0SessionResp copyWith(void Function(S0SessionResp) updates) => super.copyWith((message) => updates(message as S0SessionResp)); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + S0SessionResp copyWith(void Function(S0SessionResp) updates) => super.copyWith((message) => updates(message as S0SessionResp)) as S0SessionResp; // ignore: deprecated_member_use $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') static S0SessionResp create() => S0SessionResp._(); @@ -54,7 +78,7 @@ class S0SessionResp extends $pb.GeneratedMessage { static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') static S0SessionResp getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static S0SessionResp _defaultInstance; + static S0SessionResp? _defaultInstance; @$pb.TagNumber(1) $0.Status get status => $_getN(0); @@ -78,20 +102,44 @@ class Sec0Payload extends $pb.GeneratedMessage { 21 : Sec0Payload_Payload.sr, 0 : Sec0Payload_Payload.notSet }; - static final $pb.BuilderInfo _i = $pb.BuilderInfo('Sec0Payload', createEmptyInstance: create) + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'Sec0Payload', createEmptyInstance: create) ..oo(0, [20, 21]) - ..e(1, 'msg', $pb.PbFieldType.OE, defaultOrMaker: Sec0MsgType.S0_Session_Command, valueOf: Sec0MsgType.valueOf, enumValues: Sec0MsgType.values) - ..aOM(20, 'sc', subBuilder: S0SessionCmd.create) - ..aOM(21, 'sr', subBuilder: S0SessionResp.create) + ..e(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'msg', $pb.PbFieldType.OE, defaultOrMaker: Sec0MsgType.S0_Session_Command, valueOf: Sec0MsgType.valueOf, enumValues: Sec0MsgType.values) + ..aOM(20, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'sc', subBuilder: S0SessionCmd.create) + ..aOM(21, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'sr', subBuilder: S0SessionResp.create) ..hasRequiredFields = false ; Sec0Payload._() : super(); - factory Sec0Payload() => create(); + 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; + } factory Sec0Payload.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); factory Sec0Payload.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') Sec0Payload clone() => Sec0Payload()..mergeFromMessage(this); - Sec0Payload copyWith(void Function(Sec0Payload) updates) => super.copyWith((message) => updates(message as Sec0Payload)); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + Sec0Payload copyWith(void Function(Sec0Payload) updates) => super.copyWith((message) => updates(message as Sec0Payload)) as Sec0Payload; // ignore: deprecated_member_use $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') static Sec0Payload create() => Sec0Payload._(); @@ -99,9 +147,9 @@ class Sec0Payload extends $pb.GeneratedMessage { static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') static Sec0Payload getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static Sec0Payload _defaultInstance; + static Sec0Payload? _defaultInstance; - Sec0Payload_Payload whichPayload() => _Sec0Payload_PayloadByTag[$_whichOneof(0)]; + Sec0Payload_Payload whichPayload() => _Sec0Payload_PayloadByTag[$_whichOneof(0)]!; void clearPayload() => clearField($_whichOneof(0)); @$pb.TagNumber(1) diff --git a/lib/src/proto/dart/sec0.pbenum.dart b/lib/src/proto/dart/sec0.pbenum.dart index 81de307..a5ab2a7 100644 --- a/lib/src/proto/dart/sec0.pbenum.dart +++ b/lib/src/proto/dart/sec0.pbenum.dart @@ -2,16 +2,16 @@ // Generated code. Do not modify. // source: sec0.proto // -// @dart = 2.3 -// ignore_for_file: camel_case_types,non_constant_identifier_names,library_prefixes,unused_import,unused_shown_name,return_of_invalid_type +// @dart = 2.12 +// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name -// ignore_for_file: UNDEFINED_SHOWN_NAME,UNUSED_SHOWN_NAME +// ignore_for_file: UNDEFINED_SHOWN_NAME 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, 'S0_Session_Command'); - static const Sec0MsgType S0_Session_Response = Sec0MsgType._(1, 'S0_Session_Response'); + static const Sec0MsgType S0_Session_Command = Sec0MsgType._(0, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'S0_Session_Command'); + static const Sec0MsgType S0_Session_Response = Sec0MsgType._(1, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'S0_Session_Response'); static const $core.List values = [ S0_Session_Command, @@ -19,7 +19,7 @@ class Sec0MsgType extends $pb.ProtobufEnum { ]; static final $core.Map<$core.int, Sec0MsgType> _byValue = $pb.ProtobufEnum.initByValue(values); - static Sec0MsgType valueOf($core.int value) => _byValue[value]; + static Sec0MsgType? valueOf($core.int value) => _byValue[value]; const Sec0MsgType._($core.int v, $core.String n) : super(v, n); } diff --git a/lib/src/proto/dart/sec0.pbjson.dart b/lib/src/proto/dart/sec0.pbjson.dart index d6e99e3..fdd0f06 100644 --- a/lib/src/proto/dart/sec0.pbjson.dart +++ b/lib/src/proto/dart/sec0.pbjson.dart @@ -2,9 +2,13 @@ // Generated code. Do not modify. // source: sec0.proto // -// @dart = 2.3 -// ignore_for_file: camel_case_types,non_constant_identifier_names,library_prefixes,unused_import,unused_shown_name,return_of_invalid_type +// @dart = 2.12 +// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,deprecated_member_use_from_same_package,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name +import 'dart:core' as $core; +import 'dart:convert' as $convert; +import 'dart:typed_data' as $typed_data; +@$core.Deprecated('Use sec0MsgTypeDescriptor instead') const Sec0MsgType$json = const { '1': 'Sec0MsgType', '2': const [ @@ -13,10 +17,16 @@ const Sec0MsgType$json = const { ], }; +/// Descriptor for `Sec0MsgType`. Decode as a `google.protobuf.EnumDescriptorProto`. +final $typed_data.Uint8List sec0MsgTypeDescriptor = $convert.base64Decode('CgtTZWMwTXNnVHlwZRIWChJTMF9TZXNzaW9uX0NvbW1hbmQQABIXChNTMF9TZXNzaW9uX1Jlc3BvbnNlEAE='); +@$core.Deprecated('Use s0SessionCmdDescriptor instead') const S0SessionCmd$json = const { '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 = const { '1': 'S0SessionResp', '2': const [ @@ -24,6 +34,9 @@ const S0SessionResp$json = const { ], }; +/// 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 = const { '1': 'Sec0Payload', '2': const [ @@ -36,3 +49,5 @@ const Sec0Payload$json = const { ], }; +/// Descriptor for `Sec0Payload`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List sec0PayloadDescriptor = $convert.base64Decode('CgtTZWMwUGF5bG9hZBIeCgNtc2cYASABKA4yDC5TZWMwTXNnVHlwZVIDbXNnEh8KAnNjGBQgASgLMg0uUzBTZXNzaW9uQ21kSABSAnNjEiAKAnNyGBUgASgLMg4uUzBTZXNzaW9uUmVzcEgAUgJzckIJCgdwYXlsb2Fk'); diff --git a/lib/src/proto/dart/sec0.pbserver.dart b/lib/src/proto/dart/sec0.pbserver.dart index 6dd533e..b4dd84b 100644 --- a/lib/src/proto/dart/sec0.pbserver.dart +++ b/lib/src/proto/dart/sec0.pbserver.dart @@ -2,8 +2,8 @@ // Generated code. Do not modify. // source: sec0.proto // -// @dart = 2.3 -// ignore_for_file: camel_case_types,non_constant_identifier_names,library_prefixes,unused_import,unused_shown_name,return_of_invalid_type +// @dart = 2.12 +// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,deprecated_member_use_from_same_package,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name export 'sec0.pb.dart'; diff --git a/lib/src/proto/dart/sec1.pb.dart b/lib/src/proto/dart/sec1.pb.dart index 111750f..d58ff1e 100644 --- a/lib/src/proto/dart/sec1.pb.dart +++ b/lib/src/proto/dart/sec1.pb.dart @@ -2,8 +2,8 @@ // Generated code. Do not modify. // source: sec1.proto // -// @dart = 2.3 -// ignore_for_file: camel_case_types,non_constant_identifier_names,library_prefixes,unused_import,unused_shown_name,return_of_invalid_type +// @dart = 2.12 +// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name import 'dart:core' as $core; @@ -15,17 +15,33 @@ import 'sec1.pbenum.dart'; export 'sec1.pbenum.dart'; class SessionCmd1 extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo('SessionCmd1', createEmptyInstance: create) - ..a<$core.List<$core.int>>(2, 'clientVerifyData', $pb.PbFieldType.OY) + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'SessionCmd1', createEmptyInstance: create) + ..a<$core.List<$core.int>>(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'clientVerifyData', $pb.PbFieldType.OY) ..hasRequiredFields = false ; SessionCmd1._() : super(); - factory SessionCmd1() => create(); + factory SessionCmd1({ + $core.List<$core.int>? clientVerifyData, + }) { + final _result = create(); + if (clientVerifyData != null) { + _result.clientVerifyData = clientVerifyData; + } + return _result; + } factory SessionCmd1.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); factory SessionCmd1.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') SessionCmd1 clone() => SessionCmd1()..mergeFromMessage(this); - SessionCmd1 copyWith(void Function(SessionCmd1) updates) => super.copyWith((message) => updates(message as SessionCmd1)); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + SessionCmd1 copyWith(void Function(SessionCmd1) updates) => super.copyWith((message) => updates(message as SessionCmd1)) as SessionCmd1; // ignore: deprecated_member_use $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') static SessionCmd1 create() => SessionCmd1._(); @@ -33,7 +49,7 @@ class SessionCmd1 extends $pb.GeneratedMessage { static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') static SessionCmd1 getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static SessionCmd1 _defaultInstance; + static SessionCmd1? _defaultInstance; @$pb.TagNumber(2) $core.List<$core.int> get clientVerifyData => $_getN(0); @@ -46,18 +62,38 @@ class SessionCmd1 extends $pb.GeneratedMessage { } class SessionResp1 extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo('SessionResp1', createEmptyInstance: create) - ..e<$0.Status>(1, 'status', $pb.PbFieldType.OE, defaultOrMaker: $0.Status.Success, valueOf: $0.Status.valueOf, enumValues: $0.Status.values) - ..a<$core.List<$core.int>>(3, 'deviceVerifyData', $pb.PbFieldType.OY) + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'SessionResp1', createEmptyInstance: create) + ..e<$0.Status>(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'status', $pb.PbFieldType.OE, defaultOrMaker: $0.Status.Success, valueOf: $0.Status.valueOf, enumValues: $0.Status.values) + ..a<$core.List<$core.int>>(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'deviceVerifyData', $pb.PbFieldType.OY) ..hasRequiredFields = false ; SessionResp1._() : super(); - factory SessionResp1() => create(); + factory SessionResp1({ + $0.Status? status, + $core.List<$core.int>? deviceVerifyData, + }) { + final _result = create(); + if (status != null) { + _result.status = status; + } + if (deviceVerifyData != null) { + _result.deviceVerifyData = deviceVerifyData; + } + return _result; + } factory SessionResp1.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); factory SessionResp1.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') SessionResp1 clone() => SessionResp1()..mergeFromMessage(this); - SessionResp1 copyWith(void Function(SessionResp1) updates) => super.copyWith((message) => updates(message as SessionResp1)); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + SessionResp1 copyWith(void Function(SessionResp1) updates) => super.copyWith((message) => updates(message as SessionResp1)) as SessionResp1; // ignore: deprecated_member_use $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') static SessionResp1 create() => SessionResp1._(); @@ -65,7 +101,7 @@ class SessionResp1 extends $pb.GeneratedMessage { static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') static SessionResp1 getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static SessionResp1 _defaultInstance; + static SessionResp1? _defaultInstance; @$pb.TagNumber(1) $0.Status get status => $_getN(0); @@ -87,17 +123,33 @@ class SessionResp1 extends $pb.GeneratedMessage { } class SessionCmd0 extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo('SessionCmd0', createEmptyInstance: create) - ..a<$core.List<$core.int>>(1, 'clientPubkey', $pb.PbFieldType.OY) + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'SessionCmd0', createEmptyInstance: create) + ..a<$core.List<$core.int>>(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'clientPubkey', $pb.PbFieldType.OY) ..hasRequiredFields = false ; SessionCmd0._() : super(); - factory SessionCmd0() => create(); + factory SessionCmd0({ + $core.List<$core.int>? clientPubkey, + }) { + final _result = create(); + if (clientPubkey != null) { + _result.clientPubkey = clientPubkey; + } + return _result; + } factory SessionCmd0.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); factory SessionCmd0.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') SessionCmd0 clone() => SessionCmd0()..mergeFromMessage(this); - SessionCmd0 copyWith(void Function(SessionCmd0) updates) => super.copyWith((message) => updates(message as SessionCmd0)); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + SessionCmd0 copyWith(void Function(SessionCmd0) updates) => super.copyWith((message) => updates(message as SessionCmd0)) as SessionCmd0; // ignore: deprecated_member_use $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') static SessionCmd0 create() => SessionCmd0._(); @@ -105,7 +157,7 @@ class SessionCmd0 extends $pb.GeneratedMessage { static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') static SessionCmd0 getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static SessionCmd0 _defaultInstance; + static SessionCmd0? _defaultInstance; @$pb.TagNumber(1) $core.List<$core.int> get clientPubkey => $_getN(0); @@ -118,19 +170,43 @@ class SessionCmd0 extends $pb.GeneratedMessage { } class SessionResp0 extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo('SessionResp0', createEmptyInstance: create) - ..e<$0.Status>(1, 'status', $pb.PbFieldType.OE, defaultOrMaker: $0.Status.Success, valueOf: $0.Status.valueOf, enumValues: $0.Status.values) - ..a<$core.List<$core.int>>(2, 'devicePubkey', $pb.PbFieldType.OY) - ..a<$core.List<$core.int>>(3, 'deviceRandom', $pb.PbFieldType.OY) + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'SessionResp0', createEmptyInstance: create) + ..e<$0.Status>(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'status', $pb.PbFieldType.OE, defaultOrMaker: $0.Status.Success, valueOf: $0.Status.valueOf, enumValues: $0.Status.values) + ..a<$core.List<$core.int>>(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'devicePubkey', $pb.PbFieldType.OY) + ..a<$core.List<$core.int>>(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'deviceRandom', $pb.PbFieldType.OY) ..hasRequiredFields = false ; SessionResp0._() : super(); - factory SessionResp0() => create(); + factory SessionResp0({ + $0.Status? status, + $core.List<$core.int>? devicePubkey, + $core.List<$core.int>? deviceRandom, + }) { + final _result = create(); + if (status != null) { + _result.status = status; + } + if (devicePubkey != null) { + _result.devicePubkey = devicePubkey; + } + if (deviceRandom != null) { + _result.deviceRandom = deviceRandom; + } + return _result; + } factory SessionResp0.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); factory SessionResp0.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') SessionResp0 clone() => SessionResp0()..mergeFromMessage(this); - SessionResp0 copyWith(void Function(SessionResp0) updates) => super.copyWith((message) => updates(message as SessionResp0)); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + SessionResp0 copyWith(void Function(SessionResp0) updates) => super.copyWith((message) => updates(message as SessionResp0)) as SessionResp0; // ignore: deprecated_member_use $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') static SessionResp0 create() => SessionResp0._(); @@ -138,7 +214,7 @@ class SessionResp0 extends $pb.GeneratedMessage { static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') static SessionResp0 getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static SessionResp0 _defaultInstance; + static SessionResp0? _defaultInstance; @$pb.TagNumber(1) $0.Status get status => $_getN(0); @@ -184,22 +260,54 @@ class Sec1Payload extends $pb.GeneratedMessage { 23 : Sec1Payload_Payload.sr1, 0 : Sec1Payload_Payload.notSet }; - static final $pb.BuilderInfo _i = $pb.BuilderInfo('Sec1Payload', createEmptyInstance: create) + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'Sec1Payload', createEmptyInstance: create) ..oo(0, [20, 21, 22, 23]) - ..e(1, 'msg', $pb.PbFieldType.OE, defaultOrMaker: Sec1MsgType.Session_Command0, valueOf: Sec1MsgType.valueOf, enumValues: Sec1MsgType.values) - ..aOM(20, 'sc0', subBuilder: SessionCmd0.create) - ..aOM(21, 'sr0', subBuilder: SessionResp0.create) - ..aOM(22, 'sc1', subBuilder: SessionCmd1.create) - ..aOM(23, 'sr1', subBuilder: SessionResp1.create) + ..e(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'msg', $pb.PbFieldType.OE, defaultOrMaker: Sec1MsgType.Session_Command0, valueOf: Sec1MsgType.valueOf, enumValues: Sec1MsgType.values) + ..aOM(20, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'sc0', subBuilder: SessionCmd0.create) + ..aOM(21, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'sr0', subBuilder: SessionResp0.create) + ..aOM(22, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'sc1', subBuilder: SessionCmd1.create) + ..aOM(23, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'sr1', subBuilder: SessionResp1.create) ..hasRequiredFields = false ; Sec1Payload._() : super(); - factory Sec1Payload() => create(); + factory Sec1Payload({ + Sec1MsgType? msg, + SessionCmd0? sc0, + SessionResp0? sr0, + SessionCmd1? sc1, + SessionResp1? sr1, + }) { + final _result = create(); + if (msg != null) { + _result.msg = msg; + } + if (sc0 != null) { + _result.sc0 = sc0; + } + if (sr0 != null) { + _result.sr0 = sr0; + } + if (sc1 != null) { + _result.sc1 = sc1; + } + if (sr1 != null) { + _result.sr1 = sr1; + } + return _result; + } factory Sec1Payload.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); factory Sec1Payload.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') Sec1Payload clone() => Sec1Payload()..mergeFromMessage(this); - Sec1Payload copyWith(void Function(Sec1Payload) updates) => super.copyWith((message) => updates(message as Sec1Payload)); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + Sec1Payload copyWith(void Function(Sec1Payload) updates) => super.copyWith((message) => updates(message as Sec1Payload)) as Sec1Payload; // ignore: deprecated_member_use $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') static Sec1Payload create() => Sec1Payload._(); @@ -207,9 +315,9 @@ class Sec1Payload extends $pb.GeneratedMessage { static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') static Sec1Payload getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static Sec1Payload _defaultInstance; + static Sec1Payload? _defaultInstance; - Sec1Payload_Payload whichPayload() => _Sec1Payload_PayloadByTag[$_whichOneof(0)]; + Sec1Payload_Payload whichPayload() => _Sec1Payload_PayloadByTag[$_whichOneof(0)]!; void clearPayload() => clearField($_whichOneof(0)); @$pb.TagNumber(1) diff --git a/lib/src/proto/dart/sec1.pbenum.dart b/lib/src/proto/dart/sec1.pbenum.dart index 74e5f66..9f280e4 100644 --- a/lib/src/proto/dart/sec1.pbenum.dart +++ b/lib/src/proto/dart/sec1.pbenum.dart @@ -2,18 +2,18 @@ // Generated code. Do not modify. // source: sec1.proto // -// @dart = 2.3 -// ignore_for_file: camel_case_types,non_constant_identifier_names,library_prefixes,unused_import,unused_shown_name,return_of_invalid_type +// @dart = 2.12 +// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name -// ignore_for_file: UNDEFINED_SHOWN_NAME,UNUSED_SHOWN_NAME +// ignore_for_file: UNDEFINED_SHOWN_NAME import 'dart:core' as $core; import 'package:protobuf/protobuf.dart' as $pb; class Sec1MsgType extends $pb.ProtobufEnum { - static const Sec1MsgType Session_Command0 = Sec1MsgType._(0, 'Session_Command0'); - static const Sec1MsgType Session_Response0 = Sec1MsgType._(1, 'Session_Response0'); - static const Sec1MsgType Session_Command1 = Sec1MsgType._(2, 'Session_Command1'); - static const Sec1MsgType Session_Response1 = Sec1MsgType._(3, 'Session_Response1'); + static const Sec1MsgType Session_Command0 = Sec1MsgType._(0, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'Session_Command0'); + static const Sec1MsgType Session_Response0 = Sec1MsgType._(1, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'Session_Response0'); + static const Sec1MsgType Session_Command1 = Sec1MsgType._(2, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'Session_Command1'); + static const Sec1MsgType Session_Response1 = Sec1MsgType._(3, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'Session_Response1'); static const $core.List values = [ Session_Command0, @@ -23,7 +23,7 @@ class Sec1MsgType extends $pb.ProtobufEnum { ]; static final $core.Map<$core.int, Sec1MsgType> _byValue = $pb.ProtobufEnum.initByValue(values); - static Sec1MsgType valueOf($core.int value) => _byValue[value]; + static Sec1MsgType? valueOf($core.int value) => _byValue[value]; const Sec1MsgType._($core.int v, $core.String n) : super(v, n); } diff --git a/lib/src/proto/dart/sec1.pbjson.dart b/lib/src/proto/dart/sec1.pbjson.dart index 0313061..fc2e0b0 100644 --- a/lib/src/proto/dart/sec1.pbjson.dart +++ b/lib/src/proto/dart/sec1.pbjson.dart @@ -2,9 +2,13 @@ // Generated code. Do not modify. // source: sec1.proto // -// @dart = 2.3 -// ignore_for_file: camel_case_types,non_constant_identifier_names,library_prefixes,unused_import,unused_shown_name,return_of_invalid_type +// @dart = 2.12 +// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,deprecated_member_use_from_same_package,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name +import 'dart:core' as $core; +import 'dart:convert' as $convert; +import 'dart:typed_data' as $typed_data; +@$core.Deprecated('Use sec1MsgTypeDescriptor instead') const Sec1MsgType$json = const { '1': 'Sec1MsgType', '2': const [ @@ -15,6 +19,9 @@ const Sec1MsgType$json = const { ], }; +/// Descriptor for `Sec1MsgType`. Decode as a `google.protobuf.EnumDescriptorProto`. +final $typed_data.Uint8List sec1MsgTypeDescriptor = $convert.base64Decode('CgtTZWMxTXNnVHlwZRIUChBTZXNzaW9uX0NvbW1hbmQwEAASFQoRU2Vzc2lvbl9SZXNwb25zZTAQARIUChBTZXNzaW9uX0NvbW1hbmQxEAISFQoRU2Vzc2lvbl9SZXNwb25zZTEQAw=='); +@$core.Deprecated('Use sessionCmd1Descriptor instead') const SessionCmd1$json = const { '1': 'SessionCmd1', '2': const [ @@ -22,6 +29,9 @@ const SessionCmd1$json = const { ], }; +/// Descriptor for `SessionCmd1`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List sessionCmd1Descriptor = $convert.base64Decode('CgtTZXNzaW9uQ21kMRIsChJjbGllbnRfdmVyaWZ5X2RhdGEYAiABKAxSEGNsaWVudFZlcmlmeURhdGE='); +@$core.Deprecated('Use sessionResp1Descriptor instead') const SessionResp1$json = const { '1': 'SessionResp1', '2': const [ @@ -30,6 +40,9 @@ const SessionResp1$json = const { ], }; +/// Descriptor for `SessionResp1`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List sessionResp1Descriptor = $convert.base64Decode('CgxTZXNzaW9uUmVzcDESHwoGc3RhdHVzGAEgASgOMgcuU3RhdHVzUgZzdGF0dXMSLAoSZGV2aWNlX3ZlcmlmeV9kYXRhGAMgASgMUhBkZXZpY2VWZXJpZnlEYXRh'); +@$core.Deprecated('Use sessionCmd0Descriptor instead') const SessionCmd0$json = const { '1': 'SessionCmd0', '2': const [ @@ -37,6 +50,9 @@ const SessionCmd0$json = const { ], }; +/// Descriptor for `SessionCmd0`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List sessionCmd0Descriptor = $convert.base64Decode('CgtTZXNzaW9uQ21kMBIjCg1jbGllbnRfcHVia2V5GAEgASgMUgxjbGllbnRQdWJrZXk='); +@$core.Deprecated('Use sessionResp0Descriptor instead') const SessionResp0$json = const { '1': 'SessionResp0', '2': const [ @@ -46,6 +62,9 @@ const SessionResp0$json = const { ], }; +/// Descriptor for `SessionResp0`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List sessionResp0Descriptor = $convert.base64Decode('CgxTZXNzaW9uUmVzcDASHwoGc3RhdHVzGAEgASgOMgcuU3RhdHVzUgZzdGF0dXMSIwoNZGV2aWNlX3B1YmtleRgCIAEoDFIMZGV2aWNlUHVia2V5EiMKDWRldmljZV9yYW5kb20YAyABKAxSDGRldmljZVJhbmRvbQ=='); +@$core.Deprecated('Use sec1PayloadDescriptor instead') const Sec1Payload$json = const { '1': 'Sec1Payload', '2': const [ @@ -60,3 +79,5 @@ const Sec1Payload$json = const { ], }; +/// Descriptor for `Sec1Payload`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List sec1PayloadDescriptor = $convert.base64Decode('CgtTZWMxUGF5bG9hZBIeCgNtc2cYASABKA4yDC5TZWMxTXNnVHlwZVIDbXNnEiAKA3NjMBgUIAEoCzIMLlNlc3Npb25DbWQwSABSA3NjMBIhCgNzcjAYFSABKAsyDS5TZXNzaW9uUmVzcDBIAFIDc3IwEiAKA3NjMRgWIAEoCzIMLlNlc3Npb25DbWQxSABSA3NjMRIhCgNzcjEYFyABKAsyDS5TZXNzaW9uUmVzcDFIAFIDc3IxQgkKB3BheWxvYWQ='); diff --git a/lib/src/proto/dart/sec1.pbserver.dart b/lib/src/proto/dart/sec1.pbserver.dart index 7407c1f..e7e2c8d 100644 --- a/lib/src/proto/dart/sec1.pbserver.dart +++ b/lib/src/proto/dart/sec1.pbserver.dart @@ -2,8 +2,8 @@ // Generated code. Do not modify. // source: sec1.proto // -// @dart = 2.3 -// ignore_for_file: camel_case_types,non_constant_identifier_names,library_prefixes,unused_import,unused_shown_name,return_of_invalid_type +// @dart = 2.12 +// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,deprecated_member_use_from_same_package,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name export 'sec1.pb.dart'; diff --git a/lib/src/proto/dart/session.pb.dart b/lib/src/proto/dart/session.pb.dart index 55d49b4..72f3196 100644 --- a/lib/src/proto/dart/session.pb.dart +++ b/lib/src/proto/dart/session.pb.dart @@ -2,8 +2,8 @@ // Generated code. Do not modify. // source: session.proto // -// @dart = 2.3 -// ignore_for_file: camel_case_types,non_constant_identifier_names,library_prefixes,unused_import,unused_shown_name,return_of_invalid_type +// @dart = 2.12 +// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name import 'dart:core' as $core; @@ -28,20 +28,44 @@ class SessionData extends $pb.GeneratedMessage { 11 : SessionData_Proto.sec1, 0 : SessionData_Proto.notSet }; - static final $pb.BuilderInfo _i = $pb.BuilderInfo('SessionData', createEmptyInstance: create) + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'SessionData', createEmptyInstance: create) ..oo(0, [10, 11]) - ..e(2, 'secVer', $pb.PbFieldType.OE, defaultOrMaker: SecSchemeVersion.SecScheme0, valueOf: SecSchemeVersion.valueOf, enumValues: SecSchemeVersion.values) - ..aOM<$1.Sec0Payload>(10, 'sec0', subBuilder: $1.Sec0Payload.create) - ..aOM<$2.Sec1Payload>(11, 'sec1', subBuilder: $2.Sec1Payload.create) + ..e(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'secVer', $pb.PbFieldType.OE, defaultOrMaker: SecSchemeVersion.SecScheme0, valueOf: SecSchemeVersion.valueOf, enumValues: SecSchemeVersion.values) + ..aOM<$1.Sec0Payload>(10, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'sec0', subBuilder: $1.Sec0Payload.create) + ..aOM<$2.Sec1Payload>(11, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'sec1', subBuilder: $2.Sec1Payload.create) ..hasRequiredFields = false ; SessionData._() : super(); - factory SessionData() => create(); + factory SessionData({ + SecSchemeVersion? secVer, + $1.Sec0Payload? sec0, + $2.Sec1Payload? sec1, + }) { + final _result = create(); + if (secVer != null) { + _result.secVer = secVer; + } + if (sec0 != null) { + _result.sec0 = sec0; + } + if (sec1 != null) { + _result.sec1 = sec1; + } + return _result; + } factory SessionData.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); factory SessionData.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') SessionData clone() => SessionData()..mergeFromMessage(this); - SessionData copyWith(void Function(SessionData) updates) => super.copyWith((message) => updates(message as SessionData)); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + SessionData copyWith(void Function(SessionData) updates) => super.copyWith((message) => updates(message as SessionData)) as SessionData; // ignore: deprecated_member_use $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') static SessionData create() => SessionData._(); @@ -49,9 +73,9 @@ class SessionData extends $pb.GeneratedMessage { static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') static SessionData getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static SessionData _defaultInstance; + static SessionData? _defaultInstance; - SessionData_Proto whichProto() => _SessionData_ProtoByTag[$_whichOneof(0)]; + SessionData_Proto whichProto() => _SessionData_ProtoByTag[$_whichOneof(0)]!; void clearProto() => clearField($_whichOneof(0)); @$pb.TagNumber(2) diff --git a/lib/src/proto/dart/session.pbenum.dart b/lib/src/proto/dart/session.pbenum.dart index 5e28d22..cd4f664 100644 --- a/lib/src/proto/dart/session.pbenum.dart +++ b/lib/src/proto/dart/session.pbenum.dart @@ -2,16 +2,16 @@ // Generated code. Do not modify. // source: session.proto // -// @dart = 2.3 -// ignore_for_file: camel_case_types,non_constant_identifier_names,library_prefixes,unused_import,unused_shown_name,return_of_invalid_type +// @dart = 2.12 +// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name -// ignore_for_file: UNDEFINED_SHOWN_NAME,UNUSED_SHOWN_NAME +// ignore_for_file: UNDEFINED_SHOWN_NAME import 'dart:core' as $core; import 'package:protobuf/protobuf.dart' as $pb; class SecSchemeVersion extends $pb.ProtobufEnum { - static const SecSchemeVersion SecScheme0 = SecSchemeVersion._(0, 'SecScheme0'); - static const SecSchemeVersion SecScheme1 = SecSchemeVersion._(1, 'SecScheme1'); + static const SecSchemeVersion SecScheme0 = SecSchemeVersion._(0, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'SecScheme0'); + static const SecSchemeVersion SecScheme1 = SecSchemeVersion._(1, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'SecScheme1'); static const $core.List values = [ SecScheme0, @@ -19,7 +19,7 @@ class SecSchemeVersion extends $pb.ProtobufEnum { ]; static final $core.Map<$core.int, SecSchemeVersion> _byValue = $pb.ProtobufEnum.initByValue(values); - static SecSchemeVersion valueOf($core.int value) => _byValue[value]; + static SecSchemeVersion? valueOf($core.int value) => _byValue[value]; const SecSchemeVersion._($core.int v, $core.String n) : super(v, n); } diff --git a/lib/src/proto/dart/session.pbjson.dart b/lib/src/proto/dart/session.pbjson.dart index b1edf0d..73a62ac 100644 --- a/lib/src/proto/dart/session.pbjson.dart +++ b/lib/src/proto/dart/session.pbjson.dart @@ -2,9 +2,13 @@ // Generated code. Do not modify. // source: session.proto // -// @dart = 2.3 -// ignore_for_file: camel_case_types,non_constant_identifier_names,library_prefixes,unused_import,unused_shown_name,return_of_invalid_type +// @dart = 2.12 +// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,deprecated_member_use_from_same_package,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name +import 'dart:core' as $core; +import 'dart:convert' as $convert; +import 'dart:typed_data' as $typed_data; +@$core.Deprecated('Use secSchemeVersionDescriptor instead') const SecSchemeVersion$json = const { '1': 'SecSchemeVersion', '2': const [ @@ -13,6 +17,9 @@ const SecSchemeVersion$json = const { ], }; +/// Descriptor for `SecSchemeVersion`. Decode as a `google.protobuf.EnumDescriptorProto`. +final $typed_data.Uint8List secSchemeVersionDescriptor = $convert.base64Decode('ChBTZWNTY2hlbWVWZXJzaW9uEg4KClNlY1NjaGVtZTAQABIOCgpTZWNTY2hlbWUxEAE='); +@$core.Deprecated('Use sessionDataDescriptor instead') const SessionData$json = const { '1': 'SessionData', '2': const [ @@ -25,3 +32,5 @@ const SessionData$json = const { ], }; +/// Descriptor for `SessionData`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List sessionDataDescriptor = $convert.base64Decode('CgtTZXNzaW9uRGF0YRIqCgdzZWNfdmVyGAIgASgOMhEuU2VjU2NoZW1lVmVyc2lvblIGc2VjVmVyEiIKBHNlYzAYCiABKAsyDC5TZWMwUGF5bG9hZEgAUgRzZWMwEiIKBHNlYzEYCyABKAsyDC5TZWMxUGF5bG9hZEgAUgRzZWMxQgcKBXByb3Rv'); diff --git a/lib/src/proto/dart/session.pbserver.dart b/lib/src/proto/dart/session.pbserver.dart index e36b0d2..b0e6883 100644 --- a/lib/src/proto/dart/session.pbserver.dart +++ b/lib/src/proto/dart/session.pbserver.dart @@ -2,8 +2,8 @@ // Generated code. Do not modify. // source: session.proto // -// @dart = 2.3 -// ignore_for_file: camel_case_types,non_constant_identifier_names,library_prefixes,unused_import,unused_shown_name,return_of_invalid_type +// @dart = 2.12 +// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,deprecated_member_use_from_same_package,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name export 'session.pb.dart'; diff --git a/lib/src/proto/dart/wifi_config.pb.dart b/lib/src/proto/dart/wifi_config.pb.dart index a805206..68b22f2 100644 --- a/lib/src/proto/dart/wifi_config.pb.dart +++ b/lib/src/proto/dart/wifi_config.pb.dart @@ -2,8 +2,8 @@ // Generated code. Do not modify. // source: wifi_config.proto // -// @dart = 2.3 -// ignore_for_file: camel_case_types,non_constant_identifier_names,library_prefixes,unused_import,unused_shown_name,return_of_invalid_type +// @dart = 2.12 +// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name import 'dart:core' as $core; @@ -18,7 +18,7 @@ import 'wifi_config.pbenum.dart'; export 'wifi_config.pbenum.dart'; class CmdGetStatus extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo('CmdGetStatus', createEmptyInstance: create) + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'CmdGetStatus', createEmptyInstance: create) ..hasRequiredFields = false ; @@ -26,8 +26,16 @@ class CmdGetStatus extends $pb.GeneratedMessage { factory CmdGetStatus() => create(); factory CmdGetStatus.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); factory CmdGetStatus.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') CmdGetStatus clone() => CmdGetStatus()..mergeFromMessage(this); - CmdGetStatus copyWith(void Function(CmdGetStatus) updates) => super.copyWith((message) => updates(message as CmdGetStatus)); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + CmdGetStatus copyWith(void Function(CmdGetStatus) updates) => super.copyWith((message) => updates(message as CmdGetStatus)) as CmdGetStatus; // ignore: deprecated_member_use $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') static CmdGetStatus create() => CmdGetStatus._(); @@ -35,7 +43,7 @@ class CmdGetStatus extends $pb.GeneratedMessage { static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') static CmdGetStatus getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static CmdGetStatus _defaultInstance; + static CmdGetStatus? _defaultInstance; } enum RespGetStatus_State { @@ -50,21 +58,49 @@ class RespGetStatus extends $pb.GeneratedMessage { 11 : RespGetStatus_State.connected, 0 : RespGetStatus_State.notSet }; - static final $pb.BuilderInfo _i = $pb.BuilderInfo('RespGetStatus', createEmptyInstance: create) + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'RespGetStatus', createEmptyInstance: create) ..oo(0, [10, 11]) - ..e<$0.Status>(1, 'status', $pb.PbFieldType.OE, defaultOrMaker: $0.Status.Success, valueOf: $0.Status.valueOf, enumValues: $0.Status.values) - ..e<$3.WifiStationState>(2, 'staState', $pb.PbFieldType.OE, defaultOrMaker: $3.WifiStationState.Connected, valueOf: $3.WifiStationState.valueOf, enumValues: $3.WifiStationState.values) - ..e<$3.WifiConnectFailedReason>(10, 'failReason', $pb.PbFieldType.OE, defaultOrMaker: $3.WifiConnectFailedReason.AuthError, valueOf: $3.WifiConnectFailedReason.valueOf, enumValues: $3.WifiConnectFailedReason.values) - ..aOM<$3.WifiConnectedState>(11, 'connected', subBuilder: $3.WifiConnectedState.create) + ..e<$0.Status>(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'status', $pb.PbFieldType.OE, defaultOrMaker: $0.Status.Success, valueOf: $0.Status.valueOf, enumValues: $0.Status.values) + ..e<$3.WifiStationState>(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'staState', $pb.PbFieldType.OE, defaultOrMaker: $3.WifiStationState.Connected, valueOf: $3.WifiStationState.valueOf, enumValues: $3.WifiStationState.values) + ..e<$3.WifiConnectFailedReason>(10, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'failReason', $pb.PbFieldType.OE, defaultOrMaker: $3.WifiConnectFailedReason.AuthError, valueOf: $3.WifiConnectFailedReason.valueOf, enumValues: $3.WifiConnectFailedReason.values) + ..aOM<$3.WifiConnectedState>(11, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'connected', subBuilder: $3.WifiConnectedState.create) ..hasRequiredFields = false ; RespGetStatus._() : super(); - factory RespGetStatus() => create(); + factory RespGetStatus({ + $0.Status? status, + $3.WifiStationState? staState, + $3.WifiConnectFailedReason? failReason, + $3.WifiConnectedState? connected, + }) { + final _result = create(); + if (status != null) { + _result.status = status; + } + if (staState != null) { + _result.staState = staState; + } + if (failReason != null) { + _result.failReason = failReason; + } + if (connected != null) { + _result.connected = connected; + } + return _result; + } factory RespGetStatus.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); factory RespGetStatus.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') RespGetStatus clone() => RespGetStatus()..mergeFromMessage(this); - RespGetStatus copyWith(void Function(RespGetStatus) updates) => super.copyWith((message) => updates(message as RespGetStatus)); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + RespGetStatus copyWith(void Function(RespGetStatus) updates) => super.copyWith((message) => updates(message as RespGetStatus)) as RespGetStatus; // ignore: deprecated_member_use $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') static RespGetStatus create() => RespGetStatus._(); @@ -72,9 +108,9 @@ class RespGetStatus extends $pb.GeneratedMessage { static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') static RespGetStatus getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static RespGetStatus _defaultInstance; + static RespGetStatus? _defaultInstance; - RespGetStatus_State whichState() => _RespGetStatus_StateByTag[$_whichOneof(0)]; + RespGetStatus_State whichState() => _RespGetStatus_StateByTag[$_whichOneof(0)]!; void clearState() => clearField($_whichOneof(0)); @$pb.TagNumber(1) @@ -117,20 +153,48 @@ class RespGetStatus extends $pb.GeneratedMessage { } class CmdSetConfig extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo('CmdSetConfig', createEmptyInstance: create) - ..a<$core.List<$core.int>>(1, 'ssid', $pb.PbFieldType.OY) - ..a<$core.List<$core.int>>(2, 'passphrase', $pb.PbFieldType.OY) - ..a<$core.List<$core.int>>(3, 'bssid', $pb.PbFieldType.OY) - ..a<$core.int>(4, 'channel', $pb.PbFieldType.O3) + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'CmdSetConfig', createEmptyInstance: create) + ..a<$core.List<$core.int>>(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'ssid', $pb.PbFieldType.OY) + ..a<$core.List<$core.int>>(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'passphrase', $pb.PbFieldType.OY) + ..a<$core.List<$core.int>>(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'bssid', $pb.PbFieldType.OY) + ..a<$core.int>(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'channel', $pb.PbFieldType.O3) ..hasRequiredFields = false ; CmdSetConfig._() : super(); - factory CmdSetConfig() => create(); + factory CmdSetConfig({ + $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; + } factory CmdSetConfig.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); factory CmdSetConfig.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') CmdSetConfig clone() => CmdSetConfig()..mergeFromMessage(this); - CmdSetConfig copyWith(void Function(CmdSetConfig) updates) => super.copyWith((message) => updates(message as CmdSetConfig)); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + CmdSetConfig copyWith(void Function(CmdSetConfig) updates) => super.copyWith((message) => updates(message as CmdSetConfig)) as CmdSetConfig; // ignore: deprecated_member_use $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') static CmdSetConfig create() => CmdSetConfig._(); @@ -138,7 +202,7 @@ class CmdSetConfig extends $pb.GeneratedMessage { static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') static CmdSetConfig getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static CmdSetConfig _defaultInstance; + static CmdSetConfig? _defaultInstance; @$pb.TagNumber(1) $core.List<$core.int> get ssid => $_getN(0); @@ -178,17 +242,33 @@ class CmdSetConfig extends $pb.GeneratedMessage { } class RespSetConfig extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo('RespSetConfig', createEmptyInstance: create) - ..e<$0.Status>(1, 'status', $pb.PbFieldType.OE, defaultOrMaker: $0.Status.Success, valueOf: $0.Status.valueOf, enumValues: $0.Status.values) + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'RespSetConfig', createEmptyInstance: create) + ..e<$0.Status>(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'status', $pb.PbFieldType.OE, defaultOrMaker: $0.Status.Success, valueOf: $0.Status.valueOf, enumValues: $0.Status.values) ..hasRequiredFields = false ; RespSetConfig._() : super(); - factory RespSetConfig() => create(); + factory RespSetConfig({ + $0.Status? status, + }) { + final _result = create(); + if (status != null) { + _result.status = status; + } + return _result; + } factory RespSetConfig.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); factory RespSetConfig.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') RespSetConfig clone() => RespSetConfig()..mergeFromMessage(this); - RespSetConfig copyWith(void Function(RespSetConfig) updates) => super.copyWith((message) => updates(message as RespSetConfig)); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + RespSetConfig copyWith(void Function(RespSetConfig) updates) => super.copyWith((message) => updates(message as RespSetConfig)) as RespSetConfig; // ignore: deprecated_member_use $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') static RespSetConfig create() => RespSetConfig._(); @@ -196,7 +276,7 @@ class RespSetConfig extends $pb.GeneratedMessage { static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') static RespSetConfig getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static RespSetConfig _defaultInstance; + static RespSetConfig? _defaultInstance; @$pb.TagNumber(1) $0.Status get status => $_getN(0); @@ -209,7 +289,7 @@ class RespSetConfig extends $pb.GeneratedMessage { } class CmdApplyConfig extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo('CmdApplyConfig', createEmptyInstance: create) + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'CmdApplyConfig', createEmptyInstance: create) ..hasRequiredFields = false ; @@ -217,8 +297,16 @@ class CmdApplyConfig extends $pb.GeneratedMessage { factory CmdApplyConfig() => create(); factory CmdApplyConfig.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); factory CmdApplyConfig.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') CmdApplyConfig clone() => CmdApplyConfig()..mergeFromMessage(this); - CmdApplyConfig copyWith(void Function(CmdApplyConfig) updates) => super.copyWith((message) => updates(message as CmdApplyConfig)); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + CmdApplyConfig copyWith(void Function(CmdApplyConfig) updates) => super.copyWith((message) => updates(message as CmdApplyConfig)) as CmdApplyConfig; // ignore: deprecated_member_use $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') static CmdApplyConfig create() => CmdApplyConfig._(); @@ -226,21 +314,37 @@ class CmdApplyConfig extends $pb.GeneratedMessage { static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') static CmdApplyConfig getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static CmdApplyConfig _defaultInstance; + static CmdApplyConfig? _defaultInstance; } class RespApplyConfig extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo('RespApplyConfig', createEmptyInstance: create) - ..e<$0.Status>(1, 'status', $pb.PbFieldType.OE, defaultOrMaker: $0.Status.Success, valueOf: $0.Status.valueOf, enumValues: $0.Status.values) + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'RespApplyConfig', createEmptyInstance: create) + ..e<$0.Status>(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'status', $pb.PbFieldType.OE, defaultOrMaker: $0.Status.Success, valueOf: $0.Status.valueOf, enumValues: $0.Status.values) ..hasRequiredFields = false ; RespApplyConfig._() : super(); - factory RespApplyConfig() => create(); + factory RespApplyConfig({ + $0.Status? status, + }) { + final _result = create(); + if (status != null) { + _result.status = status; + } + return _result; + } factory RespApplyConfig.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); factory RespApplyConfig.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') RespApplyConfig clone() => RespApplyConfig()..mergeFromMessage(this); - RespApplyConfig copyWith(void Function(RespApplyConfig) updates) => super.copyWith((message) => updates(message as RespApplyConfig)); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + RespApplyConfig copyWith(void Function(RespApplyConfig) updates) => super.copyWith((message) => updates(message as RespApplyConfig)) as RespApplyConfig; // ignore: deprecated_member_use $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') static RespApplyConfig create() => RespApplyConfig._(); @@ -248,7 +352,7 @@ class RespApplyConfig extends $pb.GeneratedMessage { static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') static RespApplyConfig getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static RespApplyConfig _defaultInstance; + static RespApplyConfig? _defaultInstance; @$pb.TagNumber(1) $0.Status get status => $_getN(0); @@ -280,24 +384,64 @@ class WiFiConfigPayload extends $pb.GeneratedMessage { 15 : WiFiConfigPayload_Payload.respApplyConfig, 0 : WiFiConfigPayload_Payload.notSet }; - static final $pb.BuilderInfo _i = $pb.BuilderInfo('WiFiConfigPayload', createEmptyInstance: create) + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'WiFiConfigPayload', createEmptyInstance: create) ..oo(0, [10, 11, 12, 13, 14, 15]) - ..e(1, 'msg', $pb.PbFieldType.OE, defaultOrMaker: WiFiConfigMsgType.TypeCmdGetStatus, valueOf: WiFiConfigMsgType.valueOf, enumValues: WiFiConfigMsgType.values) - ..aOM(10, 'cmdGetStatus', subBuilder: CmdGetStatus.create) - ..aOM(11, 'respGetStatus', subBuilder: RespGetStatus.create) - ..aOM(12, 'cmdSetConfig', subBuilder: CmdSetConfig.create) - ..aOM(13, 'respSetConfig', subBuilder: RespSetConfig.create) - ..aOM(14, 'cmdApplyConfig', subBuilder: CmdApplyConfig.create) - ..aOM(15, 'respApplyConfig', subBuilder: RespApplyConfig.create) + ..e(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'msg', $pb.PbFieldType.OE, defaultOrMaker: WiFiConfigMsgType.TypeCmdGetStatus, valueOf: WiFiConfigMsgType.valueOf, enumValues: WiFiConfigMsgType.values) + ..aOM(10, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'cmdGetStatus', subBuilder: CmdGetStatus.create) + ..aOM(11, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'respGetStatus', subBuilder: RespGetStatus.create) + ..aOM(12, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'cmdSetConfig', subBuilder: CmdSetConfig.create) + ..aOM(13, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'respSetConfig', subBuilder: RespSetConfig.create) + ..aOM(14, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'cmdApplyConfig', subBuilder: CmdApplyConfig.create) + ..aOM(15, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'respApplyConfig', subBuilder: RespApplyConfig.create) ..hasRequiredFields = false ; WiFiConfigPayload._() : super(); - factory WiFiConfigPayload() => create(); + factory WiFiConfigPayload({ + WiFiConfigMsgType? msg, + CmdGetStatus? cmdGetStatus, + RespGetStatus? respGetStatus, + CmdSetConfig? cmdSetConfig, + RespSetConfig? respSetConfig, + CmdApplyConfig? cmdApplyConfig, + RespApplyConfig? respApplyConfig, + }) { + final _result = create(); + if (msg != null) { + _result.msg = msg; + } + if (cmdGetStatus != null) { + _result.cmdGetStatus = cmdGetStatus; + } + if (respGetStatus != null) { + _result.respGetStatus = respGetStatus; + } + if (cmdSetConfig != null) { + _result.cmdSetConfig = cmdSetConfig; + } + if (respSetConfig != null) { + _result.respSetConfig = respSetConfig; + } + if (cmdApplyConfig != null) { + _result.cmdApplyConfig = cmdApplyConfig; + } + if (respApplyConfig != null) { + _result.respApplyConfig = respApplyConfig; + } + return _result; + } factory WiFiConfigPayload.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); factory WiFiConfigPayload.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') WiFiConfigPayload clone() => WiFiConfigPayload()..mergeFromMessage(this); - WiFiConfigPayload copyWith(void Function(WiFiConfigPayload) updates) => super.copyWith((message) => updates(message as WiFiConfigPayload)); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + WiFiConfigPayload copyWith(void Function(WiFiConfigPayload) updates) => super.copyWith((message) => updates(message as WiFiConfigPayload)) as WiFiConfigPayload; // ignore: deprecated_member_use $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') static WiFiConfigPayload create() => WiFiConfigPayload._(); @@ -305,9 +449,9 @@ class WiFiConfigPayload extends $pb.GeneratedMessage { static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') static WiFiConfigPayload getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static WiFiConfigPayload _defaultInstance; + static WiFiConfigPayload? _defaultInstance; - WiFiConfigPayload_Payload whichPayload() => _WiFiConfigPayload_PayloadByTag[$_whichOneof(0)]; + WiFiConfigPayload_Payload whichPayload() => _WiFiConfigPayload_PayloadByTag[$_whichOneof(0)]!; void clearPayload() => clearField($_whichOneof(0)); @$pb.TagNumber(1) diff --git a/lib/src/proto/dart/wifi_config.pbenum.dart b/lib/src/proto/dart/wifi_config.pbenum.dart index ce735af..1fcdd21 100644 --- a/lib/src/proto/dart/wifi_config.pbenum.dart +++ b/lib/src/proto/dart/wifi_config.pbenum.dart @@ -2,20 +2,20 @@ // Generated code. Do not modify. // source: wifi_config.proto // -// @dart = 2.3 -// ignore_for_file: camel_case_types,non_constant_identifier_names,library_prefixes,unused_import,unused_shown_name,return_of_invalid_type +// @dart = 2.12 +// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name -// ignore_for_file: UNDEFINED_SHOWN_NAME,UNUSED_SHOWN_NAME +// ignore_for_file: UNDEFINED_SHOWN_NAME import 'dart:core' as $core; import 'package:protobuf/protobuf.dart' as $pb; class WiFiConfigMsgType extends $pb.ProtobufEnum { - static const WiFiConfigMsgType TypeCmdGetStatus = WiFiConfigMsgType._(0, 'TypeCmdGetStatus'); - static const WiFiConfigMsgType TypeRespGetStatus = WiFiConfigMsgType._(1, 'TypeRespGetStatus'); - static const WiFiConfigMsgType TypeCmdSetConfig = WiFiConfigMsgType._(2, 'TypeCmdSetConfig'); - static const WiFiConfigMsgType TypeRespSetConfig = WiFiConfigMsgType._(3, 'TypeRespSetConfig'); - static const WiFiConfigMsgType TypeCmdApplyConfig = WiFiConfigMsgType._(4, 'TypeCmdApplyConfig'); - static const WiFiConfigMsgType TypeRespApplyConfig = WiFiConfigMsgType._(5, 'TypeRespApplyConfig'); + static const WiFiConfigMsgType TypeCmdGetStatus = WiFiConfigMsgType._(0, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'TypeCmdGetStatus'); + static const WiFiConfigMsgType TypeRespGetStatus = WiFiConfigMsgType._(1, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'TypeRespGetStatus'); + static const WiFiConfigMsgType TypeCmdSetConfig = WiFiConfigMsgType._(2, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'TypeCmdSetConfig'); + static const WiFiConfigMsgType TypeRespSetConfig = WiFiConfigMsgType._(3, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'TypeRespSetConfig'); + static const WiFiConfigMsgType TypeCmdApplyConfig = WiFiConfigMsgType._(4, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'TypeCmdApplyConfig'); + static const WiFiConfigMsgType TypeRespApplyConfig = WiFiConfigMsgType._(5, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'TypeRespApplyConfig'); static const $core.List values = [ TypeCmdGetStatus, @@ -27,7 +27,7 @@ class WiFiConfigMsgType extends $pb.ProtobufEnum { ]; static final $core.Map<$core.int, WiFiConfigMsgType> _byValue = $pb.ProtobufEnum.initByValue(values); - static WiFiConfigMsgType valueOf($core.int value) => _byValue[value]; + static WiFiConfigMsgType? valueOf($core.int value) => _byValue[value]; const WiFiConfigMsgType._($core.int v, $core.String n) : super(v, n); } diff --git a/lib/src/proto/dart/wifi_config.pbjson.dart b/lib/src/proto/dart/wifi_config.pbjson.dart index bedeaef..0712cfb 100644 --- a/lib/src/proto/dart/wifi_config.pbjson.dart +++ b/lib/src/proto/dart/wifi_config.pbjson.dart @@ -2,9 +2,13 @@ // Generated code. Do not modify. // source: wifi_config.proto // -// @dart = 2.3 -// ignore_for_file: camel_case_types,non_constant_identifier_names,library_prefixes,unused_import,unused_shown_name,return_of_invalid_type +// @dart = 2.12 +// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,deprecated_member_use_from_same_package,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name +import 'dart:core' as $core; +import 'dart:convert' as $convert; +import 'dart:typed_data' as $typed_data; +@$core.Deprecated('Use wiFiConfigMsgTypeDescriptor instead') const WiFiConfigMsgType$json = const { '1': 'WiFiConfigMsgType', '2': const [ @@ -17,10 +21,16 @@ const WiFiConfigMsgType$json = const { ], }; +/// Descriptor for `WiFiConfigMsgType`. Decode as a `google.protobuf.EnumDescriptorProto`. +final $typed_data.Uint8List wiFiConfigMsgTypeDescriptor = $convert.base64Decode('ChFXaUZpQ29uZmlnTXNnVHlwZRIUChBUeXBlQ21kR2V0U3RhdHVzEAASFQoRVHlwZVJlc3BHZXRTdGF0dXMQARIUChBUeXBlQ21kU2V0Q29uZmlnEAISFQoRVHlwZVJlc3BTZXRDb25maWcQAxIWChJUeXBlQ21kQXBwbHlDb25maWcQBBIXChNUeXBlUmVzcEFwcGx5Q29uZmlnEAU='); +@$core.Deprecated('Use cmdGetStatusDescriptor instead') const CmdGetStatus$json = const { '1': 'CmdGetStatus', }; +/// Descriptor for `CmdGetStatus`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List cmdGetStatusDescriptor = $convert.base64Decode('CgxDbWRHZXRTdGF0dXM='); +@$core.Deprecated('Use respGetStatusDescriptor instead') const RespGetStatus$json = const { '1': 'RespGetStatus', '2': const [ @@ -34,6 +44,9 @@ const RespGetStatus$json = const { ], }; +/// Descriptor for `RespGetStatus`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List respGetStatusDescriptor = $convert.base64Decode('Cg1SZXNwR2V0U3RhdHVzEh8KBnN0YXR1cxgBIAEoDjIHLlN0YXR1c1IGc3RhdHVzEi4KCXN0YV9zdGF0ZRgCIAEoDjIRLldpZmlTdGF0aW9uU3RhdGVSCHN0YVN0YXRlEjsKC2ZhaWxfcmVhc29uGAogASgOMhguV2lmaUNvbm5lY3RGYWlsZWRSZWFzb25IAFIKZmFpbFJlYXNvbhIzCgljb25uZWN0ZWQYCyABKAsyEy5XaWZpQ29ubmVjdGVkU3RhdGVIAFIJY29ubmVjdGVkQgcKBXN0YXRl'); +@$core.Deprecated('Use cmdSetConfigDescriptor instead') const CmdSetConfig$json = const { '1': 'CmdSetConfig', '2': const [ @@ -44,6 +57,9 @@ const CmdSetConfig$json = const { ], }; +/// Descriptor for `CmdSetConfig`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List cmdSetConfigDescriptor = $convert.base64Decode('CgxDbWRTZXRDb25maWcSEgoEc3NpZBgBIAEoDFIEc3NpZBIeCgpwYXNzcGhyYXNlGAIgASgMUgpwYXNzcGhyYXNlEhQKBWJzc2lkGAMgASgMUgVic3NpZBIYCgdjaGFubmVsGAQgASgFUgdjaGFubmVs'); +@$core.Deprecated('Use respSetConfigDescriptor instead') const RespSetConfig$json = const { '1': 'RespSetConfig', '2': const [ @@ -51,10 +67,16 @@ const RespSetConfig$json = const { ], }; +/// Descriptor for `RespSetConfig`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List respSetConfigDescriptor = $convert.base64Decode('Cg1SZXNwU2V0Q29uZmlnEh8KBnN0YXR1cxgBIAEoDjIHLlN0YXR1c1IGc3RhdHVz'); +@$core.Deprecated('Use cmdApplyConfigDescriptor instead') const CmdApplyConfig$json = const { '1': 'CmdApplyConfig', }; +/// Descriptor for `CmdApplyConfig`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List cmdApplyConfigDescriptor = $convert.base64Decode('Cg5DbWRBcHBseUNvbmZpZw=='); +@$core.Deprecated('Use respApplyConfigDescriptor instead') const RespApplyConfig$json = const { '1': 'RespApplyConfig', '2': const [ @@ -62,6 +84,9 @@ const RespApplyConfig$json = const { ], }; +/// Descriptor for `RespApplyConfig`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List respApplyConfigDescriptor = $convert.base64Decode('Cg9SZXNwQXBwbHlDb25maWcSHwoGc3RhdHVzGAEgASgOMgcuU3RhdHVzUgZzdGF0dXM='); +@$core.Deprecated('Use wiFiConfigPayloadDescriptor instead') const WiFiConfigPayload$json = const { '1': 'WiFiConfigPayload', '2': const [ @@ -78,3 +103,5 @@ const WiFiConfigPayload$json = const { ], }; +/// Descriptor for `WiFiConfigPayload`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List wiFiConfigPayloadDescriptor = $convert.base64Decode('ChFXaUZpQ29uZmlnUGF5bG9hZBIkCgNtc2cYASABKA4yEi5XaUZpQ29uZmlnTXNnVHlwZVIDbXNnEjUKDmNtZF9nZXRfc3RhdHVzGAogASgLMg0uQ21kR2V0U3RhdHVzSABSDGNtZEdldFN0YXR1cxI4Cg9yZXNwX2dldF9zdGF0dXMYCyABKAsyDi5SZXNwR2V0U3RhdHVzSABSDXJlc3BHZXRTdGF0dXMSNQoOY21kX3NldF9jb25maWcYDCABKAsyDS5DbWRTZXRDb25maWdIAFIMY21kU2V0Q29uZmlnEjgKD3Jlc3Bfc2V0X2NvbmZpZxgNIAEoCzIOLlJlc3BTZXRDb25maWdIAFINcmVzcFNldENvbmZpZxI7ChBjbWRfYXBwbHlfY29uZmlnGA4gASgLMg8uQ21kQXBwbHlDb25maWdIAFIOY21kQXBwbHlDb25maWcSPgoRcmVzcF9hcHBseV9jb25maWcYDyABKAsyEC5SZXNwQXBwbHlDb25maWdIAFIPcmVzcEFwcGx5Q29uZmlnQgkKB3BheWxvYWQ='); diff --git a/lib/src/proto/dart/wifi_config.pbserver.dart b/lib/src/proto/dart/wifi_config.pbserver.dart index 86bd9da..4c76348 100644 --- a/lib/src/proto/dart/wifi_config.pbserver.dart +++ b/lib/src/proto/dart/wifi_config.pbserver.dart @@ -2,8 +2,8 @@ // Generated code. Do not modify. // source: wifi_config.proto // -// @dart = 2.3 -// ignore_for_file: camel_case_types,non_constant_identifier_names,library_prefixes,unused_import,unused_shown_name,return_of_invalid_type +// @dart = 2.12 +// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,deprecated_member_use_from_same_package,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name export 'wifi_config.pb.dart'; diff --git a/lib/src/proto/dart/wifi_constants.pb.dart b/lib/src/proto/dart/wifi_constants.pb.dart index d434307..89a4d39 100644 --- a/lib/src/proto/dart/wifi_constants.pb.dart +++ b/lib/src/proto/dart/wifi_constants.pb.dart @@ -2,8 +2,8 @@ // Generated code. Do not modify. // source: wifi_constants.proto // -// @dart = 2.3 -// ignore_for_file: camel_case_types,non_constant_identifier_names,library_prefixes,unused_import,unused_shown_name,return_of_invalid_type +// @dart = 2.12 +// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name import 'dart:core' as $core; @@ -14,21 +14,53 @@ import 'wifi_constants.pbenum.dart'; export 'wifi_constants.pbenum.dart'; class WifiConnectedState extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo('WifiConnectedState', createEmptyInstance: create) - ..aOS(1, 'ip4Addr') - ..e(2, 'authMode', $pb.PbFieldType.OE, defaultOrMaker: WifiAuthMode.Open, valueOf: WifiAuthMode.valueOf, enumValues: WifiAuthMode.values) - ..a<$core.List<$core.int>>(3, 'ssid', $pb.PbFieldType.OY) - ..a<$core.List<$core.int>>(4, 'bssid', $pb.PbFieldType.OY) - ..a<$core.int>(5, 'channel', $pb.PbFieldType.O3) + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'WifiConnectedState', createEmptyInstance: create) + ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'ip4Addr') + ..e(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'authMode', $pb.PbFieldType.OE, defaultOrMaker: WifiAuthMode.Open, valueOf: WifiAuthMode.valueOf, enumValues: WifiAuthMode.values) + ..a<$core.List<$core.int>>(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'ssid', $pb.PbFieldType.OY) + ..a<$core.List<$core.int>>(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'bssid', $pb.PbFieldType.OY) + ..a<$core.int>(5, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'channel', $pb.PbFieldType.O3) ..hasRequiredFields = false ; WifiConnectedState._() : super(); - factory WifiConnectedState() => create(); + 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; + } factory WifiConnectedState.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); factory WifiConnectedState.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') WifiConnectedState clone() => WifiConnectedState()..mergeFromMessage(this); - WifiConnectedState copyWith(void Function(WifiConnectedState) updates) => super.copyWith((message) => updates(message as WifiConnectedState)); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + WifiConnectedState copyWith(void Function(WifiConnectedState) updates) => super.copyWith((message) => updates(message as WifiConnectedState)) as WifiConnectedState; // ignore: deprecated_member_use $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') static WifiConnectedState create() => WifiConnectedState._(); @@ -36,7 +68,7 @@ class WifiConnectedState extends $pb.GeneratedMessage { static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') static WifiConnectedState getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static WifiConnectedState _defaultInstance; + static WifiConnectedState? _defaultInstance; @$pb.TagNumber(1) $core.String get ip4Addr => $_getSZ(0); diff --git a/lib/src/proto/dart/wifi_constants.pbenum.dart b/lib/src/proto/dart/wifi_constants.pbenum.dart index 2453f6d..a498bf9 100644 --- a/lib/src/proto/dart/wifi_constants.pbenum.dart +++ b/lib/src/proto/dart/wifi_constants.pbenum.dart @@ -2,18 +2,18 @@ // Generated code. Do not modify. // source: wifi_constants.proto // -// @dart = 2.3 -// ignore_for_file: camel_case_types,non_constant_identifier_names,library_prefixes,unused_import,unused_shown_name,return_of_invalid_type +// @dart = 2.12 +// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name -// ignore_for_file: UNDEFINED_SHOWN_NAME,UNUSED_SHOWN_NAME +// ignore_for_file: UNDEFINED_SHOWN_NAME import 'dart:core' as $core; import 'package:protobuf/protobuf.dart' as $pb; class WifiStationState extends $pb.ProtobufEnum { - static const WifiStationState Connected = WifiStationState._(0, 'Connected'); - static const WifiStationState Connecting = WifiStationState._(1, 'Connecting'); - static const WifiStationState Disconnected = WifiStationState._(2, 'Disconnected'); - static const WifiStationState ConnectionFailed = WifiStationState._(3, 'ConnectionFailed'); + static const WifiStationState Connected = WifiStationState._(0, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'Connected'); + static const WifiStationState Connecting = WifiStationState._(1, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'Connecting'); + static const WifiStationState Disconnected = WifiStationState._(2, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'Disconnected'); + static const WifiStationState ConnectionFailed = WifiStationState._(3, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'ConnectionFailed'); static const $core.List values = [ Connected, @@ -23,14 +23,14 @@ class WifiStationState extends $pb.ProtobufEnum { ]; static final $core.Map<$core.int, WifiStationState> _byValue = $pb.ProtobufEnum.initByValue(values); - static WifiStationState valueOf($core.int value) => _byValue[value]; + static WifiStationState? valueOf($core.int value) => _byValue[value]; const WifiStationState._($core.int v, $core.String n) : super(v, n); } class WifiConnectFailedReason extends $pb.ProtobufEnum { - static const WifiConnectFailedReason AuthError = WifiConnectFailedReason._(0, 'AuthError'); - static const WifiConnectFailedReason NetworkNotFound = WifiConnectFailedReason._(1, 'NetworkNotFound'); + static const WifiConnectFailedReason AuthError = WifiConnectFailedReason._(0, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'AuthError'); + static const WifiConnectFailedReason NetworkNotFound = WifiConnectFailedReason._(1, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'NetworkNotFound'); static const $core.List values = [ AuthError, @@ -38,18 +38,18 @@ class WifiConnectFailedReason extends $pb.ProtobufEnum { ]; static final $core.Map<$core.int, WifiConnectFailedReason> _byValue = $pb.ProtobufEnum.initByValue(values); - static WifiConnectFailedReason valueOf($core.int value) => _byValue[value]; + static WifiConnectFailedReason? valueOf($core.int value) => _byValue[value]; const WifiConnectFailedReason._($core.int v, $core.String n) : super(v, n); } class WifiAuthMode extends $pb.ProtobufEnum { - static const WifiAuthMode Open = WifiAuthMode._(0, 'Open'); - static const WifiAuthMode WEP = WifiAuthMode._(1, 'WEP'); - static const WifiAuthMode WPA_PSK = WifiAuthMode._(2, 'WPA_PSK'); - static const WifiAuthMode WPA2_PSK = WifiAuthMode._(3, 'WPA2_PSK'); - static const WifiAuthMode WPA_WPA2_PSK = WifiAuthMode._(4, 'WPA_WPA2_PSK'); - static const WifiAuthMode WPA2_ENTERPRISE = WifiAuthMode._(5, 'WPA2_ENTERPRISE'); + static const WifiAuthMode Open = WifiAuthMode._(0, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'Open'); + static const WifiAuthMode WEP = WifiAuthMode._(1, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'WEP'); + static const WifiAuthMode WPA_PSK = WifiAuthMode._(2, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'WPA_PSK'); + static const WifiAuthMode WPA2_PSK = WifiAuthMode._(3, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'WPA2_PSK'); + static const WifiAuthMode WPA_WPA2_PSK = WifiAuthMode._(4, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'WPA_WPA2_PSK'); + static const WifiAuthMode WPA2_ENTERPRISE = WifiAuthMode._(5, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'WPA2_ENTERPRISE'); static const $core.List values = [ Open, @@ -61,7 +61,7 @@ class WifiAuthMode extends $pb.ProtobufEnum { ]; static final $core.Map<$core.int, WifiAuthMode> _byValue = $pb.ProtobufEnum.initByValue(values); - static WifiAuthMode valueOf($core.int value) => _byValue[value]; + static WifiAuthMode? valueOf($core.int value) => _byValue[value]; const WifiAuthMode._($core.int v, $core.String n) : super(v, n); } diff --git a/lib/src/proto/dart/wifi_constants.pbjson.dart b/lib/src/proto/dart/wifi_constants.pbjson.dart index 01ab12c..d72d054 100644 --- a/lib/src/proto/dart/wifi_constants.pbjson.dart +++ b/lib/src/proto/dart/wifi_constants.pbjson.dart @@ -2,9 +2,13 @@ // Generated code. Do not modify. // source: wifi_constants.proto // -// @dart = 2.3 -// ignore_for_file: camel_case_types,non_constant_identifier_names,library_prefixes,unused_import,unused_shown_name,return_of_invalid_type +// @dart = 2.12 +// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,deprecated_member_use_from_same_package,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name +import 'dart:core' as $core; +import 'dart:convert' as $convert; +import 'dart:typed_data' as $typed_data; +@$core.Deprecated('Use wifiStationStateDescriptor instead') const WifiStationState$json = const { '1': 'WifiStationState', '2': const [ @@ -15,6 +19,9 @@ const WifiStationState$json = const { ], }; +/// Descriptor for `WifiStationState`. Decode as a `google.protobuf.EnumDescriptorProto`. +final $typed_data.Uint8List wifiStationStateDescriptor = $convert.base64Decode('ChBXaWZpU3RhdGlvblN0YXRlEg0KCUNvbm5lY3RlZBAAEg4KCkNvbm5lY3RpbmcQARIQCgxEaXNjb25uZWN0ZWQQAhIUChBDb25uZWN0aW9uRmFpbGVkEAM='); +@$core.Deprecated('Use wifiConnectFailedReasonDescriptor instead') const WifiConnectFailedReason$json = const { '1': 'WifiConnectFailedReason', '2': const [ @@ -23,6 +30,9 @@ const WifiConnectFailedReason$json = const { ], }; +/// Descriptor for `WifiConnectFailedReason`. Decode as a `google.protobuf.EnumDescriptorProto`. +final $typed_data.Uint8List wifiConnectFailedReasonDescriptor = $convert.base64Decode('ChdXaWZpQ29ubmVjdEZhaWxlZFJlYXNvbhINCglBdXRoRXJyb3IQABITCg9OZXR3b3JrTm90Rm91bmQQAQ=='); +@$core.Deprecated('Use wifiAuthModeDescriptor instead') const WifiAuthMode$json = const { '1': 'WifiAuthMode', '2': const [ @@ -35,6 +45,9 @@ const WifiAuthMode$json = const { ], }; +/// Descriptor for `WifiAuthMode`. Decode as a `google.protobuf.EnumDescriptorProto`. +final $typed_data.Uint8List wifiAuthModeDescriptor = $convert.base64Decode('CgxXaWZpQXV0aE1vZGUSCAoET3BlbhAAEgcKA1dFUBABEgsKB1dQQV9QU0sQAhIMCghXUEEyX1BTSxADEhAKDFdQQV9XUEEyX1BTSxAEEhMKD1dQQTJfRU5URVJQUklTRRAF'); +@$core.Deprecated('Use wifiConnectedStateDescriptor instead') const WifiConnectedState$json = const { '1': 'WifiConnectedState', '2': const [ @@ -46,3 +59,5 @@ const WifiConnectedState$json = const { ], }; +/// Descriptor for `WifiConnectedState`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List wifiConnectedStateDescriptor = $convert.base64Decode('ChJXaWZpQ29ubmVjdGVkU3RhdGUSGQoIaXA0X2FkZHIYASABKAlSB2lwNEFkZHISKgoJYXV0aF9tb2RlGAIgASgOMg0uV2lmaUF1dGhNb2RlUghhdXRoTW9kZRISCgRzc2lkGAMgASgMUgRzc2lkEhQKBWJzc2lkGAQgASgMUgVic3NpZBIYCgdjaGFubmVsGAUgASgFUgdjaGFubmVs'); diff --git a/lib/src/proto/dart/wifi_constants.pbserver.dart b/lib/src/proto/dart/wifi_constants.pbserver.dart index d23cffa..436b0d7 100644 --- a/lib/src/proto/dart/wifi_constants.pbserver.dart +++ b/lib/src/proto/dart/wifi_constants.pbserver.dart @@ -2,8 +2,8 @@ // Generated code. Do not modify. // source: wifi_constants.proto // -// @dart = 2.3 -// ignore_for_file: camel_case_types,non_constant_identifier_names,library_prefixes,unused_import,unused_shown_name,return_of_invalid_type +// @dart = 2.12 +// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,deprecated_member_use_from_same_package,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name export 'wifi_constants.pb.dart'; diff --git a/lib/src/proto/dart/wifi_scan.pb.dart b/lib/src/proto/dart/wifi_scan.pb.dart index a1061d9..f9aa224 100644 --- a/lib/src/proto/dart/wifi_scan.pb.dart +++ b/lib/src/proto/dart/wifi_scan.pb.dart @@ -2,8 +2,8 @@ // Generated code. Do not modify. // source: wifi_scan.proto // -// @dart = 2.3 -// ignore_for_file: camel_case_types,non_constant_identifier_names,library_prefixes,unused_import,unused_shown_name,return_of_invalid_type +// @dart = 2.12 +// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name import 'dart:core' as $core; @@ -16,20 +16,48 @@ import 'constants.pbenum.dart' as $0; export 'wifi_scan.pbenum.dart'; class CmdScanStart extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo('CmdScanStart', createEmptyInstance: create) - ..aOB(1, 'blocking') - ..aOB(2, 'passive') - ..a<$core.int>(3, 'groupChannels', $pb.PbFieldType.OU3) - ..a<$core.int>(4, 'periodMs', $pb.PbFieldType.OU3) + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'CmdScanStart', createEmptyInstance: create) + ..aOB(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'blocking') + ..aOB(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'passive') + ..a<$core.int>(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'groupChannels', $pb.PbFieldType.OU3) + ..a<$core.int>(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'periodMs', $pb.PbFieldType.OU3) ..hasRequiredFields = false ; CmdScanStart._() : super(); - factory CmdScanStart() => create(); + factory CmdScanStart({ + $core.bool? blocking, + $core.bool? passive, + $core.int? groupChannels, + $core.int? periodMs, + }) { + final _result = create(); + if (blocking != null) { + _result.blocking = blocking; + } + if (passive != null) { + _result.passive = passive; + } + if (groupChannels != null) { + _result.groupChannels = groupChannels; + } + if (periodMs != null) { + _result.periodMs = periodMs; + } + return _result; + } factory CmdScanStart.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); factory CmdScanStart.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') CmdScanStart clone() => CmdScanStart()..mergeFromMessage(this); - CmdScanStart copyWith(void Function(CmdScanStart) updates) => super.copyWith((message) => updates(message as CmdScanStart)); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + CmdScanStart copyWith(void Function(CmdScanStart) updates) => super.copyWith((message) => updates(message as CmdScanStart)) as CmdScanStart; // ignore: deprecated_member_use $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') static CmdScanStart create() => CmdScanStart._(); @@ -37,7 +65,7 @@ class CmdScanStart extends $pb.GeneratedMessage { static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') static CmdScanStart getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static CmdScanStart _defaultInstance; + static CmdScanStart? _defaultInstance; @$pb.TagNumber(1) $core.bool get blocking => $_getBF(0); @@ -77,7 +105,7 @@ class CmdScanStart extends $pb.GeneratedMessage { } class RespScanStart extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo('RespScanStart', createEmptyInstance: create) + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'RespScanStart', createEmptyInstance: create) ..hasRequiredFields = false ; @@ -85,8 +113,16 @@ class RespScanStart extends $pb.GeneratedMessage { factory RespScanStart() => create(); factory RespScanStart.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); factory RespScanStart.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') RespScanStart clone() => RespScanStart()..mergeFromMessage(this); - RespScanStart copyWith(void Function(RespScanStart) updates) => super.copyWith((message) => updates(message as RespScanStart)); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + RespScanStart copyWith(void Function(RespScanStart) updates) => super.copyWith((message) => updates(message as RespScanStart)) as RespScanStart; // ignore: deprecated_member_use $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') static RespScanStart create() => RespScanStart._(); @@ -94,11 +130,11 @@ class RespScanStart extends $pb.GeneratedMessage { static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') static RespScanStart getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static RespScanStart _defaultInstance; + static RespScanStart? _defaultInstance; } class CmdScanStatus extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo('CmdScanStatus', createEmptyInstance: create) + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'CmdScanStatus', createEmptyInstance: create) ..hasRequiredFields = false ; @@ -106,8 +142,16 @@ class CmdScanStatus extends $pb.GeneratedMessage { factory CmdScanStatus() => create(); factory CmdScanStatus.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); factory CmdScanStatus.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') CmdScanStatus clone() => CmdScanStatus()..mergeFromMessage(this); - CmdScanStatus copyWith(void Function(CmdScanStatus) updates) => super.copyWith((message) => updates(message as CmdScanStatus)); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + CmdScanStatus copyWith(void Function(CmdScanStatus) updates) => super.copyWith((message) => updates(message as CmdScanStatus)) as CmdScanStatus; // ignore: deprecated_member_use $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') static CmdScanStatus create() => CmdScanStatus._(); @@ -115,22 +159,42 @@ class CmdScanStatus extends $pb.GeneratedMessage { static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') static CmdScanStatus getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static CmdScanStatus _defaultInstance; + static CmdScanStatus? _defaultInstance; } class RespScanStatus extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo('RespScanStatus', createEmptyInstance: create) - ..aOB(1, 'scanFinished') - ..a<$core.int>(2, 'resultCount', $pb.PbFieldType.OU3) + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'RespScanStatus', createEmptyInstance: create) + ..aOB(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'scanFinished') + ..a<$core.int>(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'resultCount', $pb.PbFieldType.OU3) ..hasRequiredFields = false ; RespScanStatus._() : super(); - factory RespScanStatus() => create(); + factory RespScanStatus({ + $core.bool? scanFinished, + $core.int? resultCount, + }) { + final _result = create(); + if (scanFinished != null) { + _result.scanFinished = scanFinished; + } + if (resultCount != null) { + _result.resultCount = resultCount; + } + return _result; + } factory RespScanStatus.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); factory RespScanStatus.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') RespScanStatus clone() => RespScanStatus()..mergeFromMessage(this); - RespScanStatus copyWith(void Function(RespScanStatus) updates) => super.copyWith((message) => updates(message as RespScanStatus)); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + RespScanStatus copyWith(void Function(RespScanStatus) updates) => super.copyWith((message) => updates(message as RespScanStatus)) as RespScanStatus; // ignore: deprecated_member_use $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') static RespScanStatus create() => RespScanStatus._(); @@ -138,7 +202,7 @@ class RespScanStatus extends $pb.GeneratedMessage { static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') static RespScanStatus getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static RespScanStatus _defaultInstance; + static RespScanStatus? _defaultInstance; @$pb.TagNumber(1) $core.bool get scanFinished => $_getBF(0); @@ -160,18 +224,38 @@ class RespScanStatus extends $pb.GeneratedMessage { } class CmdScanResult extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo('CmdScanResult', createEmptyInstance: create) - ..a<$core.int>(1, 'startIndex', $pb.PbFieldType.OU3) - ..a<$core.int>(2, 'count', $pb.PbFieldType.OU3) + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'CmdScanResult', createEmptyInstance: create) + ..a<$core.int>(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'startIndex', $pb.PbFieldType.OU3) + ..a<$core.int>(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'count', $pb.PbFieldType.OU3) ..hasRequiredFields = false ; CmdScanResult._() : super(); - factory CmdScanResult() => create(); + factory CmdScanResult({ + $core.int? startIndex, + $core.int? count, + }) { + final _result = create(); + if (startIndex != null) { + _result.startIndex = startIndex; + } + if (count != null) { + _result.count = count; + } + return _result; + } factory CmdScanResult.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); factory CmdScanResult.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') CmdScanResult clone() => CmdScanResult()..mergeFromMessage(this); - CmdScanResult copyWith(void Function(CmdScanResult) updates) => super.copyWith((message) => updates(message as CmdScanResult)); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + CmdScanResult copyWith(void Function(CmdScanResult) updates) => super.copyWith((message) => updates(message as CmdScanResult)) as CmdScanResult; // ignore: deprecated_member_use $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') static CmdScanResult create() => CmdScanResult._(); @@ -179,7 +263,7 @@ class CmdScanResult extends $pb.GeneratedMessage { static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') static CmdScanResult getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static CmdScanResult _defaultInstance; + static CmdScanResult? _defaultInstance; @$pb.TagNumber(1) $core.int get startIndex => $_getIZ(0); @@ -201,21 +285,53 @@ class CmdScanResult extends $pb.GeneratedMessage { } class WiFiScanResult extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo('WiFiScanResult', createEmptyInstance: create) - ..a<$core.List<$core.int>>(1, 'ssid', $pb.PbFieldType.OY) - ..a<$core.int>(2, 'channel', $pb.PbFieldType.OU3) - ..a<$core.int>(3, 'rssi', $pb.PbFieldType.O3) - ..a<$core.List<$core.int>>(4, 'bssid', $pb.PbFieldType.OY) - ..e<$3.WifiAuthMode>(5, 'auth', $pb.PbFieldType.OE, defaultOrMaker: $3.WifiAuthMode.Open, valueOf: $3.WifiAuthMode.valueOf, enumValues: $3.WifiAuthMode.values) + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'WiFiScanResult', createEmptyInstance: create) + ..a<$core.List<$core.int>>(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'ssid', $pb.PbFieldType.OY) + ..a<$core.int>(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'channel', $pb.PbFieldType.OU3) + ..a<$core.int>(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'rssi', $pb.PbFieldType.O3) + ..a<$core.List<$core.int>>(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'bssid', $pb.PbFieldType.OY) + ..e<$3.WifiAuthMode>(5, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'auth', $pb.PbFieldType.OE, defaultOrMaker: $3.WifiAuthMode.Open, valueOf: $3.WifiAuthMode.valueOf, enumValues: $3.WifiAuthMode.values) ..hasRequiredFields = false ; WiFiScanResult._() : super(); - factory WiFiScanResult() => create(); + factory WiFiScanResult({ + $core.List<$core.int>? ssid, + $core.int? channel, + $core.int? rssi, + $core.List<$core.int>? bssid, + $3.WifiAuthMode? auth, + }) { + final _result = create(); + if (ssid != null) { + _result.ssid = ssid; + } + if (channel != null) { + _result.channel = channel; + } + if (rssi != null) { + _result.rssi = rssi; + } + if (bssid != null) { + _result.bssid = bssid; + } + if (auth != null) { + _result.auth = auth; + } + return _result; + } factory WiFiScanResult.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); factory WiFiScanResult.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') WiFiScanResult clone() => WiFiScanResult()..mergeFromMessage(this); - WiFiScanResult copyWith(void Function(WiFiScanResult) updates) => super.copyWith((message) => updates(message as WiFiScanResult)); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + WiFiScanResult copyWith(void Function(WiFiScanResult) updates) => super.copyWith((message) => updates(message as WiFiScanResult)) as WiFiScanResult; // ignore: deprecated_member_use $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') static WiFiScanResult create() => WiFiScanResult._(); @@ -223,7 +339,7 @@ class WiFiScanResult extends $pb.GeneratedMessage { static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') static WiFiScanResult getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static WiFiScanResult _defaultInstance; + static WiFiScanResult? _defaultInstance; @$pb.TagNumber(1) $core.List<$core.int> get ssid => $_getN(0); @@ -272,17 +388,33 @@ class WiFiScanResult extends $pb.GeneratedMessage { } class RespScanResult extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo('RespScanResult', createEmptyInstance: create) - ..pc(1, 'entries', $pb.PbFieldType.PM, subBuilder: WiFiScanResult.create) + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'RespScanResult', createEmptyInstance: create) + ..pc(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'entries', $pb.PbFieldType.PM, subBuilder: WiFiScanResult.create) ..hasRequiredFields = false ; RespScanResult._() : super(); - factory RespScanResult() => create(); + factory RespScanResult({ + $core.Iterable? entries, + }) { + final _result = create(); + if (entries != null) { + _result.entries.addAll(entries); + } + return _result; + } factory RespScanResult.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); factory RespScanResult.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') RespScanResult clone() => RespScanResult()..mergeFromMessage(this); - RespScanResult copyWith(void Function(RespScanResult) updates) => super.copyWith((message) => updates(message as RespScanResult)); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + RespScanResult copyWith(void Function(RespScanResult) updates) => super.copyWith((message) => updates(message as RespScanResult)) as RespScanResult; // ignore: deprecated_member_use $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') static RespScanResult create() => RespScanResult._(); @@ -290,7 +422,7 @@ class RespScanResult extends $pb.GeneratedMessage { static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') static RespScanResult getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static RespScanResult _defaultInstance; + static RespScanResult? _defaultInstance; @$pb.TagNumber(1) $core.List get entries => $_getList(0); @@ -316,25 +448,69 @@ class WiFiScanPayload extends $pb.GeneratedMessage { 15 : WiFiScanPayload_Payload.respScanResult, 0 : WiFiScanPayload_Payload.notSet }; - static final $pb.BuilderInfo _i = $pb.BuilderInfo('WiFiScanPayload', createEmptyInstance: create) + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'WiFiScanPayload', createEmptyInstance: create) ..oo(0, [10, 11, 12, 13, 14, 15]) - ..e(1, 'msg', $pb.PbFieldType.OE, defaultOrMaker: WiFiScanMsgType.TypeCmdScanStart, valueOf: WiFiScanMsgType.valueOf, enumValues: WiFiScanMsgType.values) - ..e<$0.Status>(2, 'status', $pb.PbFieldType.OE, defaultOrMaker: $0.Status.Success, valueOf: $0.Status.valueOf, enumValues: $0.Status.values) - ..aOM(10, 'cmdScanStart', subBuilder: CmdScanStart.create) - ..aOM(11, 'respScanStart', subBuilder: RespScanStart.create) - ..aOM(12, 'cmdScanStatus', subBuilder: CmdScanStatus.create) - ..aOM(13, 'respScanStatus', subBuilder: RespScanStatus.create) - ..aOM(14, 'cmdScanResult', subBuilder: CmdScanResult.create) - ..aOM(15, 'respScanResult', subBuilder: RespScanResult.create) + ..e(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'msg', $pb.PbFieldType.OE, defaultOrMaker: WiFiScanMsgType.TypeCmdScanStart, valueOf: WiFiScanMsgType.valueOf, enumValues: WiFiScanMsgType.values) + ..e<$0.Status>(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'status', $pb.PbFieldType.OE, defaultOrMaker: $0.Status.Success, valueOf: $0.Status.valueOf, enumValues: $0.Status.values) + ..aOM(10, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'cmdScanStart', subBuilder: CmdScanStart.create) + ..aOM(11, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'respScanStart', subBuilder: RespScanStart.create) + ..aOM(12, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'cmdScanStatus', subBuilder: CmdScanStatus.create) + ..aOM(13, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'respScanStatus', subBuilder: RespScanStatus.create) + ..aOM(14, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'cmdScanResult', subBuilder: CmdScanResult.create) + ..aOM(15, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'respScanResult', subBuilder: RespScanResult.create) ..hasRequiredFields = false ; WiFiScanPayload._() : super(); - factory WiFiScanPayload() => create(); + factory WiFiScanPayload({ + WiFiScanMsgType? msg, + $0.Status? status, + CmdScanStart? cmdScanStart, + RespScanStart? respScanStart, + CmdScanStatus? cmdScanStatus, + RespScanStatus? respScanStatus, + CmdScanResult? cmdScanResult, + RespScanResult? respScanResult, + }) { + final _result = create(); + if (msg != null) { + _result.msg = msg; + } + if (status != null) { + _result.status = status; + } + if (cmdScanStart != null) { + _result.cmdScanStart = cmdScanStart; + } + if (respScanStart != null) { + _result.respScanStart = respScanStart; + } + if (cmdScanStatus != null) { + _result.cmdScanStatus = cmdScanStatus; + } + if (respScanStatus != null) { + _result.respScanStatus = respScanStatus; + } + if (cmdScanResult != null) { + _result.cmdScanResult = cmdScanResult; + } + if (respScanResult != null) { + _result.respScanResult = respScanResult; + } + return _result; + } factory WiFiScanPayload.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); factory WiFiScanPayload.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') WiFiScanPayload clone() => WiFiScanPayload()..mergeFromMessage(this); - WiFiScanPayload copyWith(void Function(WiFiScanPayload) updates) => super.copyWith((message) => updates(message as WiFiScanPayload)); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + WiFiScanPayload copyWith(void Function(WiFiScanPayload) updates) => super.copyWith((message) => updates(message as WiFiScanPayload)) as WiFiScanPayload; // ignore: deprecated_member_use $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') static WiFiScanPayload create() => WiFiScanPayload._(); @@ -342,9 +518,9 @@ class WiFiScanPayload extends $pb.GeneratedMessage { static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') static WiFiScanPayload getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static WiFiScanPayload _defaultInstance; + static WiFiScanPayload? _defaultInstance; - WiFiScanPayload_Payload whichPayload() => _WiFiScanPayload_PayloadByTag[$_whichOneof(0)]; + WiFiScanPayload_Payload whichPayload() => _WiFiScanPayload_PayloadByTag[$_whichOneof(0)]!; void clearPayload() => clearField($_whichOneof(0)); @$pb.TagNumber(1) diff --git a/lib/src/proto/dart/wifi_scan.pbenum.dart b/lib/src/proto/dart/wifi_scan.pbenum.dart index 6247bcb..5bd4ab3 100644 --- a/lib/src/proto/dart/wifi_scan.pbenum.dart +++ b/lib/src/proto/dart/wifi_scan.pbenum.dart @@ -2,20 +2,20 @@ // Generated code. Do not modify. // source: wifi_scan.proto // -// @dart = 2.3 -// ignore_for_file: camel_case_types,non_constant_identifier_names,library_prefixes,unused_import,unused_shown_name,return_of_invalid_type +// @dart = 2.12 +// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name -// ignore_for_file: UNDEFINED_SHOWN_NAME,UNUSED_SHOWN_NAME +// ignore_for_file: UNDEFINED_SHOWN_NAME import 'dart:core' as $core; import 'package:protobuf/protobuf.dart' as $pb; class WiFiScanMsgType extends $pb.ProtobufEnum { - static const WiFiScanMsgType TypeCmdScanStart = WiFiScanMsgType._(0, 'TypeCmdScanStart'); - static const WiFiScanMsgType TypeRespScanStart = WiFiScanMsgType._(1, 'TypeRespScanStart'); - static const WiFiScanMsgType TypeCmdScanStatus = WiFiScanMsgType._(2, 'TypeCmdScanStatus'); - static const WiFiScanMsgType TypeRespScanStatus = WiFiScanMsgType._(3, 'TypeRespScanStatus'); - static const WiFiScanMsgType TypeCmdScanResult = WiFiScanMsgType._(4, 'TypeCmdScanResult'); - static const WiFiScanMsgType TypeRespScanResult = WiFiScanMsgType._(5, 'TypeRespScanResult'); + static const WiFiScanMsgType TypeCmdScanStart = WiFiScanMsgType._(0, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'TypeCmdScanStart'); + static const WiFiScanMsgType TypeRespScanStart = WiFiScanMsgType._(1, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'TypeRespScanStart'); + static const WiFiScanMsgType TypeCmdScanStatus = WiFiScanMsgType._(2, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'TypeCmdScanStatus'); + static const WiFiScanMsgType TypeRespScanStatus = WiFiScanMsgType._(3, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'TypeRespScanStatus'); + static const WiFiScanMsgType TypeCmdScanResult = WiFiScanMsgType._(4, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'TypeCmdScanResult'); + static const WiFiScanMsgType TypeRespScanResult = WiFiScanMsgType._(5, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'TypeRespScanResult'); static const $core.List values = [ TypeCmdScanStart, @@ -27,7 +27,7 @@ class WiFiScanMsgType extends $pb.ProtobufEnum { ]; static final $core.Map<$core.int, WiFiScanMsgType> _byValue = $pb.ProtobufEnum.initByValue(values); - static WiFiScanMsgType valueOf($core.int value) => _byValue[value]; + static WiFiScanMsgType? valueOf($core.int value) => _byValue[value]; const WiFiScanMsgType._($core.int v, $core.String n) : super(v, n); } diff --git a/lib/src/proto/dart/wifi_scan.pbjson.dart b/lib/src/proto/dart/wifi_scan.pbjson.dart index f447aee..1f2d82e 100644 --- a/lib/src/proto/dart/wifi_scan.pbjson.dart +++ b/lib/src/proto/dart/wifi_scan.pbjson.dart @@ -2,9 +2,13 @@ // Generated code. Do not modify. // source: wifi_scan.proto // -// @dart = 2.3 -// ignore_for_file: camel_case_types,non_constant_identifier_names,library_prefixes,unused_import,unused_shown_name,return_of_invalid_type +// @dart = 2.12 +// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,deprecated_member_use_from_same_package,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name +import 'dart:core' as $core; +import 'dart:convert' as $convert; +import 'dart:typed_data' as $typed_data; +@$core.Deprecated('Use wiFiScanMsgTypeDescriptor instead') const WiFiScanMsgType$json = const { '1': 'WiFiScanMsgType', '2': const [ @@ -17,6 +21,9 @@ const WiFiScanMsgType$json = const { ], }; +/// Descriptor for `WiFiScanMsgType`. Decode as a `google.protobuf.EnumDescriptorProto`. +final $typed_data.Uint8List wiFiScanMsgTypeDescriptor = $convert.base64Decode('Cg9XaUZpU2Nhbk1zZ1R5cGUSFAoQVHlwZUNtZFNjYW5TdGFydBAAEhUKEVR5cGVSZXNwU2NhblN0YXJ0EAESFQoRVHlwZUNtZFNjYW5TdGF0dXMQAhIWChJUeXBlUmVzcFNjYW5TdGF0dXMQAxIVChFUeXBlQ21kU2NhblJlc3VsdBAEEhYKElR5cGVSZXNwU2NhblJlc3VsdBAF'); +@$core.Deprecated('Use cmdScanStartDescriptor instead') const CmdScanStart$json = const { '1': 'CmdScanStart', '2': const [ @@ -27,14 +34,23 @@ const CmdScanStart$json = const { ], }; +/// Descriptor for `CmdScanStart`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List cmdScanStartDescriptor = $convert.base64Decode('CgxDbWRTY2FuU3RhcnQSGgoIYmxvY2tpbmcYASABKAhSCGJsb2NraW5nEhgKB3Bhc3NpdmUYAiABKAhSB3Bhc3NpdmUSJQoOZ3JvdXBfY2hhbm5lbHMYAyABKA1SDWdyb3VwQ2hhbm5lbHMSGwoJcGVyaW9kX21zGAQgASgNUghwZXJpb2RNcw=='); +@$core.Deprecated('Use respScanStartDescriptor instead') const RespScanStart$json = const { '1': 'RespScanStart', }; +/// Descriptor for `RespScanStart`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List respScanStartDescriptor = $convert.base64Decode('Cg1SZXNwU2NhblN0YXJ0'); +@$core.Deprecated('Use cmdScanStatusDescriptor instead') const CmdScanStatus$json = const { '1': 'CmdScanStatus', }; +/// Descriptor for `CmdScanStatus`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List cmdScanStatusDescriptor = $convert.base64Decode('Cg1DbWRTY2FuU3RhdHVz'); +@$core.Deprecated('Use respScanStatusDescriptor instead') const RespScanStatus$json = const { '1': 'RespScanStatus', '2': const [ @@ -43,6 +59,9 @@ const RespScanStatus$json = const { ], }; +/// Descriptor for `RespScanStatus`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List respScanStatusDescriptor = $convert.base64Decode('Cg5SZXNwU2NhblN0YXR1cxIjCg1zY2FuX2ZpbmlzaGVkGAEgASgIUgxzY2FuRmluaXNoZWQSIQoMcmVzdWx0X2NvdW50GAIgASgNUgtyZXN1bHRDb3VudA=='); +@$core.Deprecated('Use cmdScanResultDescriptor instead') const CmdScanResult$json = const { '1': 'CmdScanResult', '2': const [ @@ -51,6 +70,9 @@ const CmdScanResult$json = const { ], }; +/// Descriptor for `CmdScanResult`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List cmdScanResultDescriptor = $convert.base64Decode('Cg1DbWRTY2FuUmVzdWx0Eh8KC3N0YXJ0X2luZGV4GAEgASgNUgpzdGFydEluZGV4EhQKBWNvdW50GAIgASgNUgVjb3VudA=='); +@$core.Deprecated('Use wiFiScanResultDescriptor instead') const WiFiScanResult$json = const { '1': 'WiFiScanResult', '2': const [ @@ -62,6 +84,9 @@ const WiFiScanResult$json = const { ], }; +/// Descriptor for `WiFiScanResult`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List wiFiScanResultDescriptor = $convert.base64Decode('Cg5XaUZpU2NhblJlc3VsdBISCgRzc2lkGAEgASgMUgRzc2lkEhgKB2NoYW5uZWwYAiABKA1SB2NoYW5uZWwSEgoEcnNzaRgDIAEoBVIEcnNzaRIUCgVic3NpZBgEIAEoDFIFYnNzaWQSIQoEYXV0aBgFIAEoDjINLldpZmlBdXRoTW9kZVIEYXV0aA=='); +@$core.Deprecated('Use respScanResultDescriptor instead') const RespScanResult$json = const { '1': 'RespScanResult', '2': const [ @@ -69,6 +94,9 @@ const RespScanResult$json = const { ], }; +/// Descriptor for `RespScanResult`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List respScanResultDescriptor = $convert.base64Decode('Cg5SZXNwU2NhblJlc3VsdBIpCgdlbnRyaWVzGAEgAygLMg8uV2lGaVNjYW5SZXN1bHRSB2VudHJpZXM='); +@$core.Deprecated('Use wiFiScanPayloadDescriptor instead') const WiFiScanPayload$json = const { '1': 'WiFiScanPayload', '2': const [ @@ -86,3 +114,5 @@ const WiFiScanPayload$json = const { ], }; +/// Descriptor for `WiFiScanPayload`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List wiFiScanPayloadDescriptor = $convert.base64Decode('Cg9XaUZpU2NhblBheWxvYWQSIgoDbXNnGAEgASgOMhAuV2lGaVNjYW5Nc2dUeXBlUgNtc2cSHwoGc3RhdHVzGAIgASgOMgcuU3RhdHVzUgZzdGF0dXMSNQoOY21kX3NjYW5fc3RhcnQYCiABKAsyDS5DbWRTY2FuU3RhcnRIAFIMY21kU2NhblN0YXJ0EjgKD3Jlc3Bfc2Nhbl9zdGFydBgLIAEoCzIOLlJlc3BTY2FuU3RhcnRIAFINcmVzcFNjYW5TdGFydBI4Cg9jbWRfc2Nhbl9zdGF0dXMYDCABKAsyDi5DbWRTY2FuU3RhdHVzSABSDWNtZFNjYW5TdGF0dXMSOwoQcmVzcF9zY2FuX3N0YXR1cxgNIAEoCzIPLlJlc3BTY2FuU3RhdHVzSABSDnJlc3BTY2FuU3RhdHVzEjgKD2NtZF9zY2FuX3Jlc3VsdBgOIAEoCzIOLkNtZFNjYW5SZXN1bHRIAFINY21kU2NhblJlc3VsdBI7ChByZXNwX3NjYW5fcmVzdWx0GA8gASgLMg8uUmVzcFNjYW5SZXN1bHRIAFIOcmVzcFNjYW5SZXN1bHRCCQoHcGF5bG9hZA=='); diff --git a/lib/src/proto/dart/wifi_scan.pbserver.dart b/lib/src/proto/dart/wifi_scan.pbserver.dart index 73dfe01..d61c61c 100644 --- a/lib/src/proto/dart/wifi_scan.pbserver.dart +++ b/lib/src/proto/dart/wifi_scan.pbserver.dart @@ -2,8 +2,8 @@ // Generated code. Do not modify. // source: wifi_scan.proto // -// @dart = 2.3 -// ignore_for_file: camel_case_types,non_constant_identifier_names,library_prefixes,unused_import,unused_shown_name,return_of_invalid_type +// @dart = 2.12 +// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,deprecated_member_use_from_same_package,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name export 'wifi_scan.pb.dart'; diff --git a/lib/src/security.dart b/lib/src/security.dart index 48910ad..b208e73 100644 --- a/lib/src/security.dart +++ b/lib/src/security.dart @@ -14,5 +14,5 @@ abstract class ProvSecurity { Future decrypt(Uint8List data); - Future securitySession(SessionData responseData); + Future securitySession(SessionData responseData); } diff --git a/lib/src/security1.dart b/lib/src/security1.dart index 970d80d..ea6c76d 100644 --- a/lib/src/security1.dart +++ b/lib/src/security1.dart @@ -13,17 +13,18 @@ class Security1 implements ProvSecurity { final String pop; final bool verbose; SecurityState sessionState; - SimpleKeyPair clientKey; - SimplePublicKey devicePublicKey; - Uint8List deviceRandom; + SimpleKeyPair? clientKey; + SimplePublicKey? devicePublicKey; + Uint8List? deviceRandom; Crypt crypt = Crypt(); X25519 x25519 = X25519(); Sha256 sha256 = Sha256(); - Security1( - {this.pop, - this.sessionState = SecurityState.REQUEST1, - this.verbose = false}); + Security1({ + required this.pop, + this.sessionState = SecurityState.REQUEST1, + this.verbose = false, + }); void _verbose(dynamic data) { if (verbose) { @@ -54,7 +55,7 @@ class Security1 implements ProvSecurity { return ret; } - Future securitySession(SessionData responseData) async { + Future securitySession(SessionData responseData) async { if (sessionState == SecurityState.REQUEST1) { sessionState = SecurityState.RESPONSE1_REQUEST2; return await setup0Request(); @@ -79,14 +80,13 @@ class Security1 implements ProvSecurity { setupRequest.secVer = SecSchemeVersion.SecScheme1; await _generateKey(); SessionCmd0 sc0 = SessionCmd0(); - List temp = await clientKey.extractPublicKey().then((value) => value.bytes); + List temp = await clientKey!.extractPublicKey().then((value) => value.bytes); sc0.clientPubkey = temp; // await clientKey.extractPublicKey().byte; Sec1Payload sec1 = Sec1Payload(); sec1.sc0 = sc0; setupRequest.sec1 = sec1; - _verbose( - 'setup0Request: clientPubkey = ${temp.toString()}'); + _verbose('setup0Request: clientPubkey = ${temp.toString()}'); return setupRequest; } @@ -95,17 +95,14 @@ class Security1 implements ProvSecurity { if (setupResp.secVer != SecSchemeVersion.SecScheme1) { throw Exception('Invalid sec scheme'); } - devicePublicKey = SimplePublicKey(setupResp.sec1.sr0.devicePubkey,type: x25519.keyPairType); - deviceRandom = setupResp.sec1.sr0.deviceRandom; + devicePublicKey = SimplePublicKey(setupResp.sec1.sr0.devicePubkey, type: x25519.keyPairType); + deviceRandom = Uint8List.fromList(setupResp.sec1.sr0.deviceRandom); - _verbose( - 'setup0Response:Device public key ${devicePublicKey.bytes.toString()}'); + _verbose('setup0Response:Device public key ${devicePublicKey!.bytes.toString()}'); _verbose('setup0Response:Device random ${deviceRandom.toString()}'); - final sharedKey = await x25519.sharedSecretKey( - keyPair: clientKey, - remotePublicKey: devicePublicKey); - var sharedK = await sharedKey.extractBytes(); + final sharedKey = await x25519.sharedSecretKey(keyPair: clientKey!, remotePublicKey: devicePublicKey!); + var sharedK = Uint8List.fromList(await sharedKey.extractBytes()); _verbose('setup0Response: Shared key calculated: ${sharedK.toString()}'); if (pop != null) { var sink = sha256.newHashSink(); @@ -113,18 +110,16 @@ class Security1 implements ProvSecurity { sink.close(); final hash = await sink.hash(); sharedK = _xor(Uint8List.fromList(sharedK), Uint8List.fromList(hash.bytes)); - _verbose( - 'setup0Response: pop: $pop, hash: ${hash.bytes.toString()} sharedK: ${sharedK.toString()}'); + _verbose('setup0Response: pop: $pop, hash: ${hash.bytes.toString()} sharedK: ${sharedK.toString()}'); } - await crypt.init(sharedK, deviceRandom); - _verbose( - 'setup0Response: cipherSecretKey: ${sharedK.toString()} cipherNonce: ${deviceRandom.toString()}'); + await crypt.init(sharedK, deviceRandom!); + _verbose('setup0Response: cipherSecretKey: ${sharedK.toString()} cipherNonce: ${deviceRandom.toString()}'); return setupResp; } Future setup1Request(SessionData responseData) async { - _verbose('setup1Request ${devicePublicKey.bytes.toString()}'); - var clientVerify = await encrypt(devicePublicKey.bytes); + _verbose('setup1Request ${devicePublicKey!.bytes.toString()}'); + var clientVerify = await encrypt(Uint8List.fromList(devicePublicKey!.bytes)); _verbose('client verify ${clientVerify.toString()}'); var setupRequest = SessionData(); @@ -138,22 +133,21 @@ class Security1 implements ProvSecurity { return setupRequest; } - Future setup1Response(SessionData responseData) async { + Future setup1Response(SessionData responseData) async { _verbose('setup1Response'); var setupResp = responseData; if (setupResp.secVer == SecSchemeVersion.SecScheme1) { final deviceVerify = setupResp.sec1.sr1.deviceVerifyData; _verbose('Device verify: ${deviceVerify.toString()}'); - final encClientPubkey = - await decrypt(setupResp.sec1.sr1.deviceVerifyData); + final encClientPubkey = await decrypt(Uint8List.fromList(setupResp.sec1.sr1.deviceVerifyData)); _verbose('Enc client pubkey: ${encClientPubkey.toString()}'); Function eq = const ListEquality().equals; - List temp = await clientKey.extractPublicKey().then((value) => value.bytes); + List temp = await clientKey!.extractPublicKey().then((value) => value.bytes); if (!eq(encClientPubkey, temp)) { throw Exception('Mismatch in device verify'); } - return null; + return; } throw Exception('Unsupported security protocol'); } -} \ No newline at end of file +} diff --git a/pubspec.lock b/pubspec.lock index e432cf5..c3c5d14 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -7,7 +7,7 @@ packages: name: async url: "https://pub.dartlang.org" source: hosted - version: "2.6.1" + version: "2.9.0" boolean_selector: dependency: transitive description: @@ -21,28 +21,21 @@ packages: name: characters url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" - charcode: - dependency: transitive - description: - name: charcode - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" + version: "1.2.1" clock: dependency: transitive description: name: clock url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" + version: "1.1.1" collection: dependency: "direct main" description: name: collection url: "https://pub.dartlang.org" source: hosted - version: "1.15.0" + version: "1.16.0" crypto: dependency: transitive description: @@ -63,7 +56,7 @@ packages: name: fake_async url: "https://pub.dartlang.org" source: hosted - version: "1.2.0" + version: "1.3.1" fixnum: dependency: transitive description: @@ -76,13 +69,6 @@ packages: description: flutter source: sdk version: "0.0.0" - flutter_ble_lib: - dependency: "direct main" - description: - name: flutter_ble_lib - url: "https://pub.dartlang.org" - source: hosted - version: "2.3.2" flutter_test: dependency: "direct dev" description: flutter @@ -101,21 +87,28 @@ packages: name: matcher url: "https://pub.dartlang.org" source: hosted - version: "0.12.10" + version: "0.12.12" + material_color_utilities: + dependency: transitive + description: + name: material_color_utilities + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.5" meta: dependency: transitive description: name: meta url: "https://pub.dartlang.org" source: hosted - version: "1.3.0" + version: "1.8.0" path: dependency: transitive description: name: path url: "https://pub.dartlang.org" source: hosted - version: "1.8.0" + version: "1.8.2" protobuf: dependency: "direct main" description: @@ -134,7 +127,7 @@ packages: name: source_span url: "https://pub.dartlang.org" source: hosted - version: "1.8.1" + version: "1.9.0" stack_trace: dependency: transitive description: @@ -155,21 +148,21 @@ packages: name: string_scanner url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" + version: "1.1.1" term_glyph: dependency: transitive description: name: term_glyph url: "https://pub.dartlang.org" source: hosted - version: "1.2.0" + version: "1.2.1" test_api: dependency: transitive description: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.3.0" + version: "0.4.12" typed_data: dependency: transitive description: @@ -183,7 +176,7 @@ packages: name: vector_math url: "https://pub.dartlang.org" source: hosted - version: "2.1.0" + version: "2.1.2" sdks: - dart: ">=2.12.0 <3.0.0" + dart: ">=2.18.4 <3.0.0" flutter: ">=1.10.0" diff --git a/pubspec.yaml b/pubspec.yaml index 6605689..ef750f1 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -2,10 +2,9 @@ name: esp_provisioning description: Espressif Provisioning library version: 1.0.0+6 homepage: https://github.com/sunshine-tech/esp_provisioning.git -author: Tuan PM environment: - sdk: ">=2.7.0 <3.0.0" + sdk: '>=2.18.4 <3.0.0' flutter: ">=1.10.0" dependencies: @@ -14,7 +13,6 @@ dependencies: protobuf: ^2.0.0 cryptography: ^2.0.1 collection: ^1.15.0 - flutter_ble_lib: ^2.3.2 dev_dependencies: