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:
faumarayandClaude Sonnet 5.5 committed 2026-10-14 13:59:20 +03:00
1 parent df7be67d4c
commit b0f95a384f
13 files changed
+257 -46

No files matched your search

+15
View File
@@ -87,6 +87,21 @@ the native command only when voice-connected *and* in that channel, otherwise th
gateway, otherwise a local query relay. UI states: `Offline`,
`Observing (Gateway|Query)` (invisible), `Connecting`, `Connected`.
## What the engine tells of the server's software
`Event::ServerInfo { session, name, backend, capabilities }` is the one place
the UI learns what it is talking to. `backend` is a `BackendInfo { product,
version }` of plain strings ("TeamSpeak 6", "6.0.0-beta13.1"; an empty
`product` and the server's own version string when the software was not
recognised), and `capabilities` is what that software can do (streams, query
kinds, files, offline messages). The UI shows `product` on a server's chip
and `BackendInfo::label()` in the status line, and branches on capabilities
only. The TeamSpeak 3 / 6 classification (`voelin_model::ServerFlavor`, from
the `virtualserver_version` string) happens in the voice source
(`voice.rs::backend_of`), which puts both in `VoiceEvent::Connected`; no
`ServerFlavor` appears in the engine's public API, so another link (a Voelin
server) can fill the same two fields.
## Chat history
Every chat message a session sees is stored in the client database