Implement channel file transfers

Add file up/downloads and directory operations for channel file
repositories, reachable from a channel's right-click "Browse files".

Core (com.ts3client.net.filetransfer):
- FileTransferManager drives the TS3 file protocol on the ts3j socket.
  ftinitupload/ftinitdownload results arrive out-of-band as
  notifystartupload/notifystartdownload (success) or
  notifystatusfiletransfer (failure) events, not as command responses,
  so negotiation correlates them by clientftfid via a CompletableFuture.
  The byte phase opens a raw TCP socket, sends the ftkey, then streams.
- FileTransfer: observable per-transfer handle (state, progress, cancel).
- RemoteFile: UI-facing listing DTO, keeping core free of ts3j API types.

TeamspeakConnection exposes list/mkdir/delete/rename and up/download and
manages the manager's lifecycle. Swing FileBrowserDialog provides the
browser UI with a live per-transfer progress strip.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-08-13 07:22:33 +00:00
parent 9ef3cd4ab3
commit f912cab07b
7 changed files with 1176 additions and 0 deletions

View File

@@ -37,6 +37,9 @@ public final class ServerTreePanel extends JScrollPane {
void showConnectionInfo(ClientEntry client);
/** Open the file repository browser for a channel. */
void browseFiles(ChannelNode channel);
boolean isClientLocallyMuted(int clientId);
/** A channel or client node was selected (or {@code null} when cleared). */
@@ -152,6 +155,10 @@ public final class ServerTreePanel extends JScrollPane {
JMenuItem join = new JMenuItem("Join channel");
join.addActionListener(a -> actions.joinChannel(channel.id));
menu.add(join);
menu.addSeparator();
JMenuItem files = new JMenuItem("Browse files");
files.addActionListener(a -> actions.browseFiles(channel));
menu.add(files);
menu.show(tree, e.getX(), e.getY());
}