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

+7 -7
View File
@@ -122,15 +122,15 @@ impl App {
}
let mut options = VoiceOptions::new(&b.address, &b.nickname);
if let Some(spec) = &b.client_version {
match voelin_core::ts::versions::resolve(spec) {
Ok(version) => options.client_version = version,
Err(error) => {
self.set_status(format!("Invalid client compatibility version: {error}"));
return false;
}
// The engine resolves the spec when it connects; asking now tells the
// user at once.
if let Err(error) = voelin_core::ts::versions::resolve(spec) {
self.set_status(format!("Invalid client compatibility version: {error}"));
return false;
}
options.client_version = Some(spec.clone());
}
options.identity = Some(self.identity_for(Some(b.id)));
options.identity = Some(voelin_core::ts::identity::to_blob(&self.identity_for(Some(b.id))));
options.server_password = self.secrets.get(&b.server_password_key()).ok().flatten();
options.channel = channel;
options.channel_password = channel_password;