1#![warn(missing_docs)]
3pub mod cache;
4pub mod download;
5pub mod network;
6
7pub const BRIDGE_VERSION: u32 = 1;
9
10pub fn validate_bridge(version: u32) -> Result<(), &'static str> {
12 if version == BRIDGE_VERSION {
13 Ok(())
14 } else {
15 Err("Incompatible Phémios desktop bridge. Update the application.")
16 }
17}
18
19#[cfg(test)]
20#[path = "lib_tests.rs"]
21mod tests;
22
23pub mod playback;
24
25pub mod radio;
26
27pub mod federation;
28pub mod local;
29
30pub mod enrichment;
32
33pub mod volumes;
35
36pub mod podcast;
37
38pub mod hqplayer;
40
41pub mod podcast_download;
43
44pub mod encyclopedia;
46
47pub mod external_links;
49
50pub mod concerts;
52
53pub mod podcast_store;
55mod private_storage;
56
57pub mod article_store;
59mod private_documents;
60
61#[cfg(test)]
62#[path = "podcast_store_test_support.rs"]
63mod private_store_test_support;
64
65pub mod personal_backup;
67
68pub mod server_profile;
70
71pub fn transfer_random(bytes: &mut [u8]) -> Result<(), String> {
73 if bytes.len() > 64 {
74 return Err("Jeton de transfert invalide.".into());
75 }
76 getrandom::fill(bytes).map_err(|_| "Générateur de jeton indisponible.".into())
77}
78
79pub mod session_cleanup;