Files
VoelinClient/crates/voelin-core/src/ts/mod.rs
T
faumarayandClaude Sonnet 5.5 1edc52ce74 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>
2026-10-24 06:59:44 +03:00

31 lines
1.2 KiB
Rust

//! The TeamSpeak implementation of the session seam.
//!
//! Everything of the engine that is TeamSpeak's lives here, so that it can
//! leave this crate for the TeamSpeak gateway (`voelin-gateway-ts` of
//! VoelinGateWay) as one piece (`docs/session-seam.md`, H9):
//!
//! - `ts_link.rs` and `voice.rs` are the connection of `tsclientlib`
//! (chat, voice, files, pokes, offline messages, the stream task's
//! requests) with `book.rs`, its presence from the library's book;
//! - `ts_session/` makes a `voelin_proto::link::Session` of such a connection
//! ([`TsConnector`] is the `Connector` the engine registers for
//! `ts3server://` and `teamspeak://`);
//! - [`versions`] and [`identity`] are what a TeamSpeak client has to know
//! about itself: the signed compatibility versions it can claim, and the
//! identities (reading, importing from the official clients, the security
//! level).
//!
//! The TeamSpeak crates' types (`tsclientlib::Identity`, `Version`, ...) are
//! named in the public items of this module and nowhere else of the crate's
//! API.
mod book;
pub mod identity;
mod ts_link;
pub(crate) mod ts_session;
pub mod versions;
mod voice;
pub(crate) use ts_link::{ConnectOptions, ServerLink, TsLink};
pub use ts_session::TsConnector;