radio.rs
1 use std::collections::VecDeque; 2 use freya::radio::RadioChannel; 3 use freya::winit::dpi::PhysicalSize; 4 use crate::components::ProfileState; 5 use crate::data::ActiveContent; 6 use crate::data::data::AppData; 7 use crate::net::limiter::RateLimiter; 8 use crate::net::limiter::request::RequestEvent; 9 10 #[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)] 11 pub enum DataChannel 12 { 13 ActiveContent, 14 #[allow(unused)] 15 Notifications, 16 ProfileState, 17 RateLimiter, 18 WindowSize, 19 } 20 21 impl RadioChannel<Option<ActiveContent>> for DataChannel {} 22 impl RadioChannel<Option<bool>> for DataChannel {} 23 impl RadioChannel<PhysicalSize<u32>> for DataChannel {} 24 impl RadioChannel<ProfileState> for DataChannel {} 25 impl RadioChannel<RateLimiter> for DataChannel {} 26 impl RadioChannel<RequestEvent> for DataChannel {} 27 impl RadioChannel<VecDeque<String>> for DataChannel {} 28 29 #[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)] 30 pub enum AppDataChannel 31 { 32 BattleNet, 33 EpicGamesStore, 34 Gog, 35 RetroAchievements, 36 Rpcs3, 37 Settings, 38 Steam, 39 } 40 41 impl RadioChannel<AppData> for AppDataChannel {} 42 43 #[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)] 44 pub enum GameIdChannel 45 { 46 BattleNet, 47 EpicGamesStore, 48 Gog, 49 RetroAchievements, 50 Rpcs3, 51 Steam, 52 } 53 54 impl RadioChannel<Option<u64>> for GameIdChannel {} 55 impl RadioChannel<Option<String>> for GameIdChannel {}