Take ServerFlavor out of the engine API
Event::ServerInfo carried voelin_model::ServerFlavor, a TeamSpeak notion. It
now carries backend: BackendInfo { product, version } (plain strings, with
label() for a sentence) next to the capabilities. The voice source decides
the flavor from the version string (voice.rs backend_of) and puts the
backend and capabilities in VoiceEvent::Connected; session.rs forwards them
and no longer classifies anything.
The UI reads backend.product for a server's chip (ServerItem.flavor becomes
product, as does the session view's field) and backend.label() for the
"Connected to ..." status line; the sample data builds its own backend and
the TeamSpeak 6 capabilities, pinned against the flavor's by a test.
voelinctl's engine mode prints the label. ServerFlavor stays in voelin-model
for the gateway and the voice source.
Shown text is unchanged. New tests: the voice source's backend for TS3, TS6
and an unrecognised version, BackendInfo::label, the status line, the sample
servers' backends, and the server item's product.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
df7be67d4c
commit
b0f95a384f
13 files changed
+257
-46
No files matched your search
@@ -236,8 +236,8 @@ pub async fn run(args: GatewayArgs) -> Result<()> {
|
||||
Event::Presence { session: SESSION, presence } => {
|
||||
nicknames = presence.clients.values().map(|c| (c.id, c.nickname.clone())).collect();
|
||||
}
|
||||
Event::ServerInfo { session: SESSION, name, flavor, .. } => {
|
||||
out.print(format!("server {name:?} {flavor:?}"));
|
||||
Event::ServerInfo { session: SESSION, name, backend, .. } => {
|
||||
out.print(format!("server {name:?} {}", backend.label()));
|
||||
}
|
||||
Event::StreamsChanged { session: SESSION, streams } => {
|
||||
for s in &streams {
|
||||
|
||||
Reference in new issue
Block a user