feat(audio,bridge,flutter): v1 audio + PTT lifecycle implementation (SDD-094..097)
Implement the SDD-094 / SDD-095 / SDD-096 / SDD-097 detailed designs
committed in dfa84ee.
Rust side
- chanora_audio::TransmitMode enum (Ptt/Continuous/VoiceActivity) with
serde-friendly u8 repr (SDD-095).
- chanora_audio::TransmitModeSelector: lock-free Atomic-backed selector
that is the sole writer of transmit_active (per SAD-083), applying
hard_mute as a final clamp. VoiceActivity falls through to Continuous
for v1 (DEC-030 placeholder).
- chanora_audio::ReleaseTailTimer: tokio-task-owning struct driving the
selector's ptt_held input; default 200 ms tail, configurable 0–500 ms
with AtomicU32 hot read; pending JoinHandle held in a std::sync::Mutex
touched only on PTT edge transitions (SDD-096).
- chanora_storage: AudioMeta persisted as audio_meta.json next to
identity.dek; get/set_transmit_mode + get/set_release_tail_ms with
0..=500 clamp on write.
- chanora_core::ChanoraSession: voice_join(channel, password) and
voice_leave() are the new lifecycle entry points; ensure_audio_running
and shutdown_audio_if_idle are private helpers around the existing
Option<AudioEngine> field. SessionEvent::VoiceState carries the
in_channel / transmit_mode / mute / release_tail_ms tuple. Selector
state survives reconnect; supervisor rewires it to each fresh engine
gate.
- chanora_bridge: drop start_audio; add voice_join, voice_leave,
set/get_transmit_mode, set/get_release_tail_ms, set_hard_mute.
BridgeEvent::VoiceState mirrors the core event. AudioStarted/Stopped
kept for backwards compat but Flutter ignores them in the new UI.
Flutter side
- New apps/chanora_flutter/lib/widgets/voice_bar.dart replaces the
legacy _AudioControls widget. Renders channel pill, mode badge,
mute toggle, level meter, PttCapabilityBadge, leave button. No
manual Start affordance anywhere.
- New apps/chanora_flutter/lib/widgets/voice_settings.dart dialog with
TransmitMode radio group (VoiceActivity disabled with 'Coming soon'
trailing label per DEC-030), bind-key button, release-tail slider
0–500 ms step 25.
- main.dart: state fields _inChannel, _transmitMode, _hardMute,
_releaseTailMs driven by BridgeEvent_VoiceState. Channel-tap now
calls voiceJoin instead of moveToChannel. Removed _onStartAudio,
_audioStarted-gated branch, and the FilledButton.
- l10n: 11 new strings in app_en.arb + app_zh.arb.
Verification
- cargo check --workspace: clean.
- cargo test --workspace --lib: 72 passed / 0 failed / 1 ignored
(chanora_audio: +12 new tests for TransmitMode/Selector/ReleaseTail;
chanora_storage: +2 new tests for audio_meta round-trip).
- flutter analyze: 0 errors, 0 warnings; 6 infos are the Flutter 3.32
Radio.groupValue deprecation (pre-existing API usage).
- FRB Dart/Rust bindings regenerated via flutter_rust_bridge_codegen.
Follow-up (intentionally deferred)
- PttController and per-platform PTT backends still drive AudioTransmitGate
directly via the legacy set_ptt path; routing those key edges through
ChanoraSession::release_tail_timer().{key_down,key_up} so the tail
applies to native PTT input is a contained wiring change in a follow-up.
- Real audio-level RMS in BridgeAudioStats (current meter is binary).
- VoiceActivity backend (DEC-030).
This commit is contained in:
@@ -9,8 +9,8 @@ import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart';
|
||||
import 'package:freezed_annotation/freezed_annotation.dart' hide protected;
|
||||
part 'api.freezed.dart';
|
||||
|
||||
// These functions are ignored because they are not marked as `pub`: `log_sink`, `runtime`, `session`
|
||||
// These function are ignored because they are on traits that is not defined in current crate (put an empty `#[frb]` on it to unignore): `clone`, `clone`, `clone`, `clone`, `clone`, `clone`, `clone`, `clone`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `from`, `from`, `from`, `from`, `from`, `from`
|
||||
// These functions are ignored because they are not marked as `pub`: `log_sink`, `runtime`, `session`, `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): `clone`, `clone`, `clone`, `clone`, `clone`, `clone`, `clone`, `clone`, `clone`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`
|
||||
|
||||
/// Connect to a TeamSpeak-compatible server and return the initial
|
||||
/// state snapshot. Honours the DEC-006 single-connection invariant
|
||||
@@ -37,14 +37,50 @@ Future<void> disconnect() => RustLib.instance.api.crateApiDisconnect();
|
||||
/// True if a connection is currently active.
|
||||
Future<bool> isConnected() => RustLib.instance.api.crateApiIsConnected();
|
||||
|
||||
/// Start the audio engine on the active connection. Requires a
|
||||
/// connection; idempotent (will replace any previous engine).
|
||||
Future<void> startAudio() => RustLib.instance.api.crateApiStartAudio();
|
||||
|
||||
/// Set the push-to-talk state.
|
||||
///
|
||||
/// Superseded in v1 by [`set_transmit_mode`] + the binding capture
|
||||
/// dialog. Retained so legacy callers and integration tests keep
|
||||
/// working; the new VoiceBar UI no longer invokes this.
|
||||
Future<void> setPtt({required bool active}) =>
|
||||
RustLib.instance.api.crateApiSetPtt(active: active);
|
||||
|
||||
/// Join a voice channel (SDD-094). Moves the user to `channel_id`,
|
||||
/// brings up the audio engine if needed, and emits
|
||||
/// `BridgeEvent::VoiceState`. `password` may be empty.
|
||||
Future<void> voiceJoin({required BigInt channelId, required String password}) =>
|
||||
RustLib.instance.api.crateApiVoiceJoin(
|
||||
channelId: channelId,
|
||||
password: password,
|
||||
);
|
||||
|
||||
/// Leave the current voice channel (SDD-094). Tears down the audio
|
||||
/// engine and emits `BridgeEvent::VoiceState`.
|
||||
Future<void> voiceLeave() => RustLib.instance.api.crateApiVoiceLeave();
|
||||
|
||||
/// Set the active transmit mode (SDD-095).
|
||||
Future<void> setTransmitMode({required BridgeTransmitMode mode}) =>
|
||||
RustLib.instance.api.crateApiSetTransmitMode(mode: mode);
|
||||
|
||||
/// Read the active transmit mode.
|
||||
Future<BridgeTransmitMode> getTransmitMode() =>
|
||||
RustLib.instance.api.crateApiGetTransmitMode();
|
||||
|
||||
/// Update the release-tail in milliseconds (SDD-096). Values are
|
||||
/// clamped to `0..=500` on the Rust side; passing anything larger
|
||||
/// silently saturates.
|
||||
Future<void> setReleaseTailMs({required int ms}) =>
|
||||
RustLib.instance.api.crateApiSetReleaseTailMs(ms: ms);
|
||||
|
||||
/// Read the current release-tail in milliseconds.
|
||||
Future<int> getReleaseTailMs() =>
|
||||
RustLib.instance.api.crateApiGetReleaseTailMs();
|
||||
|
||||
/// Engage or release the hard-mute clamp (SDD-094). When `true`
|
||||
/// the audio engine transmits nothing regardless of mode.
|
||||
Future<void> setHardMute({required bool muted}) =>
|
||||
RustLib.instance.api.crateApiSetHardMute(muted: muted);
|
||||
|
||||
/// Update the active PTT binding (gen2 v0.9.3 / DEC-026). The
|
||||
/// platform_key string is opaque to the bridge — it identifies the
|
||||
/// bound key inside the platform backend and never appears in any
|
||||
@@ -362,6 +398,23 @@ sealed class BridgeEvent with _$BridgeEvent {
|
||||
/// `"mouse-side-button"`); empty when no binding is active.
|
||||
required String boundInputClass,
|
||||
}) = BridgeEvent_PttCapability;
|
||||
|
||||
/// Voice subsystem state snapshot (SDD-094). The Flutter
|
||||
/// VoiceBar listens to this stream.
|
||||
const factory BridgeEvent.voiceState({
|
||||
/// True when the session is currently joined to a voice
|
||||
/// channel and the audio engine is running.
|
||||
required bool inChannel,
|
||||
|
||||
/// Active transmit mode.
|
||||
required BridgeTransmitMode transmitMode,
|
||||
|
||||
/// True when the hard-mute clamp is engaged.
|
||||
required bool mute,
|
||||
|
||||
/// Current release-tail in milliseconds (0..=500).
|
||||
required int releaseTailMs,
|
||||
}) = BridgeEvent_VoiceState;
|
||||
}
|
||||
|
||||
/// Coarse OS-reported network state. Mirrors
|
||||
@@ -440,3 +493,17 @@ class BridgeSnapshot {
|
||||
channels == other.channels &&
|
||||
clients == other.clients;
|
||||
}
|
||||
|
||||
/// Voice transmit mode mirror (SDD-095). Schema-controlled enum;
|
||||
/// the wire encoding matches [`chanora_core::TransmitMode::as_u8`].
|
||||
enum BridgeTransmitMode {
|
||||
/// Push-to-talk (default).
|
||||
ptt,
|
||||
|
||||
/// Continuous transmission while in channel and not muted.
|
||||
continuous,
|
||||
|
||||
/// Voice-activity detection — reserved per DEC-030; v1 behaves
|
||||
/// as `Continuous`.
|
||||
voiceActivity,
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@ extension BridgeEventPatterns on BridgeEvent {
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeMap<TResult extends Object?>({TResult Function( BridgeEvent_Connected value)? connected,TResult Function( BridgeEvent_Lost value)? lost,TResult Function( BridgeEvent_Reconnecting value)? reconnecting,TResult Function( BridgeEvent_Disconnected value)? disconnected,TResult Function( BridgeEvent_AudioStarted value)? audioStarted,TResult Function( BridgeEvent_AudioStopped value)? audioStopped,TResult Function( BridgeEvent_SnapshotChanged value)? snapshotChanged,TResult Function( BridgeEvent_PttCapability value)? pttCapability,required TResult orElse(),}){
|
||||
@optionalTypeArgs TResult maybeMap<TResult extends Object?>({TResult Function( BridgeEvent_Connected value)? connected,TResult Function( BridgeEvent_Lost value)? lost,TResult Function( BridgeEvent_Reconnecting value)? reconnecting,TResult Function( BridgeEvent_Disconnected value)? disconnected,TResult Function( BridgeEvent_AudioStarted value)? audioStarted,TResult Function( BridgeEvent_AudioStopped value)? audioStopped,TResult Function( BridgeEvent_SnapshotChanged value)? snapshotChanged,TResult Function( BridgeEvent_PttCapability value)? pttCapability,TResult Function( BridgeEvent_VoiceState value)? voiceState,required TResult orElse(),}){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case BridgeEvent_Connected() when connected != null:
|
||||
@@ -66,7 +66,8 @@ return disconnected(_that);case BridgeEvent_AudioStarted() when audioStarted !=
|
||||
return audioStarted(_that);case BridgeEvent_AudioStopped() when audioStopped != null:
|
||||
return audioStopped(_that);case BridgeEvent_SnapshotChanged() when snapshotChanged != null:
|
||||
return snapshotChanged(_that);case BridgeEvent_PttCapability() when pttCapability != null:
|
||||
return pttCapability(_that);case _:
|
||||
return pttCapability(_that);case BridgeEvent_VoiceState() when voiceState != null:
|
||||
return voiceState(_that);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
@@ -84,7 +85,7 @@ return pttCapability(_that);case _:
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult map<TResult extends Object?>({required TResult Function( BridgeEvent_Connected value) connected,required TResult Function( BridgeEvent_Lost value) lost,required TResult Function( BridgeEvent_Reconnecting value) reconnecting,required TResult Function( BridgeEvent_Disconnected value) disconnected,required TResult Function( BridgeEvent_AudioStarted value) audioStarted,required TResult Function( BridgeEvent_AudioStopped value) audioStopped,required TResult Function( BridgeEvent_SnapshotChanged value) snapshotChanged,required TResult Function( BridgeEvent_PttCapability value) pttCapability,}){
|
||||
@optionalTypeArgs TResult map<TResult extends Object?>({required TResult Function( BridgeEvent_Connected value) connected,required TResult Function( BridgeEvent_Lost value) lost,required TResult Function( BridgeEvent_Reconnecting value) reconnecting,required TResult Function( BridgeEvent_Disconnected value) disconnected,required TResult Function( BridgeEvent_AudioStarted value) audioStarted,required TResult Function( BridgeEvent_AudioStopped value) audioStopped,required TResult Function( BridgeEvent_SnapshotChanged value) snapshotChanged,required TResult Function( BridgeEvent_PttCapability value) pttCapability,required TResult Function( BridgeEvent_VoiceState value) voiceState,}){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case BridgeEvent_Connected():
|
||||
@@ -95,7 +96,8 @@ return disconnected(_that);case BridgeEvent_AudioStarted():
|
||||
return audioStarted(_that);case BridgeEvent_AudioStopped():
|
||||
return audioStopped(_that);case BridgeEvent_SnapshotChanged():
|
||||
return snapshotChanged(_that);case BridgeEvent_PttCapability():
|
||||
return pttCapability(_that);}
|
||||
return pttCapability(_that);case BridgeEvent_VoiceState():
|
||||
return voiceState(_that);}
|
||||
}
|
||||
/// A variant of `map` that fallback to returning `null`.
|
||||
///
|
||||
@@ -109,7 +111,7 @@ return pttCapability(_that);}
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>({TResult? Function( BridgeEvent_Connected value)? connected,TResult? Function( BridgeEvent_Lost value)? lost,TResult? Function( BridgeEvent_Reconnecting value)? reconnecting,TResult? Function( BridgeEvent_Disconnected value)? disconnected,TResult? Function( BridgeEvent_AudioStarted value)? audioStarted,TResult? Function( BridgeEvent_AudioStopped value)? audioStopped,TResult? Function( BridgeEvent_SnapshotChanged value)? snapshotChanged,TResult? Function( BridgeEvent_PttCapability value)? pttCapability,}){
|
||||
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>({TResult? Function( BridgeEvent_Connected value)? connected,TResult? Function( BridgeEvent_Lost value)? lost,TResult? Function( BridgeEvent_Reconnecting value)? reconnecting,TResult? Function( BridgeEvent_Disconnected value)? disconnected,TResult? Function( BridgeEvent_AudioStarted value)? audioStarted,TResult? Function( BridgeEvent_AudioStopped value)? audioStopped,TResult? Function( BridgeEvent_SnapshotChanged value)? snapshotChanged,TResult? Function( BridgeEvent_PttCapability value)? pttCapability,TResult? Function( BridgeEvent_VoiceState value)? voiceState,}){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case BridgeEvent_Connected() when connected != null:
|
||||
@@ -120,7 +122,8 @@ return disconnected(_that);case BridgeEvent_AudioStarted() when audioStarted !=
|
||||
return audioStarted(_that);case BridgeEvent_AudioStopped() when audioStopped != null:
|
||||
return audioStopped(_that);case BridgeEvent_SnapshotChanged() when snapshotChanged != null:
|
||||
return snapshotChanged(_that);case BridgeEvent_PttCapability() when pttCapability != null:
|
||||
return pttCapability(_that);case _:
|
||||
return pttCapability(_that);case BridgeEvent_VoiceState() when voiceState != null:
|
||||
return voiceState(_that);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
@@ -137,7 +140,7 @@ return pttCapability(_that);case _:
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>({TResult Function( String serverName)? connected,TResult Function( String reason)? lost,TResult Function( int attempt, int delaySecs)? reconnecting,TResult Function( String reason)? disconnected,TResult Function()? audioStarted,TResult Function()? audioStopped,TResult Function( int channels, int clients)? snapshotChanged,TResult Function( String level, String backendId, String boundInputClass)? pttCapability,required TResult orElse(),}) {final _that = this;
|
||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>({TResult Function( String serverName)? connected,TResult Function( String reason)? lost,TResult Function( int attempt, int delaySecs)? reconnecting,TResult Function( String reason)? disconnected,TResult Function()? audioStarted,TResult Function()? audioStopped,TResult Function( int channels, int clients)? snapshotChanged,TResult Function( String level, String backendId, String boundInputClass)? pttCapability,TResult Function( bool inChannel, BridgeTransmitMode transmitMode, bool mute, int releaseTailMs)? voiceState,required TResult orElse(),}) {final _that = this;
|
||||
switch (_that) {
|
||||
case BridgeEvent_Connected() when connected != null:
|
||||
return connected(_that.serverName);case BridgeEvent_Lost() when lost != null:
|
||||
@@ -147,7 +150,8 @@ return disconnected(_that.reason);case BridgeEvent_AudioStarted() when audioStar
|
||||
return audioStarted();case BridgeEvent_AudioStopped() when audioStopped != null:
|
||||
return audioStopped();case BridgeEvent_SnapshotChanged() when snapshotChanged != null:
|
||||
return snapshotChanged(_that.channels,_that.clients);case BridgeEvent_PttCapability() when pttCapability != null:
|
||||
return pttCapability(_that.level,_that.backendId,_that.boundInputClass);case _:
|
||||
return pttCapability(_that.level,_that.backendId,_that.boundInputClass);case BridgeEvent_VoiceState() when voiceState != null:
|
||||
return voiceState(_that.inChannel,_that.transmitMode,_that.mute,_that.releaseTailMs);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
@@ -165,7 +169,7 @@ return pttCapability(_that.level,_that.backendId,_that.boundInputClass);case _:
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult when<TResult extends Object?>({required TResult Function( String serverName) connected,required TResult Function( String reason) lost,required TResult Function( int attempt, int delaySecs) reconnecting,required TResult Function( String reason) disconnected,required TResult Function() audioStarted,required TResult Function() audioStopped,required TResult Function( int channels, int clients) snapshotChanged,required TResult Function( String level, String backendId, String boundInputClass) pttCapability,}) {final _that = this;
|
||||
@optionalTypeArgs TResult when<TResult extends Object?>({required TResult Function( String serverName) connected,required TResult Function( String reason) lost,required TResult Function( int attempt, int delaySecs) reconnecting,required TResult Function( String reason) disconnected,required TResult Function() audioStarted,required TResult Function() audioStopped,required TResult Function( int channels, int clients) snapshotChanged,required TResult Function( String level, String backendId, String boundInputClass) pttCapability,required TResult Function( bool inChannel, BridgeTransmitMode transmitMode, bool mute, int releaseTailMs) voiceState,}) {final _that = this;
|
||||
switch (_that) {
|
||||
case BridgeEvent_Connected():
|
||||
return connected(_that.serverName);case BridgeEvent_Lost():
|
||||
@@ -175,7 +179,8 @@ return disconnected(_that.reason);case BridgeEvent_AudioStarted():
|
||||
return audioStarted();case BridgeEvent_AudioStopped():
|
||||
return audioStopped();case BridgeEvent_SnapshotChanged():
|
||||
return snapshotChanged(_that.channels,_that.clients);case BridgeEvent_PttCapability():
|
||||
return pttCapability(_that.level,_that.backendId,_that.boundInputClass);}
|
||||
return pttCapability(_that.level,_that.backendId,_that.boundInputClass);case BridgeEvent_VoiceState():
|
||||
return voiceState(_that.inChannel,_that.transmitMode,_that.mute,_that.releaseTailMs);}
|
||||
}
|
||||
/// A variant of `when` that fallback to returning `null`
|
||||
///
|
||||
@@ -189,7 +194,7 @@ return pttCapability(_that.level,_that.backendId,_that.boundInputClass);}
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>({TResult? Function( String serverName)? connected,TResult? Function( String reason)? lost,TResult? Function( int attempt, int delaySecs)? reconnecting,TResult? Function( String reason)? disconnected,TResult? Function()? audioStarted,TResult? Function()? audioStopped,TResult? Function( int channels, int clients)? snapshotChanged,TResult? Function( String level, String backendId, String boundInputClass)? pttCapability,}) {final _that = this;
|
||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>({TResult? Function( String serverName)? connected,TResult? Function( String reason)? lost,TResult? Function( int attempt, int delaySecs)? reconnecting,TResult? Function( String reason)? disconnected,TResult? Function()? audioStarted,TResult? Function()? audioStopped,TResult? Function( int channels, int clients)? snapshotChanged,TResult? Function( String level, String backendId, String boundInputClass)? pttCapability,TResult? Function( bool inChannel, BridgeTransmitMode transmitMode, bool mute, int releaseTailMs)? voiceState,}) {final _that = this;
|
||||
switch (_that) {
|
||||
case BridgeEvent_Connected() when connected != null:
|
||||
return connected(_that.serverName);case BridgeEvent_Lost() when lost != null:
|
||||
@@ -199,7 +204,8 @@ return disconnected(_that.reason);case BridgeEvent_AudioStarted() when audioStar
|
||||
return audioStarted();case BridgeEvent_AudioStopped() when audioStopped != null:
|
||||
return audioStopped();case BridgeEvent_SnapshotChanged() when snapshotChanged != null:
|
||||
return snapshotChanged(_that.channels,_that.clients);case BridgeEvent_PttCapability() when pttCapability != null:
|
||||
return pttCapability(_that.level,_that.backendId,_that.boundInputClass);case _:
|
||||
return pttCapability(_that.level,_that.backendId,_that.boundInputClass);case BridgeEvent_VoiceState() when voiceState != null:
|
||||
return voiceState(_that.inChannel,_that.transmitMode,_that.mute,_that.releaseTailMs);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
@@ -686,6 +692,83 @@ as String,
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
|
||||
|
||||
class BridgeEvent_VoiceState extends BridgeEvent {
|
||||
const BridgeEvent_VoiceState({required this.inChannel, required this.transmitMode, required this.mute, required this.releaseTailMs}): super._();
|
||||
|
||||
|
||||
/// True when the session is currently joined to a voice
|
||||
/// channel and the audio engine is running.
|
||||
final bool inChannel;
|
||||
/// Active transmit mode.
|
||||
final BridgeTransmitMode transmitMode;
|
||||
/// True when the hard-mute clamp is engaged.
|
||||
final bool mute;
|
||||
/// Current release-tail in milliseconds (0..=500).
|
||||
final int releaseTailMs;
|
||||
|
||||
/// Create a copy of BridgeEvent
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
$BridgeEvent_VoiceStateCopyWith<BridgeEvent_VoiceState> get copyWith => _$BridgeEvent_VoiceStateCopyWithImpl<BridgeEvent_VoiceState>(this, _$identity);
|
||||
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is BridgeEvent_VoiceState&&(identical(other.inChannel, inChannel) || other.inChannel == inChannel)&&(identical(other.transmitMode, transmitMode) || other.transmitMode == transmitMode)&&(identical(other.mute, mute) || other.mute == mute)&&(identical(other.releaseTailMs, releaseTailMs) || other.releaseTailMs == releaseTailMs));
|
||||
}
|
||||
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,inChannel,transmitMode,mute,releaseTailMs);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'BridgeEvent.voiceState(inChannel: $inChannel, transmitMode: $transmitMode, mute: $mute, releaseTailMs: $releaseTailMs)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class $BridgeEvent_VoiceStateCopyWith<$Res> implements $BridgeEventCopyWith<$Res> {
|
||||
factory $BridgeEvent_VoiceStateCopyWith(BridgeEvent_VoiceState value, $Res Function(BridgeEvent_VoiceState) _then) = _$BridgeEvent_VoiceStateCopyWithImpl;
|
||||
@useResult
|
||||
$Res call({
|
||||
bool inChannel, BridgeTransmitMode transmitMode, bool mute, int releaseTailMs
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class _$BridgeEvent_VoiceStateCopyWithImpl<$Res>
|
||||
implements $BridgeEvent_VoiceStateCopyWith<$Res> {
|
||||
_$BridgeEvent_VoiceStateCopyWithImpl(this._self, this._then);
|
||||
|
||||
final BridgeEvent_VoiceState _self;
|
||||
final $Res Function(BridgeEvent_VoiceState) _then;
|
||||
|
||||
/// Create a copy of BridgeEvent
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') $Res call({Object? inChannel = null,Object? transmitMode = null,Object? mute = null,Object? releaseTailMs = null,}) {
|
||||
return _then(BridgeEvent_VoiceState(
|
||||
inChannel: null == inChannel ? _self.inChannel : inChannel // ignore: cast_nullable_to_non_nullable
|
||||
as bool,transmitMode: null == transmitMode ? _self.transmitMode : transmitMode // ignore: cast_nullable_to_non_nullable
|
||||
as BridgeTransmitMode,mute: null == mute ? _self.mute : mute // ignore: cast_nullable_to_non_nullable
|
||||
as bool,releaseTailMs: null == releaseTailMs ? _self.releaseTailMs : releaseTailMs // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
// dart format on
|
||||
|
||||
@@ -67,7 +67,7 @@ class RustLib extends BaseEntrypoint<RustLibApi, RustLibApiImpl, RustLibWire> {
|
||||
String get codegenVersion => '2.12.0';
|
||||
|
||||
@override
|
||||
int get rustContentHash => -427953414;
|
||||
int get rustContentHash => -330689763;
|
||||
|
||||
static const kDefaultExternalLibraryLoaderConfig =
|
||||
ExternalLibraryLoaderConfig(
|
||||
@@ -99,6 +99,10 @@ abstract class RustLibApi extends BaseApi {
|
||||
|
||||
String crateApiExportDiagnostics();
|
||||
|
||||
Future<int> crateApiGetReleaseTailMs();
|
||||
|
||||
Future<BridgeTransmitMode> crateApiGetTransmitMode();
|
||||
|
||||
Future<void> crateApiInitStorage({required String dir});
|
||||
|
||||
Future<bool> crateApiIsConnected();
|
||||
@@ -112,6 +116,8 @@ abstract class RustLibApi extends BaseApi {
|
||||
|
||||
Future<(String, String, String)> crateApiPttDescriptor();
|
||||
|
||||
Future<void> crateApiSetHardMute({required bool muted});
|
||||
|
||||
Future<void> crateApiSetInputMuted({required bool muted});
|
||||
|
||||
void crateApiSetNetworkState({required BridgeNetworkState state});
|
||||
@@ -127,11 +133,20 @@ abstract class RustLibApi extends BaseApi {
|
||||
required String platformKey,
|
||||
});
|
||||
|
||||
Future<void> crateApiSetReleaseTailMs({required int ms});
|
||||
|
||||
Future<void> crateApiSetTransmitMode({required BridgeTransmitMode mode});
|
||||
|
||||
Future<BridgeSnapshot> crateApiSnapshot();
|
||||
|
||||
Future<void> crateApiStartAudio();
|
||||
|
||||
Future<void> crateApiUpdateBookmark({required BridgeBookmark b});
|
||||
|
||||
Future<void> crateApiVoiceJoin({
|
||||
required BigInt channelId,
|
||||
required String password,
|
||||
});
|
||||
|
||||
Future<void> crateApiVoiceLeave();
|
||||
}
|
||||
|
||||
class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi {
|
||||
@@ -369,6 +384,60 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi {
|
||||
TaskConstMeta get kCrateApiExportDiagnosticsConstMeta =>
|
||||
const TaskConstMeta(debugName: "export_diagnostics", argNames: []);
|
||||
|
||||
@override
|
||||
Future<int> crateApiGetReleaseTailMs() {
|
||||
return handler.executeNormal(
|
||||
NormalTask(
|
||||
callFfi: (port_) {
|
||||
final serializer = SseSerializer(generalizedFrbRustBinding);
|
||||
pdeCallFfi(
|
||||
generalizedFrbRustBinding,
|
||||
serializer,
|
||||
funcId: 9,
|
||||
port: port_,
|
||||
);
|
||||
},
|
||||
codec: SseCodec(
|
||||
decodeSuccessData: sse_decode_u_32,
|
||||
decodeErrorData: null,
|
||||
),
|
||||
constMeta: kCrateApiGetReleaseTailMsConstMeta,
|
||||
argValues: [],
|
||||
apiImpl: this,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
TaskConstMeta get kCrateApiGetReleaseTailMsConstMeta =>
|
||||
const TaskConstMeta(debugName: "get_release_tail_ms", argNames: []);
|
||||
|
||||
@override
|
||||
Future<BridgeTransmitMode> crateApiGetTransmitMode() {
|
||||
return handler.executeNormal(
|
||||
NormalTask(
|
||||
callFfi: (port_) {
|
||||
final serializer = SseSerializer(generalizedFrbRustBinding);
|
||||
pdeCallFfi(
|
||||
generalizedFrbRustBinding,
|
||||
serializer,
|
||||
funcId: 10,
|
||||
port: port_,
|
||||
);
|
||||
},
|
||||
codec: SseCodec(
|
||||
decodeSuccessData: sse_decode_bridge_transmit_mode,
|
||||
decodeErrorData: null,
|
||||
),
|
||||
constMeta: kCrateApiGetTransmitModeConstMeta,
|
||||
argValues: [],
|
||||
apiImpl: this,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
TaskConstMeta get kCrateApiGetTransmitModeConstMeta =>
|
||||
const TaskConstMeta(debugName: "get_transmit_mode", argNames: []);
|
||||
|
||||
@override
|
||||
Future<void> crateApiInitStorage({required String dir}) {
|
||||
return handler.executeNormal(
|
||||
@@ -379,7 +448,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi {
|
||||
pdeCallFfi(
|
||||
generalizedFrbRustBinding,
|
||||
serializer,
|
||||
funcId: 9,
|
||||
funcId: 11,
|
||||
port: port_,
|
||||
);
|
||||
},
|
||||
@@ -406,7 +475,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi {
|
||||
pdeCallFfi(
|
||||
generalizedFrbRustBinding,
|
||||
serializer,
|
||||
funcId: 10,
|
||||
funcId: 12,
|
||||
port: port_,
|
||||
);
|
||||
},
|
||||
@@ -433,7 +502,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi {
|
||||
pdeCallFfi(
|
||||
generalizedFrbRustBinding,
|
||||
serializer,
|
||||
funcId: 11,
|
||||
funcId: 13,
|
||||
port: port_,
|
||||
);
|
||||
},
|
||||
@@ -465,7 +534,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi {
|
||||
pdeCallFfi(
|
||||
generalizedFrbRustBinding,
|
||||
serializer,
|
||||
funcId: 12,
|
||||
funcId: 14,
|
||||
port: port_,
|
||||
);
|
||||
},
|
||||
@@ -494,7 +563,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi {
|
||||
pdeCallFfi(
|
||||
generalizedFrbRustBinding,
|
||||
serializer,
|
||||
funcId: 13,
|
||||
funcId: 15,
|
||||
port: port_,
|
||||
);
|
||||
},
|
||||
@@ -512,6 +581,34 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi {
|
||||
TaskConstMeta get kCrateApiPttDescriptorConstMeta =>
|
||||
const TaskConstMeta(debugName: "ptt_descriptor", argNames: []);
|
||||
|
||||
@override
|
||||
Future<void> crateApiSetHardMute({required bool muted}) {
|
||||
return handler.executeNormal(
|
||||
NormalTask(
|
||||
callFfi: (port_) {
|
||||
final serializer = SseSerializer(generalizedFrbRustBinding);
|
||||
sse_encode_bool(muted, serializer);
|
||||
pdeCallFfi(
|
||||
generalizedFrbRustBinding,
|
||||
serializer,
|
||||
funcId: 16,
|
||||
port: port_,
|
||||
);
|
||||
},
|
||||
codec: SseCodec(
|
||||
decodeSuccessData: sse_decode_unit,
|
||||
decodeErrorData: sse_decode_bridge_error,
|
||||
),
|
||||
constMeta: kCrateApiSetHardMuteConstMeta,
|
||||
argValues: [muted],
|
||||
apiImpl: this,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
TaskConstMeta get kCrateApiSetHardMuteConstMeta =>
|
||||
const TaskConstMeta(debugName: "set_hard_mute", argNames: ["muted"]);
|
||||
|
||||
@override
|
||||
Future<void> crateApiSetInputMuted({required bool muted}) {
|
||||
return handler.executeNormal(
|
||||
@@ -522,7 +619,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi {
|
||||
pdeCallFfi(
|
||||
generalizedFrbRustBinding,
|
||||
serializer,
|
||||
funcId: 14,
|
||||
funcId: 17,
|
||||
port: port_,
|
||||
);
|
||||
},
|
||||
@@ -547,7 +644,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi {
|
||||
callFfi: () {
|
||||
final serializer = SseSerializer(generalizedFrbRustBinding);
|
||||
sse_encode_bridge_network_state(state, serializer);
|
||||
return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 15)!;
|
||||
return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 18)!;
|
||||
},
|
||||
codec: SseCodec(
|
||||
decodeSuccessData: sse_decode_unit,
|
||||
@@ -573,7 +670,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi {
|
||||
pdeCallFfi(
|
||||
generalizedFrbRustBinding,
|
||||
serializer,
|
||||
funcId: 16,
|
||||
funcId: 19,
|
||||
port: port_,
|
||||
);
|
||||
},
|
||||
@@ -601,7 +698,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi {
|
||||
pdeCallFfi(
|
||||
generalizedFrbRustBinding,
|
||||
serializer,
|
||||
funcId: 17,
|
||||
funcId: 20,
|
||||
port: port_,
|
||||
);
|
||||
},
|
||||
@@ -629,7 +726,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi {
|
||||
pdeCallFfi(
|
||||
generalizedFrbRustBinding,
|
||||
serializer,
|
||||
funcId: 18,
|
||||
funcId: 21,
|
||||
port: port_,
|
||||
);
|
||||
},
|
||||
@@ -661,7 +758,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi {
|
||||
pdeCallFfi(
|
||||
generalizedFrbRustBinding,
|
||||
serializer,
|
||||
funcId: 19,
|
||||
funcId: 22,
|
||||
port: port_,
|
||||
);
|
||||
},
|
||||
@@ -681,6 +778,62 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi {
|
||||
argNames: ["inputClass", "platformKey"],
|
||||
);
|
||||
|
||||
@override
|
||||
Future<void> crateApiSetReleaseTailMs({required int ms}) {
|
||||
return handler.executeNormal(
|
||||
NormalTask(
|
||||
callFfi: (port_) {
|
||||
final serializer = SseSerializer(generalizedFrbRustBinding);
|
||||
sse_encode_u_32(ms, serializer);
|
||||
pdeCallFfi(
|
||||
generalizedFrbRustBinding,
|
||||
serializer,
|
||||
funcId: 23,
|
||||
port: port_,
|
||||
);
|
||||
},
|
||||
codec: SseCodec(
|
||||
decodeSuccessData: sse_decode_unit,
|
||||
decodeErrorData: sse_decode_bridge_error,
|
||||
),
|
||||
constMeta: kCrateApiSetReleaseTailMsConstMeta,
|
||||
argValues: [ms],
|
||||
apiImpl: this,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
TaskConstMeta get kCrateApiSetReleaseTailMsConstMeta =>
|
||||
const TaskConstMeta(debugName: "set_release_tail_ms", argNames: ["ms"]);
|
||||
|
||||
@override
|
||||
Future<void> crateApiSetTransmitMode({required BridgeTransmitMode mode}) {
|
||||
return handler.executeNormal(
|
||||
NormalTask(
|
||||
callFfi: (port_) {
|
||||
final serializer = SseSerializer(generalizedFrbRustBinding);
|
||||
sse_encode_bridge_transmit_mode(mode, serializer);
|
||||
pdeCallFfi(
|
||||
generalizedFrbRustBinding,
|
||||
serializer,
|
||||
funcId: 24,
|
||||
port: port_,
|
||||
);
|
||||
},
|
||||
codec: SseCodec(
|
||||
decodeSuccessData: sse_decode_unit,
|
||||
decodeErrorData: sse_decode_bridge_error,
|
||||
),
|
||||
constMeta: kCrateApiSetTransmitModeConstMeta,
|
||||
argValues: [mode],
|
||||
apiImpl: this,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
TaskConstMeta get kCrateApiSetTransmitModeConstMeta =>
|
||||
const TaskConstMeta(debugName: "set_transmit_mode", argNames: ["mode"]);
|
||||
|
||||
@override
|
||||
Future<BridgeSnapshot> crateApiSnapshot() {
|
||||
return handler.executeNormal(
|
||||
@@ -690,7 +843,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi {
|
||||
pdeCallFfi(
|
||||
generalizedFrbRustBinding,
|
||||
serializer,
|
||||
funcId: 20,
|
||||
funcId: 25,
|
||||
port: port_,
|
||||
);
|
||||
},
|
||||
@@ -708,33 +861,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi {
|
||||
TaskConstMeta get kCrateApiSnapshotConstMeta =>
|
||||
const TaskConstMeta(debugName: "snapshot", argNames: []);
|
||||
|
||||
@override
|
||||
Future<void> crateApiStartAudio() {
|
||||
return handler.executeNormal(
|
||||
NormalTask(
|
||||
callFfi: (port_) {
|
||||
final serializer = SseSerializer(generalizedFrbRustBinding);
|
||||
pdeCallFfi(
|
||||
generalizedFrbRustBinding,
|
||||
serializer,
|
||||
funcId: 21,
|
||||
port: port_,
|
||||
);
|
||||
},
|
||||
codec: SseCodec(
|
||||
decodeSuccessData: sse_decode_unit,
|
||||
decodeErrorData: sse_decode_bridge_error,
|
||||
),
|
||||
constMeta: kCrateApiStartAudioConstMeta,
|
||||
argValues: [],
|
||||
apiImpl: this,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
TaskConstMeta get kCrateApiStartAudioConstMeta =>
|
||||
const TaskConstMeta(debugName: "start_audio", argNames: []);
|
||||
|
||||
@override
|
||||
Future<void> crateApiUpdateBookmark({required BridgeBookmark b}) {
|
||||
return handler.executeNormal(
|
||||
@@ -745,7 +871,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi {
|
||||
pdeCallFfi(
|
||||
generalizedFrbRustBinding,
|
||||
serializer,
|
||||
funcId: 22,
|
||||
funcId: 26,
|
||||
port: port_,
|
||||
);
|
||||
},
|
||||
@@ -763,6 +889,67 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi {
|
||||
TaskConstMeta get kCrateApiUpdateBookmarkConstMeta =>
|
||||
const TaskConstMeta(debugName: "update_bookmark", argNames: ["b"]);
|
||||
|
||||
@override
|
||||
Future<void> crateApiVoiceJoin({
|
||||
required BigInt channelId,
|
||||
required String password,
|
||||
}) {
|
||||
return handler.executeNormal(
|
||||
NormalTask(
|
||||
callFfi: (port_) {
|
||||
final serializer = SseSerializer(generalizedFrbRustBinding);
|
||||
sse_encode_u_64(channelId, serializer);
|
||||
sse_encode_String(password, serializer);
|
||||
pdeCallFfi(
|
||||
generalizedFrbRustBinding,
|
||||
serializer,
|
||||
funcId: 27,
|
||||
port: port_,
|
||||
);
|
||||
},
|
||||
codec: SseCodec(
|
||||
decodeSuccessData: sse_decode_unit,
|
||||
decodeErrorData: sse_decode_bridge_error,
|
||||
),
|
||||
constMeta: kCrateApiVoiceJoinConstMeta,
|
||||
argValues: [channelId, password],
|
||||
apiImpl: this,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
TaskConstMeta get kCrateApiVoiceJoinConstMeta => const TaskConstMeta(
|
||||
debugName: "voice_join",
|
||||
argNames: ["channelId", "password"],
|
||||
);
|
||||
|
||||
@override
|
||||
Future<void> crateApiVoiceLeave() {
|
||||
return handler.executeNormal(
|
||||
NormalTask(
|
||||
callFfi: (port_) {
|
||||
final serializer = SseSerializer(generalizedFrbRustBinding);
|
||||
pdeCallFfi(
|
||||
generalizedFrbRustBinding,
|
||||
serializer,
|
||||
funcId: 28,
|
||||
port: port_,
|
||||
);
|
||||
},
|
||||
codec: SseCodec(
|
||||
decodeSuccessData: sse_decode_unit,
|
||||
decodeErrorData: sse_decode_bridge_error,
|
||||
),
|
||||
constMeta: kCrateApiVoiceLeaveConstMeta,
|
||||
argValues: [],
|
||||
apiImpl: this,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
TaskConstMeta get kCrateApiVoiceLeaveConstMeta =>
|
||||
const TaskConstMeta(debugName: "voice_leave", argNames: []);
|
||||
|
||||
@protected
|
||||
AnyhowException dco_decode_AnyhowException(dynamic raw) {
|
||||
// Codec=Dco (DartCObject based), see doc to use other codecs
|
||||
@@ -904,6 +1091,13 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi {
|
||||
backendId: dco_decode_String(raw[2]),
|
||||
boundInputClass: dco_decode_String(raw[3]),
|
||||
);
|
||||
case 8:
|
||||
return BridgeEvent_VoiceState(
|
||||
inChannel: dco_decode_bool(raw[1]),
|
||||
transmitMode: dco_decode_bridge_transmit_mode(raw[2]),
|
||||
mute: dco_decode_bool(raw[3]),
|
||||
releaseTailMs: dco_decode_u_32(raw[4]),
|
||||
);
|
||||
default:
|
||||
throw Exception("unreachable");
|
||||
}
|
||||
@@ -937,6 +1131,12 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi {
|
||||
);
|
||||
}
|
||||
|
||||
@protected
|
||||
BridgeTransmitMode dco_decode_bridge_transmit_mode(dynamic raw) {
|
||||
// Codec=Dco (DartCObject based), see doc to use other codecs
|
||||
return BridgeTransmitMode.values[raw as int];
|
||||
}
|
||||
|
||||
@protected
|
||||
double dco_decode_f_32(dynamic raw) {
|
||||
// Codec=Dco (DartCObject based), see doc to use other codecs
|
||||
@@ -1177,6 +1377,17 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi {
|
||||
backendId: var_backendId,
|
||||
boundInputClass: var_boundInputClass,
|
||||
);
|
||||
case 8:
|
||||
var var_inChannel = sse_decode_bool(deserializer);
|
||||
var var_transmitMode = sse_decode_bridge_transmit_mode(deserializer);
|
||||
var var_mute = sse_decode_bool(deserializer);
|
||||
var var_releaseTailMs = sse_decode_u_32(deserializer);
|
||||
return BridgeEvent_VoiceState(
|
||||
inChannel: var_inChannel,
|
||||
transmitMode: var_transmitMode,
|
||||
mute: var_mute,
|
||||
releaseTailMs: var_releaseTailMs,
|
||||
);
|
||||
default:
|
||||
throw UnimplementedError('');
|
||||
}
|
||||
@@ -1219,6 +1430,15 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi {
|
||||
);
|
||||
}
|
||||
|
||||
@protected
|
||||
BridgeTransmitMode sse_decode_bridge_transmit_mode(
|
||||
SseDeserializer deserializer,
|
||||
) {
|
||||
// Codec=Sse (Serialization based), see doc to use other codecs
|
||||
var inner = sse_decode_i_32(deserializer);
|
||||
return BridgeTransmitMode.values[inner];
|
||||
}
|
||||
|
||||
@protected
|
||||
double sse_decode_f_32(SseDeserializer deserializer) {
|
||||
// Codec=Sse (Serialization based), see doc to use other codecs
|
||||
@@ -1472,6 +1692,17 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi {
|
||||
sse_encode_String(level, serializer);
|
||||
sse_encode_String(backendId, serializer);
|
||||
sse_encode_String(boundInputClass, serializer);
|
||||
case BridgeEvent_VoiceState(
|
||||
inChannel: final inChannel,
|
||||
transmitMode: final transmitMode,
|
||||
mute: final mute,
|
||||
releaseTailMs: final releaseTailMs,
|
||||
):
|
||||
sse_encode_i_32(8, serializer);
|
||||
sse_encode_bool(inChannel, serializer);
|
||||
sse_encode_bridge_transmit_mode(transmitMode, serializer);
|
||||
sse_encode_bool(mute, serializer);
|
||||
sse_encode_u_32(releaseTailMs, serializer);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1507,6 +1738,15 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi {
|
||||
sse_encode_list_bridge_client(self.clients, serializer);
|
||||
}
|
||||
|
||||
@protected
|
||||
void sse_encode_bridge_transmit_mode(
|
||||
BridgeTransmitMode self,
|
||||
SseSerializer serializer,
|
||||
) {
|
||||
// Codec=Sse (Serialization based), see doc to use other codecs
|
||||
sse_encode_i_32(self.index, serializer);
|
||||
}
|
||||
|
||||
@protected
|
||||
void sse_encode_f_32(double self, SseSerializer serializer) {
|
||||
// Codec=Sse (Serialization based), see doc to use other codecs
|
||||
|
||||
@@ -63,6 +63,9 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
||||
@protected
|
||||
BridgeSnapshot dco_decode_bridge_snapshot(dynamic raw);
|
||||
|
||||
@protected
|
||||
BridgeTransmitMode dco_decode_bridge_transmit_mode(dynamic raw);
|
||||
|
||||
@protected
|
||||
double dco_decode_f_32(dynamic raw);
|
||||
|
||||
@@ -149,6 +152,11 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
||||
@protected
|
||||
BridgeSnapshot sse_decode_bridge_snapshot(SseDeserializer deserializer);
|
||||
|
||||
@protected
|
||||
BridgeTransmitMode sse_decode_bridge_transmit_mode(
|
||||
SseDeserializer deserializer,
|
||||
);
|
||||
|
||||
@protected
|
||||
double sse_decode_f_32(SseDeserializer deserializer);
|
||||
|
||||
@@ -259,6 +267,12 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
||||
SseSerializer serializer,
|
||||
);
|
||||
|
||||
@protected
|
||||
void sse_encode_bridge_transmit_mode(
|
||||
BridgeTransmitMode self,
|
||||
SseSerializer serializer,
|
||||
);
|
||||
|
||||
@protected
|
||||
void sse_encode_f_32(double self, SseSerializer serializer);
|
||||
|
||||
|
||||
@@ -65,6 +65,9 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
||||
@protected
|
||||
BridgeSnapshot dco_decode_bridge_snapshot(dynamic raw);
|
||||
|
||||
@protected
|
||||
BridgeTransmitMode dco_decode_bridge_transmit_mode(dynamic raw);
|
||||
|
||||
@protected
|
||||
double dco_decode_f_32(dynamic raw);
|
||||
|
||||
@@ -151,6 +154,11 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
||||
@protected
|
||||
BridgeSnapshot sse_decode_bridge_snapshot(SseDeserializer deserializer);
|
||||
|
||||
@protected
|
||||
BridgeTransmitMode sse_decode_bridge_transmit_mode(
|
||||
SseDeserializer deserializer,
|
||||
);
|
||||
|
||||
@protected
|
||||
double sse_decode_f_32(SseDeserializer deserializer);
|
||||
|
||||
@@ -261,6 +269,12 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
||||
SseSerializer serializer,
|
||||
);
|
||||
|
||||
@protected
|
||||
void sse_encode_bridge_transmit_mode(
|
||||
BridgeTransmitMode self,
|
||||
SseSerializer serializer,
|
||||
);
|
||||
|
||||
@protected
|
||||
void sse_encode_f_32(double self, SseSerializer serializer);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user