Frontends reach a server only through ServerSession
session.connection() is gone: the session hands out the model, our ids, the microphone and speakers, ping and connection info, the server's unique id, icon and avatar stores, myTeamSpeak, the connect error and a blocking disconnectNow. The connection's remaining actions move into helpers the session hands out instead of forwarding each method: ClientAdmin (move, kick, ban, groups, talk power, poke, client details), ChannelFiles (listing, mkdir, rename, delete, transfers and their sounds) and ClientContacts (display names, volume, auto-mute, whisper policy, sightings); ChannelAdmin also takes join, move, subscribe and description requests. Dialogs take the session instead of the connection. Android's network handover now uses disconnectNow, which also cancels a pending auto-reconnect. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -15,8 +15,8 @@ Items are worked through in the order below. Status: open, done (commit), or clo
|
||||
| 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 (`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 |
|
||||
| 4d | … our own state (mic, speakers, away, talk request, recording) out of the connection | done (`9107bdd`): `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 | done (uncommitted): `connection()` is gone; frontends reach the model, our ids, devices and the helpers through `ServerSession`. New helpers took the remaining actions off the connection: `ClientAdmin` (move, kick, ban, groups, talk power, poke, details), `ChannelFiles`, `ClientContacts`; `ChannelAdmin` also joins, moves and subscribes. Dialogs take the session, or only the helper they use |
|
||||
| 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 |
|
||||
| 8 | `Settings`: 58 public fields, each key spelled twice (load and save), no change notification, so callers fan changes out by hand | open |
|
||||
|
||||
Reference in New Issue
Block a user