Frontends call the admin helpers directly, not through the connection

The channel, ban, privilege key, complaint, server log, offline message
and avatar helpers are public, each method running in the background and
answering a future; only the connection creates them. TeamspeakConnection
and ServerSession hand them out, which drops 30 one-line forwarders from
the connection. What the forwarders added moves into the helpers: the
stop-at-the-first-refusal loops, the "sent" log lines, re-reading an
edited channel's description and showing our own new avatar. The
complaint and offline message length limits move with them.

The icon chooser and the offline message composer take only their
helper; the other dialogs still need the connection for the model.

The connection's request runner is renamed Uplink, since
session.ServerLink is the ts3server:// link.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-11 18:45:21 +00:00
co-authored by Claude Opus 5.5
parent da908f77bd
commit 959f7ed97a
25 changed files with 546 additions and 581 deletions
+2 -2
View File
@@ -13,8 +13,8 @@ Items are worked through in the order below. Status: open, done (commit), or clo
| 3 | What we may do is answered in five places: `ServerSession.can*`, `ServerModel.can*/permits/mayHavePower`, `TeamspeakConnection.canSendOfflineMessages/canTransferFiles`, and raw permission names in Swing dialogs and `ServerController.canCreateBans` | done (`13e3a62`): `Permissions` owns the table, the rules and one named question per capability; `ServerSession.permissions()` is `NONE` while disconnected; no permission names outside core except channel-permission editing |
| 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 (uncommitted): `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 | open |
| 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 |
| 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 |