New signal infrastructure for the lobby-first UI:
- PresenceUser struct: { fingerprint, alias }
- SignalMessage::PresenceList: relay broadcasts full user list
to all signal clients on every register/deregister
- SignalHub::presence_list(): builds the list from connected clients
- SignalHub::broadcast(): sends to ALL signal clients
- Relay calls broadcast on register + unregister
- Desktop emits "presence_list" signal-event to JS frontend
This gives clients real-time visibility of who's online via the
signal channel, without needing to join a voice room first.
603 tests pass, 0 regressions.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
38 lines
1.3 KiB
Rust
38 lines
1.3 KiB
Rust
//! WarzonePhone Protocol — shared types, traits, and core logic.
|
|
//!
|
|
//! This crate defines the contracts between all other wzp-* crates.
|
|
//! It contains:
|
|
//! - Wire format types (MediaHeader, MediaPacket, SignalMessage)
|
|
//! - Codec, FEC, crypto, and transport trait definitions
|
|
//! - Adaptive quality controller
|
|
//! - Jitter buffer
|
|
//! - Session state machine
|
|
//!
|
|
//! Compatible with the Warzone messenger identity model:
|
|
//! - Identity = 32-byte seed → HKDF → Ed25519 (signing) + X25519 (encryption)
|
|
//! - Fingerprint = SHA-256(Ed25519 pub)[:16]
|
|
|
|
pub mod bandwidth;
|
|
pub mod codec_id;
|
|
pub mod dred_tuner;
|
|
pub mod error;
|
|
pub mod jitter;
|
|
pub mod packet;
|
|
pub mod quality;
|
|
pub mod session;
|
|
pub mod traits;
|
|
|
|
// Re-export key types at crate root for convenience.
|
|
pub use codec_id::{CodecId, QualityProfile};
|
|
pub use error::*;
|
|
pub use packet::{
|
|
CallAcceptMode, HangupReason, MediaHeader, MediaPacket, MiniFrameContext, MiniHeader,
|
|
PresenceUser, QualityReport, RoomParticipant, SignalMessage, TrunkEntry, TrunkFrame, FRAME_TYPE_FULL,
|
|
FRAME_TYPE_MINI,
|
|
};
|
|
pub use bandwidth::{BandwidthEstimator, CongestionState};
|
|
pub use dred_tuner::{DredTuner, DredTuning};
|
|
pub use quality::{AdaptiveQualityController, NetworkContext, Tier};
|
|
pub use session::{Session, SessionEvent, SessionState};
|
|
pub use traits::*;
|