Make the engine's link vocabulary private and the options neutral

VoiceOptions is a struct of its own, no longer an alias of the TeamSpeak
link's options: identity is an IdentityBlob and client_version a spec for
ts::versions::resolve, which rides the address as the link parameter
client_version and which the TeamSpeak connector resolves (a spec it refuses
fails the connect in words). SessionLink builds the connect parameters
(link/connect.rs: the bookmark's link, the hello, the credential of the
identity's kind, now also a Voelin key's signer) and session.rs holds it
directly: the ServerLink trait between them was redundant. The trait lives
on in the TeamSpeak module (ts/ts_link.rs, with the TeamSpeak-typed
ConnectOptions) for TsLink and the in-memory link of the tests.

ServerLink, TsLink, LinkCtx, LinkCmd, LinkEvent and Remote are crate-private,
Engine::start_with_link is gone, and the three tests that needed the inner
link (tests/link_fake.rs) are unit tests of link/ now. The rg over the crate
for tsclientlib, tsproto and voelin_query, outside ts/ and the three files
that use them privately (gateway.rs, query.rs, stream.rs), is empty. The UI
and voelinctl get compile fixes: the identity blob and the spec string.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
faumarayandClaude Sonnet 5.5 committed 2026-10-24 06:59:44 +03:00
1 parent be84874a09
commit 1edc52ce74
17 files changed
+549 -370

No files matched your search

+1 -1
View File
@@ -254,7 +254,7 @@ pub async fn run(args: EngineArgs) -> Result<()> {
let mut options = VoiceOptions::new(&args.address, &args.nick);
if let Some(path) = &args.identity {
options.identity = Some(crate::identity::load(path)?);
options.identity = Some(voelin_core::ts::identity::to_blob(&crate::identity::load(path)?));
}
engine.send(Command::ConnectVoice { session: SESSION, options: Box::new(options) });
+1 -1
View File
@@ -104,7 +104,7 @@ pub async fn run(args: GatewayArgs) -> Result<()> {
});
if let Some(addr) = &args.voice {
let mut options = VoiceOptions::new(addr, &args.nick);
options.identity = Some(identity);
options.identity = Some(voelin_core::ts::identity::to_blob(&identity));
if args.loopback {
options.stream_peer = PeerConfig::loopback();
}