//! Minimal SNI watcher/host for the headless validation rig (no desktop bar). #[cfg(target_os = "linux")] fn main() -> Result<(), Box> { use std::sync::Mutex; struct Watcher(Mutex>); #[zbus::interface(name = "org.kde.StatusNotifierWatcher")] impl Watcher { fn register_status_notifier_item(&self, service: String) { eprintln!("registered={service}"); self.0.lock().unwrap().push(service); } fn register_status_notifier_host(&self, service: String) { let _ = service; } #[zbus(property)] fn is_status_notifier_host_registered(&self) -> bool { true } #[zbus(property)] fn protocol_version(&self) -> i32 { 0 } #[zbus(property)] fn registered_status_notifier_items(&self) -> Vec { self.0.lock().unwrap().clone() } } let _connection = zbus::blocking::connection::Builder::session()? .name("org.kde.StatusNotifierWatcher")? .serve_at("/StatusNotifierWatcher", Watcher(Mutex::new(Vec::new())))? .build()?; loop { std::thread::park(); } } #[cfg(not(target_os = "linux"))] fn main() {}