feat(ipc): Error (ru.shturman.Error.*) + well-known имена
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Signed-off-by: Alexander <akotenev2003@gmail.com>
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
//! Well-known имена / пути объектов / имена интерфейсов (ipc §2).
|
||||
//! `ru.shturman.<Service>` · `/ru/shturman/<Service>` · `ru.shturman.<Service>N` (N = мажор).
|
||||
|
||||
pub mod power {
|
||||
pub const NAME: &str = "ru.shturman.Power";
|
||||
pub const PATH: &str = "/ru/shturman/Power";
|
||||
pub const IFACE: &str = "ru.shturman.Power1";
|
||||
}
|
||||
|
||||
pub mod settings {
|
||||
pub const NAME: &str = "ru.shturman.Settings";
|
||||
pub const PATH: &str = "/ru/shturman/Settings";
|
||||
pub const IFACE: &str = "ru.shturman.Settings1";
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
#[test]
|
||||
fn names_follow_convention() {
|
||||
assert_eq!(super::power::NAME, "ru.shturman.Power");
|
||||
assert_eq!(super::power::PATH, "/ru/shturman/Power");
|
||||
assert_eq!(super::power::IFACE, "ru.shturman.Power1");
|
||||
assert_eq!(super::settings::NAME, "ru.shturman.Settings");
|
||||
assert_eq!(super::settings::PATH, "/ru/shturman/Settings");
|
||||
assert_eq!(super::settings::IFACE, "ru.shturman.Settings1");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user