Move our own state out of TeamspeakConnection: OwnClient, Recording

OwnClient owns the microphone and speakers and our flags (mute, deafen,
away, commander, talk request, phonetic nickname, input hardware) and
publishes them; Recording owns the recorder. ServerSession reads the
flags from OwnClient instead of keeping its own copy, and they are now
cleared when a connect starts rather than once it is done.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-11 19:04:01 +00:00
co-authored by Claude Opus 5.5
parent c2090d8122
commit 9107bdd02e
11 changed files with 529 additions and 413 deletions
+2 -2
View File
@@ -14,8 +14,8 @@ Items are worked through in the order below. Status: open, done (commit), or clo
| 4 | `TeamspeakConnection` (2,157 lines) still does lifecycle, mic/speaker, recording, chat logs, log/sound text, contacts, avatars, icons, file transfers, myTeamSpeak and job plumbing. The `*Admin` helpers take the whole connection, which forwards ~90 methods to them | in progress, in sub-steps: |
| 4a | … chat log and what we tell the user (log lines, sounds, links and sound variables) | done (`1bc7eb5`): `ChatLog`, `Announcer` |
| 4b | … request plumbing into its own class; `*Admin` helpers on narrow dependencies instead of the whole connection | done (`da908f7`; renamed `Uplink` in 4c, as `session.ServerLink` is the `ts3server://` link): `ServerLink` owns the socket, event and request threads and file transfers, and runs requests; the helpers take it (plus the model, permissions or avatars where they need them) |
| 4c | … frontends reach the admin helpers directly instead of ~40 one-line forwarders | done (uncommitted): the helpers are public with non-blocking methods, reached through `ServerSession`/`TeamspeakConnection` getters; 30 forwarders gone, and what they added (stop-at-first-refusal loops, log lines, description refresh, own avatar flag) moved into the helpers. Swing dialogs still take the whole connection for the model and our ids (item 5) |
| 4d | … our own state (mic, speakers, away, talk request, recording) out of the connection | open |
| 4c | … frontends reach the admin helpers directly instead of ~40 one-line forwarders | done (`959f7ed`): the helpers are public with non-blocking methods, reached through `ServerSession`/`TeamspeakConnection` getters; 30 forwarders gone, and what they added (stop-at-first-refusal loops, log lines, description refresh, own avatar flag) moved into the helpers. Swing dialogs still take the whole connection for the model and our ids (item 5) |
| 4d | … our own state (mic, speakers, away, talk request, recording) out of the connection | done (uncommitted): `OwnClient` owns the devices and our flags, and publishes them; `Recording` the recorder. `ServerSession` no longer keeps its own copy of the flags, and they are cleared when a connect starts rather than once it is done |
| 5 | Two front doors: frontends use both `ServerSession` and `session.connection()` with no rule for which | open |
| 6 | Menu bar, toolbar and hotkeys each implement the same commands: `MainMenuBar.Listener` (~50 methods, ~210 lines of forwarding in `MainFrame`), `MainToolbar.Listener`, `HotkeyActions` | open |
| 7 | The admin list dialogs (bans, complaints, offline messages, privilege keys, server log) repeat the load/status/table-model scaffolding | open |