From 2d4cba8371d6f9edd1dca4e69dae3db951c27695 Mon Sep 17 00:00:00 2001 From: Daniel Ponte Date: Fri, 8 Nov 2024 15:33:53 -0500 Subject: [PATCH] wip --- lib/controller/stillbox.dart | 8 +- lib/pb/stillbox.pb.dart | 184 ++++++++++++++++++++--------------- lib/pb/stillbox.pbjson.dart | 62 ++++++------ lib/views/lcd.dart | 2 +- protobuf/stillbox.proto | 25 ++--- 5 files changed, 157 insertions(+), 124 deletions(-) diff --git a/lib/controller/stillbox.dart b/lib/controller/stillbox.dart index 9475eff..48d456f 100644 --- a/lib/controller/stillbox.dart +++ b/lib/controller/stillbox.dart @@ -17,7 +17,7 @@ class Stillbox extends ChangeNotifier { final storage = Storer(); final channel = Socketer(); late TalkgroupCache tgCache; - late Version version; + late ServerInfo version; bool connected = false; late Uri _wsUri; LiveState _state = LiveState.LS_LIVE; @@ -50,7 +50,7 @@ class Stillbox extends ChangeNotifier { String socketUrl; final port = (baseUri!.hasPort ? ':${baseUri!.port}' : ''); socketUrl = - '${baseUri!.scheme == 'http' ? 'ws' : 'wss'}://${baseUri!.host}$port/ws'; + '${baseUri!.scheme == 'http' ? 'ws' : 'wss'}://${baseUri!.host}$port/api/ws'; _wsUri = Uri.parse(socketUrl); } else { baseUri = null; @@ -65,7 +65,7 @@ class Stillbox extends ChangeNotifier { if (baseUriString.endsWith('/')) { baseUriString = baseUriString.substring(0, baseUriString.length - 1); } - Uri loginUri = Uri.parse('$baseUriString/login'); + Uri loginUri = Uri.parse('$baseUriString/api/login'); final form = {}; form['username'] = username; form['password'] = password; @@ -145,7 +145,7 @@ class Stillbox extends ChangeNotifier { case Message_ToClientMessage.popup: case Message_ToClientMessage.error: case Message_ToClientMessage.hello: - version = msg.hello.version; + version = msg.hello.serverInfo; case Message_ToClientMessage.response: _handleCommandResponse(msg.response); default: diff --git a/lib/pb/stillbox.pb.dart b/lib/pb/stillbox.pb.dart index be09062..c6d4562 100644 --- a/lib/pb/stillbox.pb.dart +++ b/lib/pb/stillbox.pb.dart @@ -256,6 +256,7 @@ class CommandResponse extends $pb.GeneratedMessage { class Call extends $pb.GeneratedMessage { factory Call({ + $core.String? id, $core.String? audioName, $core.String? audioType, $0.Timestamp? dateTime, @@ -270,6 +271,9 @@ class Call extends $pb.GeneratedMessage { $core.List<$core.int>? audio, }) { final $result = create(); + if (id != null) { + $result.id = id; + } if (audioName != null) { $result.audioName = audioName; } @@ -313,18 +317,19 @@ class Call extends $pb.GeneratedMessage { factory Call.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'Call', package: const $pb.PackageName(_omitMessageNames ? '' : 'stillbox'), createEmptyInstance: create) - ..aOS(1, _omitFieldNames ? '' : 'audioName', protoName: 'audioName') - ..aOS(2, _omitFieldNames ? '' : 'audioType', protoName: 'audioType') - ..aOM<$0.Timestamp>(3, _omitFieldNames ? '' : 'dateTime', subBuilder: $0.Timestamp.create) - ..a<$core.int>(4, _omitFieldNames ? '' : 'system', $pb.PbFieldType.O3) - ..a<$core.int>(5, _omitFieldNames ? '' : 'talkgroup', $pb.PbFieldType.O3) - ..a<$core.int>(6, _omitFieldNames ? '' : 'source', $pb.PbFieldType.O3) - ..aInt64(7, _omitFieldNames ? '' : 'frequency') - ..p<$fixnum.Int64>(8, _omitFieldNames ? '' : 'frequencies', $pb.PbFieldType.K6) - ..p<$core.int>(9, _omitFieldNames ? '' : 'patches', $pb.PbFieldType.K3) - ..p<$core.int>(10, _omitFieldNames ? '' : 'sources', $pb.PbFieldType.K3) - ..a<$core.int>(11, _omitFieldNames ? '' : 'duration', $pb.PbFieldType.O3) - ..a<$core.List<$core.int>>(12, _omitFieldNames ? '' : 'audio', $pb.PbFieldType.OY) + ..aOS(1, _omitFieldNames ? '' : 'id') + ..aOS(2, _omitFieldNames ? '' : 'audioName', protoName: 'audioName') + ..aOS(3, _omitFieldNames ? '' : 'audioType', protoName: 'audioType') + ..aOM<$0.Timestamp>(4, _omitFieldNames ? '' : 'dateTime', subBuilder: $0.Timestamp.create) + ..a<$core.int>(5, _omitFieldNames ? '' : 'system', $pb.PbFieldType.O3) + ..a<$core.int>(6, _omitFieldNames ? '' : 'talkgroup', $pb.PbFieldType.O3) + ..a<$core.int>(7, _omitFieldNames ? '' : 'source', $pb.PbFieldType.O3) + ..aInt64(8, _omitFieldNames ? '' : 'frequency') + ..p<$fixnum.Int64>(9, _omitFieldNames ? '' : 'frequencies', $pb.PbFieldType.K6) + ..p<$core.int>(10, _omitFieldNames ? '' : 'patches', $pb.PbFieldType.K3) + ..p<$core.int>(11, _omitFieldNames ? '' : 'sources', $pb.PbFieldType.K3) + ..a<$core.int>(12, _omitFieldNames ? '' : 'duration', $pb.PbFieldType.O3) + ..a<$core.List<$core.int>>(13, _omitFieldNames ? '' : 'audio', $pb.PbFieldType.OY) ..hasRequiredFields = false ; @@ -350,105 +355,114 @@ class Call extends $pb.GeneratedMessage { static Call? _defaultInstance; @$pb.TagNumber(1) - $core.String get audioName => $_getSZ(0); + $core.String get id => $_getSZ(0); @$pb.TagNumber(1) - set audioName($core.String v) { $_setString(0, v); } + set id($core.String v) { $_setString(0, v); } @$pb.TagNumber(1) - $core.bool hasAudioName() => $_has(0); + $core.bool hasId() => $_has(0); @$pb.TagNumber(1) - void clearAudioName() => clearField(1); + void clearId() => clearField(1); @$pb.TagNumber(2) - $core.String get audioType => $_getSZ(1); + $core.String get audioName => $_getSZ(1); @$pb.TagNumber(2) - set audioType($core.String v) { $_setString(1, v); } + set audioName($core.String v) { $_setString(1, v); } @$pb.TagNumber(2) - $core.bool hasAudioType() => $_has(1); + $core.bool hasAudioName() => $_has(1); @$pb.TagNumber(2) - void clearAudioType() => clearField(2); + void clearAudioName() => clearField(2); @$pb.TagNumber(3) - $0.Timestamp get dateTime => $_getN(2); + $core.String get audioType => $_getSZ(2); @$pb.TagNumber(3) - set dateTime($0.Timestamp v) { setField(3, v); } + set audioType($core.String v) { $_setString(2, v); } @$pb.TagNumber(3) - $core.bool hasDateTime() => $_has(2); + $core.bool hasAudioType() => $_has(2); @$pb.TagNumber(3) - void clearDateTime() => clearField(3); - @$pb.TagNumber(3) - $0.Timestamp ensureDateTime() => $_ensure(2); + void clearAudioType() => clearField(3); @$pb.TagNumber(4) - $core.int get system => $_getIZ(3); + $0.Timestamp get dateTime => $_getN(3); @$pb.TagNumber(4) - set system($core.int v) { $_setSignedInt32(3, v); } + set dateTime($0.Timestamp v) { setField(4, v); } @$pb.TagNumber(4) - $core.bool hasSystem() => $_has(3); + $core.bool hasDateTime() => $_has(3); @$pb.TagNumber(4) - void clearSystem() => clearField(4); + void clearDateTime() => clearField(4); + @$pb.TagNumber(4) + $0.Timestamp ensureDateTime() => $_ensure(3); @$pb.TagNumber(5) - $core.int get talkgroup => $_getIZ(4); + $core.int get system => $_getIZ(4); @$pb.TagNumber(5) - set talkgroup($core.int v) { $_setSignedInt32(4, v); } + set system($core.int v) { $_setSignedInt32(4, v); } @$pb.TagNumber(5) - $core.bool hasTalkgroup() => $_has(4); + $core.bool hasSystem() => $_has(4); @$pb.TagNumber(5) - void clearTalkgroup() => clearField(5); + void clearSystem() => clearField(5); @$pb.TagNumber(6) - $core.int get source => $_getIZ(5); + $core.int get talkgroup => $_getIZ(5); @$pb.TagNumber(6) - set source($core.int v) { $_setSignedInt32(5, v); } + set talkgroup($core.int v) { $_setSignedInt32(5, v); } @$pb.TagNumber(6) - $core.bool hasSource() => $_has(5); + $core.bool hasTalkgroup() => $_has(5); @$pb.TagNumber(6) - void clearSource() => clearField(6); + void clearTalkgroup() => clearField(6); @$pb.TagNumber(7) - $fixnum.Int64 get frequency => $_getI64(6); + $core.int get source => $_getIZ(6); @$pb.TagNumber(7) - set frequency($fixnum.Int64 v) { $_setInt64(6, v); } + set source($core.int v) { $_setSignedInt32(6, v); } @$pb.TagNumber(7) - $core.bool hasFrequency() => $_has(6); + $core.bool hasSource() => $_has(6); @$pb.TagNumber(7) - void clearFrequency() => clearField(7); + void clearSource() => clearField(7); @$pb.TagNumber(8) - $core.List<$fixnum.Int64> get frequencies => $_getList(7); + $fixnum.Int64 get frequency => $_getI64(7); + @$pb.TagNumber(8) + set frequency($fixnum.Int64 v) { $_setInt64(7, v); } + @$pb.TagNumber(8) + $core.bool hasFrequency() => $_has(7); + @$pb.TagNumber(8) + void clearFrequency() => clearField(8); @$pb.TagNumber(9) - $core.List<$core.int> get patches => $_getList(8); + $core.List<$fixnum.Int64> get frequencies => $_getList(8); @$pb.TagNumber(10) - $core.List<$core.int> get sources => $_getList(9); + $core.List<$core.int> get patches => $_getList(9); @$pb.TagNumber(11) - $core.int get duration => $_getIZ(10); - @$pb.TagNumber(11) - set duration($core.int v) { $_setSignedInt32(10, v); } - @$pb.TagNumber(11) - $core.bool hasDuration() => $_has(10); - @$pb.TagNumber(11) - void clearDuration() => clearField(11); + $core.List<$core.int> get sources => $_getList(10); @$pb.TagNumber(12) - $core.List<$core.int> get audio => $_getN(11); + $core.int get duration => $_getIZ(11); @$pb.TagNumber(12) - set audio($core.List<$core.int> v) { $_setBytes(11, v); } + set duration($core.int v) { $_setSignedInt32(11, v); } @$pb.TagNumber(12) - $core.bool hasAudio() => $_has(11); + $core.bool hasDuration() => $_has(11); @$pb.TagNumber(12) - void clearAudio() => clearField(12); + void clearDuration() => clearField(12); + + @$pb.TagNumber(13) + $core.List<$core.int> get audio => $_getN(12); + @$pb.TagNumber(13) + set audio($core.List<$core.int> v) { $_setBytes(12, v); } + @$pb.TagNumber(13) + $core.bool hasAudio() => $_has(12); + @$pb.TagNumber(13) + void clearAudio() => clearField(13); } class Hello extends $pb.GeneratedMessage { factory Hello({ - Version? version, + ServerInfo? serverInfo, }) { final $result = create(); - if (version != null) { - $result.version = version; + if (serverInfo != null) { + $result.serverInfo = serverInfo; } return $result; } @@ -457,7 +471,7 @@ class Hello extends $pb.GeneratedMessage { factory Hello.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'Hello', package: const $pb.PackageName(_omitMessageNames ? '' : 'stillbox'), createEmptyInstance: create) - ..aOM(1, _omitFieldNames ? '' : 'version', subBuilder: Version.create) + ..aOM(1, _omitFieldNames ? '' : 'serverInfo', subBuilder: ServerInfo.create) ..hasRequiredFields = false ; @@ -483,15 +497,15 @@ class Hello extends $pb.GeneratedMessage { static Hello? _defaultInstance; @$pb.TagNumber(1) - Version get version => $_getN(0); + ServerInfo get serverInfo => $_getN(0); @$pb.TagNumber(1) - set version(Version v) { setField(1, v); } + set serverInfo(ServerInfo v) { setField(1, v); } @$pb.TagNumber(1) - $core.bool hasVersion() => $_has(0); + $core.bool hasServerInfo() => $_has(0); @$pb.TagNumber(1) - void clearVersion() => clearField(1); + void clearServerInfo() => clearField(1); @$pb.TagNumber(1) - Version ensureVersion() => $_ensure(0); + ServerInfo ensureServerInfo() => $_ensure(0); } class UserPopup extends $pb.GeneratedMessage { @@ -1203,12 +1217,13 @@ class Search extends $pb.GeneratedMessage { static Search? _defaultInstance; } -class Version extends $pb.GeneratedMessage { - factory Version({ +class ServerInfo extends $pb.GeneratedMessage { + factory ServerInfo({ $core.String? serverName, $core.String? version, $core.String? built, $core.String? platform, + $core.String? dbSize, }) { final $result = create(); if (serverName != null) { @@ -1223,17 +1238,21 @@ class Version extends $pb.GeneratedMessage { if (platform != null) { $result.platform = platform; } + if (dbSize != null) { + $result.dbSize = dbSize; + } return $result; } - Version._() : super(); - factory Version.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory Version.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + ServerInfo._() : super(); + factory ServerInfo.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory ServerInfo.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'Version', package: const $pb.PackageName(_omitMessageNames ? '' : 'stillbox'), createEmptyInstance: create) + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'ServerInfo', package: const $pb.PackageName(_omitMessageNames ? '' : 'stillbox'), createEmptyInstance: create) ..aOS(1, _omitFieldNames ? '' : 'serverName') ..aOS(2, _omitFieldNames ? '' : 'version') ..aOS(3, _omitFieldNames ? '' : 'built') ..aOS(4, _omitFieldNames ? '' : 'platform') + ..aOS(5, _omitFieldNames ? '' : 'dbSize') ..hasRequiredFields = false ; @@ -1241,22 +1260,22 @@ class Version extends $pb.GeneratedMessage { 'Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' 'Will be removed in next major version') - Version clone() => Version()..mergeFromMessage(this); + ServerInfo clone() => ServerInfo()..mergeFromMessage(this); @$core.Deprecated( 'Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' 'Will be removed in next major version') - Version copyWith(void Function(Version) updates) => super.copyWith((message) => updates(message as Version)) as Version; + ServerInfo copyWith(void Function(ServerInfo) updates) => super.copyWith((message) => updates(message as ServerInfo)) as ServerInfo; $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') - static Version create() => Version._(); - Version createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); + static ServerInfo create() => ServerInfo._(); + ServerInfo createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') - static Version getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static Version? _defaultInstance; + static ServerInfo getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static ServerInfo? _defaultInstance; @$pb.TagNumber(1) $core.String get serverName => $_getSZ(0); @@ -1293,6 +1312,15 @@ class Version extends $pb.GeneratedMessage { $core.bool hasPlatform() => $_has(3); @$pb.TagNumber(4) void clearPlatform() => clearField(4); + + @$pb.TagNumber(5) + $core.String get dbSize => $_getSZ(4); + @$pb.TagNumber(5) + set dbSize($core.String v) { $_setString(4, v); } + @$pb.TagNumber(5) + $core.bool hasDbSize() => $_has(4); + @$pb.TagNumber(5) + void clearDbSize() => clearField(5); } diff --git a/lib/pb/stillbox.pbjson.dart b/lib/pb/stillbox.pbjson.dart index be7eaf2..8190daf 100644 --- a/lib/pb/stillbox.pbjson.dart +++ b/lib/pb/stillbox.pbjson.dart @@ -76,18 +76,19 @@ final $typed_data.Uint8List commandResponseDescriptor = $convert.base64Decode( const Call$json = { '1': 'Call', '2': [ - {'1': 'audioName', '3': 1, '4': 1, '5': 9, '10': 'audioName'}, - {'1': 'audioType', '3': 2, '4': 1, '5': 9, '10': 'audioType'}, - {'1': 'date_time', '3': 3, '4': 1, '5': 11, '6': '.google.protobuf.Timestamp', '10': 'dateTime'}, - {'1': 'system', '3': 4, '4': 1, '5': 5, '10': 'system'}, - {'1': 'talkgroup', '3': 5, '4': 1, '5': 5, '10': 'talkgroup'}, - {'1': 'source', '3': 6, '4': 1, '5': 5, '10': 'source'}, - {'1': 'frequency', '3': 7, '4': 1, '5': 3, '10': 'frequency'}, - {'1': 'frequencies', '3': 8, '4': 3, '5': 3, '10': 'frequencies'}, - {'1': 'patches', '3': 9, '4': 3, '5': 5, '10': 'patches'}, - {'1': 'sources', '3': 10, '4': 3, '5': 5, '10': 'sources'}, - {'1': 'duration', '3': 11, '4': 1, '5': 5, '9': 0, '10': 'duration', '17': true}, - {'1': 'audio', '3': 12, '4': 1, '5': 12, '10': 'audio'}, + {'1': 'id', '3': 1, '4': 1, '5': 9, '10': 'id'}, + {'1': 'audioName', '3': 2, '4': 1, '5': 9, '10': 'audioName'}, + {'1': 'audioType', '3': 3, '4': 1, '5': 9, '10': 'audioType'}, + {'1': 'date_time', '3': 4, '4': 1, '5': 11, '6': '.google.protobuf.Timestamp', '10': 'dateTime'}, + {'1': 'system', '3': 5, '4': 1, '5': 5, '10': 'system'}, + {'1': 'talkgroup', '3': 6, '4': 1, '5': 5, '10': 'talkgroup'}, + {'1': 'source', '3': 7, '4': 1, '5': 5, '10': 'source'}, + {'1': 'frequency', '3': 8, '4': 1, '5': 3, '10': 'frequency'}, + {'1': 'frequencies', '3': 9, '4': 3, '5': 3, '10': 'frequencies'}, + {'1': 'patches', '3': 10, '4': 3, '5': 5, '10': 'patches'}, + {'1': 'sources', '3': 11, '4': 3, '5': 5, '10': 'sources'}, + {'1': 'duration', '3': 12, '4': 1, '5': 5, '9': 0, '10': 'duration', '17': true}, + {'1': 'audio', '3': 13, '4': 1, '5': 12, '10': 'audio'}, ], '8': [ {'1': '_duration'}, @@ -96,25 +97,27 @@ const Call$json = { /// Descriptor for `Call`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List callDescriptor = $convert.base64Decode( - 'CgRDYWxsEhwKCWF1ZGlvTmFtZRgBIAEoCVIJYXVkaW9OYW1lEhwKCWF1ZGlvVHlwZRgCIAEoCV' - 'IJYXVkaW9UeXBlEjcKCWRhdGVfdGltZRgDIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3Rh' - 'bXBSCGRhdGVUaW1lEhYKBnN5c3RlbRgEIAEoBVIGc3lzdGVtEhwKCXRhbGtncm91cBgFIAEoBV' - 'IJdGFsa2dyb3VwEhYKBnNvdXJjZRgGIAEoBVIGc291cmNlEhwKCWZyZXF1ZW5jeRgHIAEoA1IJ' - 'ZnJlcXVlbmN5EiAKC2ZyZXF1ZW5jaWVzGAggAygDUgtmcmVxdWVuY2llcxIYCgdwYXRjaGVzGA' - 'kgAygFUgdwYXRjaGVzEhgKB3NvdXJjZXMYCiADKAVSB3NvdXJjZXMSHwoIZHVyYXRpb24YCyAB' - 'KAVIAFIIZHVyYXRpb26IAQESFAoFYXVkaW8YDCABKAxSBWF1ZGlvQgsKCV9kdXJhdGlvbg=='); + 'CgRDYWxsEg4KAmlkGAEgASgJUgJpZBIcCglhdWRpb05hbWUYAiABKAlSCWF1ZGlvTmFtZRIcCg' + 'lhdWRpb1R5cGUYAyABKAlSCWF1ZGlvVHlwZRI3CglkYXRlX3RpbWUYBCABKAsyGi5nb29nbGUu' + 'cHJvdG9idWYuVGltZXN0YW1wUghkYXRlVGltZRIWCgZzeXN0ZW0YBSABKAVSBnN5c3RlbRIcCg' + 'l0YWxrZ3JvdXAYBiABKAVSCXRhbGtncm91cBIWCgZzb3VyY2UYByABKAVSBnNvdXJjZRIcCglm' + 'cmVxdWVuY3kYCCABKANSCWZyZXF1ZW5jeRIgCgtmcmVxdWVuY2llcxgJIAMoA1ILZnJlcXVlbm' + 'NpZXMSGAoHcGF0Y2hlcxgKIAMoBVIHcGF0Y2hlcxIYCgdzb3VyY2VzGAsgAygFUgdzb3VyY2Vz' + 'Eh8KCGR1cmF0aW9uGAwgASgFSABSCGR1cmF0aW9uiAEBEhQKBWF1ZGlvGA0gASgMUgVhdWRpb0' + 'ILCglfZHVyYXRpb24='); @$core.Deprecated('Use helloDescriptor instead') const Hello$json = { '1': 'Hello', '2': [ - {'1': 'version', '3': 1, '4': 1, '5': 11, '6': '.stillbox.Version', '10': 'version'}, + {'1': 'server_info', '3': 1, '4': 1, '5': 11, '6': '.stillbox.ServerInfo', '10': 'serverInfo'}, ], }; /// Descriptor for `Hello`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List helloDescriptor = $convert.base64Decode( - 'CgVIZWxsbxIrCgd2ZXJzaW9uGAEgASgLMhEuc3RpbGxib3guVmVyc2lvblIHdmVyc2lvbg=='); + 'CgVIZWxsbxI1CgtzZXJ2ZXJfaW5mbxgBIAEoCzIULnN0aWxsYm94LlNlcnZlckluZm9SCnNlcn' + 'ZlckluZm8='); @$core.Deprecated('Use userPopupDescriptor instead') const UserPopup$json = { @@ -276,20 +279,21 @@ const Search$json = { final $typed_data.Uint8List searchDescriptor = $convert.base64Decode( 'CgZTZWFyY2g='); -@$core.Deprecated('Use versionDescriptor instead') -const Version$json = { - '1': 'Version', +@$core.Deprecated('Use serverInfoDescriptor instead') +const ServerInfo$json = { + '1': 'ServerInfo', '2': [ {'1': 'server_name', '3': 1, '4': 1, '5': 9, '10': 'serverName'}, {'1': 'version', '3': 2, '4': 1, '5': 9, '10': 'version'}, {'1': 'built', '3': 3, '4': 1, '5': 9, '10': 'built'}, {'1': 'platform', '3': 4, '4': 1, '5': 9, '10': 'platform'}, + {'1': 'db_size', '3': 5, '4': 1, '5': 9, '10': 'dbSize'}, ], }; -/// Descriptor for `Version`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List versionDescriptor = $convert.base64Decode( - 'CgdWZXJzaW9uEh8KC3NlcnZlcl9uYW1lGAEgASgJUgpzZXJ2ZXJOYW1lEhgKB3ZlcnNpb24YAi' - 'ABKAlSB3ZlcnNpb24SFAoFYnVpbHQYAyABKAlSBWJ1aWx0EhoKCHBsYXRmb3JtGAQgASgJUghw' - 'bGF0Zm9ybQ=='); +/// Descriptor for `ServerInfo`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List serverInfoDescriptor = $convert.base64Decode( + 'CgpTZXJ2ZXJJbmZvEh8KC3NlcnZlcl9uYW1lGAEgASgJUgpzZXJ2ZXJOYW1lEhgKB3ZlcnNpb2' + '4YAiABKAlSB3ZlcnNpb24SFAoFYnVpbHQYAyABKAlSBWJ1aWx0EhoKCHBsYXRmb3JtGAQgASgJ' + 'UghwbGF0Zm9ybRIXCgdkYl9zaXplGAUgASgJUgZkYlNpemU='); diff --git a/lib/views/lcd.dart b/lib/views/lcd.dart index c18a76e..917d7ca 100644 --- a/lib/views/lcd.dart +++ b/lib/views/lcd.dart @@ -159,7 +159,7 @@ class ScannerLabel extends StatelessWidget { child: Container( padding: EdgeInsets.all(20.0), child: Text( - 'Server info:\n${version.serverName} ${version.version}\nbuilt ${version.built}\nrunning on ${version.platform}', + 'Server info:\n${version.serverName} ${version.version}\nbuilt ${version.built}\nrunning on ${version.platform}\nDB size ${version.dbSize}', style: TextStyle(color: Colors.black), ), ), diff --git a/protobuf/stillbox.proto b/protobuf/stillbox.proto index 99b2bdb..815c9b3 100644 --- a/protobuf/stillbox.proto +++ b/protobuf/stillbox.proto @@ -24,18 +24,19 @@ message CommandResponse { } message Call { - string audioName = 1; - string audioType = 2; - google.protobuf.Timestamp date_time = 3; - int32 system = 4; - int32 talkgroup = 5; - int32 source = 6; - int64 frequency = 7; - repeated int64 frequencies = 8; - repeated int32 patches = 9; - repeated int32 sources = 10; - optional int32 duration = 11; - bytes audio = 12; + string id = 1; + string audioName = 2; + string audioType = 3; + google.protobuf.Timestamp date_time = 4; + int32 system = 5; + int32 talkgroup = 6; + int32 source = 7; + int64 frequency = 8; + repeated int64 frequencies = 9; + repeated int32 patches = 10; + repeated int32 sources = 11; + optional int32 duration = 12; + bytes audio = 13; } message Hello {