chore: restore product scaffold to rollback baseline
This commit is contained in:
@@ -10,7 +10,7 @@ import 'package:freezed_annotation/freezed_annotation.dart' hide protected;
|
||||
part 'api.freezed.dart';
|
||||
|
||||
// These functions are ignored because they are not marked as `pub`: `install_panic_diagnostic_hook`, `log_file_path`, `log_sink`, `map_join_error_code`, `map_join_sync_state`, `open_log_file`, `permission_events`, `publish_permission_state`, `runtime`, `session`, `task_join_error`, `transmit_mode_from_u8`
|
||||
// These function are ignored because they are on traits that is not defined in current crate (put an empty `#[frb]` on it to unignore): `assert_fields_are_eq`, `assert_fields_are_eq`, `assert_fields_are_eq`, `assert_fields_are_eq`, `assert_fields_are_eq`, `assert_fields_are_eq`, `assert_fields_are_eq`, `assert_fields_are_eq`, `clone`, `clone`, `clone`, `clone`, `clone`, `clone`, `clone`, `clone`, `clone`, `clone`, `clone`, `clone`, `clone`, `clone`, `clone`, `clone`, `clone`, `clone`, `clone`, `clone`, `clone`, `clone`, `clone`, `clone`, `eq`, `eq`, `eq`, `eq`, `eq`, `eq`, `eq`, `eq`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`
|
||||
// These function are ignored because they are on traits that is not defined in current crate (put an empty `#[frb]` on it to unignore): `assert_fields_are_eq`, `assert_fields_are_eq`, `assert_fields_are_eq`, `assert_fields_are_eq`, `assert_fields_are_eq`, `assert_fields_are_eq`, `assert_fields_are_eq`, `assert_fields_are_eq`, `clone`, `clone`, `clone`, `clone`, `clone`, `clone`, `clone`, `clone`, `clone`, `clone`, `clone`, `clone`, `clone`, `clone`, `clone`, `clone`, `clone`, `clone`, `clone`, `clone`, `clone`, `clone`, `clone`, `clone`, `clone`, `eq`, `eq`, `eq`, `eq`, `eq`, `eq`, `eq`, `eq`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`
|
||||
// These functions are ignored (category: IgnoreBecauseExplicitAttribute): `from_kotlin_str`, `to_permission_gate`
|
||||
|
||||
/// Return the platform-conventional log-file path as a string, or
|
||||
@@ -33,9 +33,19 @@ Future<BridgeSnapshot> connect({
|
||||
password: password,
|
||||
);
|
||||
|
||||
/// Warm server address resolution for the active host field. This is
|
||||
/// intentionally fire-and-forget from the UI perspective: it schedules
|
||||
/// Rust-side prefetch work and never opens a TS3 session.
|
||||
Future<void> prefetchServer({required String host}) =>
|
||||
RustLib.instance.api.crateApiPrefetchServer(host: host);
|
||||
|
||||
/// Re-fetch a fresh snapshot from the active connection.
|
||||
Future<BridgeSnapshot> snapshot() => RustLib.instance.api.crateApiSnapshot();
|
||||
|
||||
/// Fetch richer profile and live connection details for one online client.
|
||||
Future<BridgeClientProfile> clientProfile({required BigInt clientId}) =>
|
||||
RustLib.instance.api.crateApiClientProfile(clientId: clientId);
|
||||
|
||||
/// Disconnect from the server. No-op if not connected.
|
||||
Future<void> disconnect() => RustLib.instance.api.crateApiDisconnect();
|
||||
|
||||
@@ -198,8 +208,7 @@ Future<void> sendChatMessage({
|
||||
/// On non-Android targets or before a voice session opens the
|
||||
/// section is omitted. Per SDD-090 every field in that section is
|
||||
/// a device-side technical scalar — no PII admitted.
|
||||
Future<String> exportDiagnostics() =>
|
||||
RustLib.instance.api.crateApiExportDiagnostics();
|
||||
String exportDiagnostics() => RustLib.instance.api.crateApiExportDiagnostics();
|
||||
|
||||
/// Wire the identity persistence store to a platform-private
|
||||
/// directory. Should be called once on app start after Flutter has
|
||||
@@ -796,9 +805,6 @@ class BridgeClient {
|
||||
/// Stable client id.
|
||||
final BigInt id;
|
||||
|
||||
/// Stable TeamSpeak unique identifier.
|
||||
final String uid;
|
||||
|
||||
/// Channel id the client is currently in.
|
||||
final BigInt channel;
|
||||
|
||||
@@ -825,7 +831,6 @@ class BridgeClient {
|
||||
|
||||
const BridgeClient({
|
||||
required this.id,
|
||||
required this.uid,
|
||||
required this.channel,
|
||||
required this.name,
|
||||
required this.inputMuted,
|
||||
@@ -839,7 +844,6 @@ class BridgeClient {
|
||||
@override
|
||||
int get hashCode =>
|
||||
id.hashCode ^
|
||||
uid.hashCode ^
|
||||
channel.hashCode ^
|
||||
name.hashCode ^
|
||||
inputMuted.hashCode ^
|
||||
@@ -855,7 +859,6 @@ class BridgeClient {
|
||||
other is BridgeClient &&
|
||||
runtimeType == other.runtimeType &&
|
||||
id == other.id &&
|
||||
uid == other.uid &&
|
||||
channel == other.channel &&
|
||||
name == other.name &&
|
||||
inputMuted == other.inputMuted &&
|
||||
@@ -866,6 +869,172 @@ class BridgeClient {
|
||||
talkPowerGranted == other.talkPowerGranted;
|
||||
}
|
||||
|
||||
/// Rich profile and live connection details for one online client.
|
||||
class BridgeClientProfile {
|
||||
/// Stable online client id.
|
||||
final BigInt id;
|
||||
|
||||
/// Channel the client is currently in.
|
||||
final BigInt channel;
|
||||
|
||||
/// Nickname.
|
||||
final String name;
|
||||
|
||||
/// TeamSpeak unique id.
|
||||
final String uniqueId;
|
||||
|
||||
/// Stable TeamSpeak database id, when visible.
|
||||
final BigInt? databaseId;
|
||||
|
||||
/// ISO country code, when visible.
|
||||
final String countryCode;
|
||||
|
||||
/// User description, when visible.
|
||||
final String description;
|
||||
|
||||
/// Client version string.
|
||||
final String version;
|
||||
|
||||
/// Client platform string.
|
||||
final String platform;
|
||||
|
||||
/// Account creation time as Unix seconds.
|
||||
final PlatformInt64? createdUnixSeconds;
|
||||
|
||||
/// Last connection time as Unix seconds.
|
||||
final PlatformInt64? lastConnectedUnixSeconds;
|
||||
|
||||
/// Total historical connections.
|
||||
final BigInt? connectionsTotal;
|
||||
|
||||
/// Current online duration in seconds.
|
||||
final PlatformInt64? onlineSeconds;
|
||||
|
||||
/// Current idle time in milliseconds.
|
||||
final PlatformInt64? idleMilliseconds;
|
||||
|
||||
/// Current ping in milliseconds.
|
||||
final PlatformInt64? pingMilliseconds;
|
||||
|
||||
/// Client address. Empty when permission-gated.
|
||||
final String clientAddress;
|
||||
|
||||
/// Resolved server group names.
|
||||
final List<String> serverGroups;
|
||||
|
||||
/// Resolved channel group name.
|
||||
final String channelGroup;
|
||||
|
||||
/// TeamSpeak avatar file path suffix.
|
||||
final String avatarPath;
|
||||
|
||||
/// Downloaded bytes this month.
|
||||
final BigInt? bytesDownloadedMonth;
|
||||
|
||||
/// Uploaded bytes this month.
|
||||
final BigInt? bytesUploadedMonth;
|
||||
|
||||
/// Downloaded bytes across all time.
|
||||
final BigInt? bytesDownloadedTotal;
|
||||
|
||||
/// Uploaded bytes across all time.
|
||||
final BigInt? bytesUploadedTotal;
|
||||
|
||||
/// Client-to-server total packet loss ratio.
|
||||
final double? packetLossClientToServerTotal;
|
||||
|
||||
/// Server-to-client total packet loss ratio.
|
||||
final double? packetLossServerToClientTotal;
|
||||
|
||||
const BridgeClientProfile({
|
||||
required this.id,
|
||||
required this.channel,
|
||||
required this.name,
|
||||
required this.uniqueId,
|
||||
this.databaseId,
|
||||
required this.countryCode,
|
||||
required this.description,
|
||||
required this.version,
|
||||
required this.platform,
|
||||
this.createdUnixSeconds,
|
||||
this.lastConnectedUnixSeconds,
|
||||
this.connectionsTotal,
|
||||
this.onlineSeconds,
|
||||
this.idleMilliseconds,
|
||||
this.pingMilliseconds,
|
||||
required this.clientAddress,
|
||||
required this.serverGroups,
|
||||
required this.channelGroup,
|
||||
required this.avatarPath,
|
||||
this.bytesDownloadedMonth,
|
||||
this.bytesUploadedMonth,
|
||||
this.bytesDownloadedTotal,
|
||||
this.bytesUploadedTotal,
|
||||
this.packetLossClientToServerTotal,
|
||||
this.packetLossServerToClientTotal,
|
||||
});
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
id.hashCode ^
|
||||
channel.hashCode ^
|
||||
name.hashCode ^
|
||||
uniqueId.hashCode ^
|
||||
databaseId.hashCode ^
|
||||
countryCode.hashCode ^
|
||||
description.hashCode ^
|
||||
version.hashCode ^
|
||||
platform.hashCode ^
|
||||
createdUnixSeconds.hashCode ^
|
||||
lastConnectedUnixSeconds.hashCode ^
|
||||
connectionsTotal.hashCode ^
|
||||
onlineSeconds.hashCode ^
|
||||
idleMilliseconds.hashCode ^
|
||||
pingMilliseconds.hashCode ^
|
||||
clientAddress.hashCode ^
|
||||
serverGroups.hashCode ^
|
||||
channelGroup.hashCode ^
|
||||
avatarPath.hashCode ^
|
||||
bytesDownloadedMonth.hashCode ^
|
||||
bytesUploadedMonth.hashCode ^
|
||||
bytesDownloadedTotal.hashCode ^
|
||||
bytesUploadedTotal.hashCode ^
|
||||
packetLossClientToServerTotal.hashCode ^
|
||||
packetLossServerToClientTotal.hashCode;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) =>
|
||||
identical(this, other) ||
|
||||
other is BridgeClientProfile &&
|
||||
runtimeType == other.runtimeType &&
|
||||
id == other.id &&
|
||||
channel == other.channel &&
|
||||
name == other.name &&
|
||||
uniqueId == other.uniqueId &&
|
||||
databaseId == other.databaseId &&
|
||||
countryCode == other.countryCode &&
|
||||
description == other.description &&
|
||||
version == other.version &&
|
||||
platform == other.platform &&
|
||||
createdUnixSeconds == other.createdUnixSeconds &&
|
||||
lastConnectedUnixSeconds == other.lastConnectedUnixSeconds &&
|
||||
connectionsTotal == other.connectionsTotal &&
|
||||
onlineSeconds == other.onlineSeconds &&
|
||||
idleMilliseconds == other.idleMilliseconds &&
|
||||
pingMilliseconds == other.pingMilliseconds &&
|
||||
clientAddress == other.clientAddress &&
|
||||
serverGroups == other.serverGroups &&
|
||||
channelGroup == other.channelGroup &&
|
||||
avatarPath == other.avatarPath &&
|
||||
bytesDownloadedMonth == other.bytesDownloadedMonth &&
|
||||
bytesUploadedMonth == other.bytesUploadedMonth &&
|
||||
bytesDownloadedTotal == other.bytesDownloadedTotal &&
|
||||
bytesUploadedTotal == other.bytesUploadedTotal &&
|
||||
packetLossClientToServerTotal ==
|
||||
other.packetLossClientToServerTotal &&
|
||||
packetLossServerToClientTotal == other.packetLossServerToClientTotal;
|
||||
}
|
||||
|
||||
/// Bridge effect owner for AEC/NS/AGC.
|
||||
enum BridgeEffectOwner {
|
||||
/// Platform-owned effect.
|
||||
|
||||
Reference in New Issue
Block a user